Skip to content

Commit cdd638e

Browse files
s1korrrrclaude
andcommitted
feat(web): suggest the next prompt as grey composer text
After a reply you watched finish, ask the text generation model (the one that names threads) for the message you are likely to send next and show it in the empty composer. Tab or Right Arrow fills the draft without sending; Esc hides it. Off by default (Settings > General), with custom instructions that can be set per project. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent fe507c5 commit cdd638e

36 files changed

Lines changed: 1088 additions & 16 deletions

‎apps/server/src/auth/RpcAuthorization.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const RPC_REQUIRED_SCOPES = {
5454
[ORCHESTRATION_V2_WS_METHODS.getThreadProjection]: AuthOrchestrationReadScope,
5555
[ORCHESTRATION_V2_WS_METHODS.getTurnItem]: AuthOrchestrationReadScope,
5656
[ORCHESTRATION_V2_WS_METHODS.launchThread]: AuthOrchestrationOperateScope,
57+
[ORCHESTRATION_V2_WS_METHODS.suggestNextPrompt]: AuthOrchestrationOperateScope,
5758
[ORCHESTRATION_V2_WS_METHODS.subscribeArchivedShell]: AuthOrchestrationReadScope,
5859
[ORCHESTRATION_V2_WS_METHODS.subscribeShell]: AuthOrchestrationReadScope,
5960
[ORCHESTRATION_V2_WS_METHODS.subscribeThread]: AuthOrchestrationReadScope,

‎apps/server/src/git/GitManager.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ function createTextGeneration(
281281
Effect.succeed({
282282
title: "Update workflow",
283283
}),
284+
generateNextPrompt: () => Effect.succeed({ suggestion: null }),
284285
generateReviewGuide: () => Effect.succeed({ stops: [] }),
285286
...overrides,
286287
};
@@ -330,6 +331,7 @@ function createTextGeneration(
330331
}),
331332
),
332333
),
334+
generateNextPrompt: (input) => implementation.generateNextPrompt(input),
333335
generateReviewGuide: (input) => implementation.generateReviewGuide(input),
334336
};
335337
}

‎apps/server/src/observability/RpcInstrumentation.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const RPC_AGGREGATES = {
1515
[ORCHESTRATION_V2_WS_METHODS.getWorkflowScript]: "orchestration",
1616
[ORCHESTRATION_V2_WS_METHODS.stopWorkflow]: "orchestration",
1717
[ORCHESTRATION_V2_WS_METHODS.getTurnItem]: "orchestration",
18+
[ORCHESTRATION_V2_WS_METHODS.suggestNextPrompt]: "orchestration",
1819
[ORCHESTRATION_V2_WS_METHODS.getTurnDiff]: "orchestration",
1920
[ORCHESTRATION_V2_WS_METHODS.getFullThreadDiff]: "orchestration",
2021
[ORCHESTRATION_V2_WS_METHODS.searchThreads]: "orchestration",

0 commit comments

Comments
 (0)