Repository navigation
feat: report agent definition files in the chat context behind fork-agent-definitions - #83
Conversation
…gent-definitions The agent already pins one subagent context resource per agent definition file, but the chat context dropped them. Report them with their name, description and parse warnings so the context popup can show broken or warned definitions.
…es-context-subagent
|
@codex review
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25d2367c49
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…tom-agent-types-context-subagent # Conflicts: # coderd/x/chatd/fork_agent_definitions_internal_test.go
|
@codex review
|
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closing and reopening only to make GitHub recompute the merge ref against current main ( |
The merge ref now points at current main ( |
Merge evidence for head
|
Part of #7
The agent already pins one
subagentcontext resource per agent definition file it finds in the workspace, with its status and parse warnings, and spawn_agent reads them as custom agent types. The chat context API dropped them:contextResourceKindincoderd/x/chatd/context_prompt.gotreatedsubagentas a reserved kind. The agent definitions UI (#75) needs them to show broken or warned definitions in the context popup.Change
codersdk.ChatContextResourceKindSubagent("subagent"), plussubagent_nameandsubagent_descriptiononChatContextResource, filled for OK rows.pinnedContextResourcesreports subagent rows. OK rows keep the agent's parse warnings inerror, which the field's doc already allows for OK rows. Non-OK rows (invalid, oversize, unreadable) go through the existing non-OK path with their status and error. An OK row without a name is skipped, like an OK skill without one.Server.ContextResourcesdrops subagent rows whenfork-agent-definitionsis off, like ACP harnesses behindchat-acp-subagents.ContextUsageIndicatorgets a label for the new kind, becauseRESOURCE_KIND_LABELSis aRecord<ChatContextResourceKind, string>. Rendering subagent rows in the popup is left to the UI workstream (pstack W10: agent definitions UI #75): until then a non-OK subagent row only turns the indicator's warning tone on, and only with the experiment on..github/fork/check-apidoc.shnow sortscodersdk.ChatContextResourceKindtoo, as it already sortscodersdk.Experiment. The new constant lives incodersdk/fork_agent_definitions.go, so the enum spans two files, and swag emits its values in map order (the first CI run generatedsubagentlast).The prompt is unchanged:
contextResourcesToPromptstill ignores subagent rows.Tests
TestForkAgentDefinitionContextResources: with the experiment on, an OK definition reports name, description, size and its warning, an invalid one reports its status and error, and an unnamed OK one is skipped. With the experiment off only the instruction file is reported.TestForkAgentDefinitionContextResources,TestPinnedContextResources,TestContextResources,TestContextResourcesToPrompt, the otherTestForkAgentDefinition*tests,TestSDKFieldsFormatted,TestSwaggerParametersValid, sitetsc --noEmit, and golangci-lint (no findings in the changed files).check-apidoc.shpasses twice in a row, and it still fails when twoChatContextResourceKindvarnames are swapped in the committedswagger.json.