Add repo mention type to workbenches - #3971
Conversation
This provides some basic logic for a stylized repo mention, fetching repo urls from either the agent runtimes history list or the allowed repositories in the wb.
Soffi AI SummaryThis PR introduces a repository mention type ( Beyond the core feature, the PR bundles several related improvements and fixes:
Commits
Updated: 2026-08-06 03:59 UTC |
Greptile SummaryAdds repository mentions to workbench rich-text prompts, deriving suggestions from configured repository allowlists or prior agent-run history and rendering provider-specific chips.
Confidence Score: 4/5This PR should not merge until the global repository-history disclosure and the prompt-form outlet-context crashes are fixed. The repository fallback can expose URLs from unrelated agent runs, while three existing form route families render the updated prompt component without the outlet context it now requires. Files Needing Attention: assets/src/components/ai/chatbot/input/autocomplete/useMentionDataSources.ts; assets/src/components/workbenches/workbench/WorkbenchPromptRichInput.tsx
|
| Filename | Overview |
|---|---|
| assets/src/components/ai/chatbot/input/autocomplete/useMentionDataSources.ts | Adds configured and historical repository suggestions, but the history fallback exposes globally unscoped repository records. |
| assets/src/components/workbenches/workbench/WorkbenchPromptRichInput.tsx | Sources repository configuration from outlet context, causing callers outside the Workbench outlet to crash during rendering. |
| assets/src/components/ai/chatbot/input/autocomplete/mentionTypes.ts | Adds the repository mention kind, attributes, labels, and chip schema consistently. |
| assets/src/components/ai/chatbot/input/autocomplete/repositoryMention.ts | Normalizes repository URLs and derives provider and display metadata for supported SCM hosts. |
| assets/src/components/ai/chatbot/input/autocomplete/PlrlChipMdRenderers.tsx | Adds repository chip rendering with provider-specific icons and a generic fallback. |
| assets/src/components/workbenches/workbench/WorkbenchJobsSearch.tsx | Ports the search dropdown to the shared floating positioning and portal infrastructure without an accepted defect. |
| assets/src/graph/workbench.graphql | Fetches repository allowlists needed by workbench and job prompt autocomplete paths. |
Reviews (1): Last reviewed commit: "Add repo mention type to workbenches" | Re-trigger Greptile
| } = useAgentRunRepositoriesQuery({ | ||
| variables: { q: throttled || undefined }, | ||
| skip: !wantsAt || !workbenchId || allowedRepositories !== null, |
There was a problem hiding this comment.
Global repository history leaks
When both workbench and runtime repository lists are null, this fallback sends only q to a resolver that reads the global repository-history table without workbench, user, or tenant filtering, exposing unrelated repository URLs in autocomplete. How this was verified: The query path was traced to AgentRunRepository.ordered() with no row-level scope applied.
| syncKey?: string | ||
| wrapperStyles?: ComponentProps<typeof ChatInputSimple>['wrapperStyles'] | ||
| }) { | ||
| const { workbench } = useOutletContext<WorkbenchOutletContext>() |
|
plural deploy this |
|
GitOps deployment PR: https://github.com/pluralsh/plrl-up-demos/pull/2535 It updates the console image tag to |
ab1e24c to
ef1ba25
Compare
ef1ba25 to
a74d51e
Compare
|
plural deploy this |
|
Deployment GitOps PR: https://github.com/pluralsh/plrl-up-demos/pull/2541 — pins the demo console image to sha-6be895d for this PR. |
89e8e85 to
dce95bb
Compare
|
plural deploy this |
|
Demo GitOps deployment PR has been created: https://github.com/pluralsh/plrl-up-demos/pull/2542 |
0e030b8 to
90e44fc
Compare
|
plural deploy this |
|
Deployment GitOps PR: https://github.com/pluralsh/plrl-up-demos/pull/2543 It pins console to |
90e44fc to
2ad4a1e
Compare
|
plural deploy this |
|
The deploy GitOps PR has been created: https://github.com/pluralsh/plrl-up-demos/pull/2544 |
|
plural deploy this |
|
GitOps PR https://github.com/pluralsh/plrl-up-demos/pull/2545 deploys console PR #3971 head 7fa5f36 to demo. |
|
plural deploy this |
There was a problem hiding this comment.
Deployment follow-up: the demo GitOps update is tracked in https://github.com/pluralsh/plrl-up-demos/pull/2546. It deploys image tag sha-da0dd78.
This provides some basic logic for a stylized repo mention, fetching repo urls from either the agent runtimes history list or the allowed repositories in the wb.
Test Plan
Test environment: https://console.plrldemo.onplural.sh/cd/clusters/a1748282-ce8b-48ab-ae7e-326e74fce04e/services/f3f89a54-d1a7-4bc8-9152-daa07ede918d/components
Checklist
Plural Flow: console