mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 12:03:23 +00:00
feat(coding-agent): complete steer()/followUp() migration
- Update settings-manager with steeringMode/followUpMode (migrates old queueMode) - Update sdk.ts to use new mode options - Update settings-selector UI to show both modes - Add Alt+Enter keybind for follow-up messages - Update RPC API: steer/follow_up commands, set_steering_mode/set_follow_up_mode - Update rpc-client with new methods - Delete dead code: queue-mode-selector.ts - Update tests for new API - Update mom/context.ts stubs - Update web-ui example
This commit is contained in:
parent
58c423ba36
commit
3ae02a6849
12 changed files with 173 additions and 106 deletions
|
|
@ -127,7 +127,7 @@ describe("AgentSession concurrent prompt guard", () => {
|
|||
|
||||
// Second prompt should reject
|
||||
await expect(session.prompt("Second message")).rejects.toThrow(
|
||||
"Agent is already processing. Use queueMessage() to queue messages during streaming.",
|
||||
"Agent is already processing. Use steer() or followUp() to queue messages during streaming.",
|
||||
);
|
||||
|
||||
// Cleanup
|
||||
|
|
@ -135,15 +135,31 @@ describe("AgentSession concurrent prompt guard", () => {
|
|||
await firstPrompt.catch(() => {}); // Ignore abort error
|
||||
});
|
||||
|
||||
it("should allow queueMessage() while streaming", async () => {
|
||||
it("should allow steer() while streaming", async () => {
|
||||
createSession();
|
||||
|
||||
// Start first prompt
|
||||
const firstPrompt = session.prompt("First message");
|
||||
await new Promise((resolve) => setTimeout(resolve, 10));
|
||||
|
||||
// queueMessage should work while streaming
|
||||
expect(() => session.queueMessage("Queued message")).not.toThrow();
|
||||
// steer should work while streaming
|
||||
expect(() => session.steer("Steering message")).not.toThrow();
|
||||
expect(session.pendingMessageCount).toBe(1);
|
||||
|
||||
// Cleanup
|
||||
await session.abort();
|
||||
await firstPrompt.catch(() => {});
|
||||
});
|
||||
|
||||
it("should allow followUp() while streaming", async () => {
|
||||
createSession();
|
||||
|
||||
// Start first prompt
|
||||
const firstPrompt = session.prompt("First message");
|
||||
await new Promise((resolve) => setTimeout(resolve, 10));
|
||||
|
||||
// followUp should work while streaming
|
||||
expect(() => session.followUp("Follow-up message")).not.toThrow();
|
||||
expect(session.pendingMessageCount).toBe(1);
|
||||
|
||||
// Cleanup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue