Skip to content

Commit f737976

Browse files
committed
remove fullResponse from state
1 parent b342272 commit f737976

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
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
@@ -26,7 +26,6 @@ type PresentOrAbsent<K extends PropertyKey, V> =
2626
export type State = {
2727
creditsUsed?: number | Promise<number>
2828
prompt: string | undefined
29-
fullResponse: string | undefined
3029
agentContext: Record<
3130
string,
3231
{

packages/agent-runtime/src/tools/handlers/tool/write-file.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ export function handleWriteFile(
7777

7878
getLatestState: () => FileProcessingState
7979
state: {
80-
fullResponse: string | undefined
8180
prompt: string | undefined
8281
messages: Message[]
8382
} & FileProcessingState
@@ -89,7 +88,6 @@ export function handleWriteFile(
8988
| 'initialContentPromise'
9089
| 'newContent'
9190
| 'messages'
92-
| 'fullResponse'
9391
| 'lastUserPrompt'
9492
> &
9593
ParamsExcluding<RequestOptionalFileFn, 'filePath'>,
@@ -114,7 +112,7 @@ export function handleWriteFile(
114112
state,
115113
} = params
116114
const { path, instructions, content } = toolCall.input
117-
const { fullResponse, prompt } = state
115+
const { prompt } = state
118116

119117
const fileProcessingState = getFileProcessingValues(state)
120118
const fileProcessingPromisesByPath = fileProcessingState.promisesByPath
@@ -152,7 +150,6 @@ export function handleWriteFile(
152150
initialContentPromise: latestContentPromise,
153151
newContent: fileContentWithoutStartNewline,
154152
messages: agentMessagesUntruncated,
155-
fullResponse: fullResponse ?? '',
156153
lastUserPrompt: prompt,
157154
clientSessionId,
158155
fingerprintId,

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export async function processStreamWithTools(
8383
system,
8484
userId,
8585
} = params
86-
const fullResponseChunks: string[] = [params.fullResponse]
86+
const fullResponseChunks: string[] = [fullResponse]
8787

8888
const messages = [...params.messages]
8989

@@ -95,7 +95,6 @@ export async function processStreamWithTools(
9595
let previousToolCallFinished = streamDonePromise
9696

9797
const state: State = {
98-
fullResponse,
9998
prompt,
10099
agentContext,
101100
messages,

0 commit comments

Comments
 (0)