Repository navigation
feat(site): pin skills to a chat from the composer - #240
Conversation
Persist skills pinned to a chat in chatd.chat_pinned_skills behind the
fork-pinned-skills experiment, serve them on GET and PUT
/api/v2/chats/fork/{chat}/pinned-skills, and append their bodies as a
model-only message whenever the prompt does not show the current pins,
so they apply on every turn and return after compaction.
# Conflicts: # codersdk/fork_experiments.go
… list after compaction
…ke/chat-pinned-skills-ui
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85767ab6d5
ℹ️ 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".
|
@codex review
|
|
Codex Review: Didn't find any major issues. Swish! 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: 696fe9c4da
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a90182f28
ℹ️ 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".
Merge evidence for head
|
Adds the composer UI for pinned skills from #237. With the
fork-pinned-skillsexperiment on, the composer shows a "Pinned skills" pill. Its popover lists the chat's pins as chips and has a searchable picker of the skills the chat can load. Each change sends the whole list withPUT /api/v2/chats/fork/{chat}/pinned-skills.api/forkChatPinnedSkills.tsandapi/queries/forkChatPinnedSkills.ts: the GET/PUT calls and react-query options. The mutation writes the returned list into the query cache.ForkPinnedSkillsPill.tsx: the pill, split intoForkPinnedSkillsPillViewfor stories and a container that runs the queries. Only the chat owner (canManageChat) gets removable chips and the picker; others see read-only chips. Chip removal and the picker are disabled while a save is pending. The picker allows at mostMAX_PINNED_SKILLS_PER_CHAT(8) pins, the backend limit. A failed skill source shows an error with retry.ForkComposerSlot.tsxrenders the pill. Upstream hook lines:AgentChatInput.tsxforwardsworkspaceSkillsto the slot;SkillChip.tsxandFileReferenceChip.tsxgain an optionaldisabledprop on the remove button.ForkPinnedSkillsPill.stories.tsx: collapsed, expanded, loading, load error, none pinned, read-only, saving, pin limit, skill load error, skills partly loaded and no skills available.ForkComposerSlot.test.tsx: no request while the experiment is off; pinning sends the existing pins plus the picked skill; removing a chip sends the rest; chip removal is disabled while a save is pending.Known gaps:
AgentChatPage.tsx, because the fork keeps it out of upstream files.Validation on 8a90182:
pnpm install --frozen-lockfile, biome,tsc, vitest onForkComposerSlot.test.tsx(18/18), oxlint andlint:compilerall pass. Breaking the pin, unpin and pending-save code each fails its test.projectId ?? ""query key fallback, which matches the upstream callers ofchatProjectSkills.