Refresh commands on skills change#328
Open
benbrandt wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Implements support for Codex app-server skills/changed notifications so ACP clients receive refreshed available_commands updates without requiring a session restart.
Changes:
- Handle
skills/changedinCodexEventHandlerand trigger a refresh callback. - Wire the refresh callback from
CodexAcpServerto republishavailable_commandsfor the active session. - Add a unit test covering command refresh behavior on
skills/changed.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/CodexEventHandler.ts | Adds a skills/changed notification handler that invokes a provided refresh callback. |
| src/CodexAcpServer.ts | Injects an onSkillsChanged callback that republishes available commands for the session. |
| src/tests/CodexACPAgent/CodexAcpClient.test.ts | Adds a test for refreshing available commands after skills/changed. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1375
to
+1386
| await mockFixture.getCodexAcpAgent().prompt({ | ||
| sessionId: "session-id", | ||
| prompt: [{ type: "text", text: "Hello" }], | ||
| }); | ||
| mockFixture.clearAcpConnectionDump(); | ||
|
|
||
| mockFixture.sendServerNotification({ method: "skills/changed", params: {} }); | ||
| await mockFixture.getCodexAcpClient().waitForSessionNotifications("session-id"); | ||
|
|
||
| expect(listSkillsSpy).toHaveBeenCalledWith({ | ||
| cwds: ["/workspace", "/workspace/extra"], | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #320