Skip to content

Commit 7095334

Browse files
committed
remove clientSessionId from state
1 parent c0d552e commit 7095334

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

packages/agent-runtime/src/tools/handlers/handler-function-type.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ type PresentOrAbsent<K extends PropertyKey, V> =
2424
| { [P in K]: V }
2525
| { [P in K]: never }
2626
export type State = {
27-
clientSessionId: string
2827
userInputId: string
2928
creditsUsed?: number | Promise<number>
3029
fingerprintId: string

packages/agent-runtime/src/tools/handlers/tool/create-plan.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ import type { Logger } from '@codebuff/common/types/contracts/logger'
1515
export const handleCreatePlan = ((params: {
1616
previousToolCallFinished: Promise<void>
1717
toolCall: CodebuffToolCall<'create_plan'>
18+
19+
agentStepId: string
20+
clientSessionId: string
21+
logger: Logger
1822
requestClientToolCall: (
1923
toolCall: ClientToolCall<'create_plan'>,
2024
) => Promise<CodebuffToolOutput<'create_plan'>>
21-
writeToClient: (chunk: string) => void
22-
logger: Logger
2325
trackEvent: TrackEventFn
24-
26+
writeToClient: (chunk: string) => void
27+
2528
getLatestState: () => FileProcessingState
26-
agentStepId: string
2729
state: {
28-
clientSessionId: string
2930
fingerprintId: string
3031
userId: string | undefined
3132
userInputId: string
@@ -36,19 +37,19 @@ export const handleCreatePlan = ((params: {
3637
state: FileProcessingState
3738
} => {
3839
const {
40+
agentStepId,
41+
clientSessionId,
42+
logger,
3943
previousToolCallFinished,
44+
state,
4045
toolCall,
41-
requestClientToolCall,
42-
writeToClient,
43-
logger,
4446
getLatestState,
47+
requestClientToolCall,
4548
trackEvent,
46-
state,
47-
agentStepId,
49+
writeToClient,
4850
} = params
4951
const { path, plan } = toolCall.input
5052
const {
51-
clientSessionId,
5253
fingerprintId,
5354
userId,
5455
userInputId,

packages/agent-runtime/src/tools/stream-parser.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ export type ToolCallError = {
3636

3737
export async function processStreamWithTools(
3838
params: {
39-
agentStepId: string
4039
agentContext: Record<string, Subgoal>
4140
agentState: AgentState
4241
agentTemplate: AgentTemplate
4342
ancestorRunIds: string[]
44-
clientSessionId: string
4543
fileContext: ProjectFileContext
4644
fingerprintId: string
4745
fullResponse: string
@@ -75,8 +73,6 @@ export async function processStreamWithTools(
7573
>,
7674
) {
7775
const {
78-
agentStepId,
79-
clientSessionId,
8076
userInputId,
8177
fingerprintId,
8278
userId,
@@ -110,7 +106,6 @@ export async function processStreamWithTools(
110106

111107
const state: State = {
112108
fullResponse,
113-
clientSessionId,
114109
prompt,
115110
userInputId,
116111
fingerprintId,

0 commit comments

Comments
 (0)