mirror of https://github.com/buster-so/buster.git
Refactor sequential thinking tool to use toolCallId for message entries and improve error handling
This commit is contained in:
parent
95b67529ad
commit
a63e8da785
|
@ -29,12 +29,13 @@ async function processSequentialThinking(
|
||||||
rawLlmMessages: [],
|
rawLlmMessages: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (state.toolCallId) {
|
||||||
const reasoningEntry = createSequentialThinkingReasoningMessage(
|
const reasoningEntry = createSequentialThinkingReasoningMessage(
|
||||||
state,
|
state,
|
||||||
context.messageId,
|
state.toolCallId,
|
||||||
'completed'
|
'completed'
|
||||||
);
|
);
|
||||||
const rawLlmMessage = createSequentialThinkingRawLlmMessageEntry(state, context.messageId);
|
const rawLlmMessage = createSequentialThinkingRawLlmMessageEntry(state, state.toolCallId);
|
||||||
|
|
||||||
const rawToolResultEntry = createRawToolResultEntry(
|
const rawToolResultEntry = createRawToolResultEntry(
|
||||||
context.messageId,
|
context.messageId,
|
||||||
|
@ -61,6 +62,11 @@ async function processSequentialThinking(
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
success: false,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Factory function that creates the execute function with proper context typing
|
// Factory function that creates the execute function with proper context typing
|
||||||
export function createSequentialThinkingExecute(
|
export function createSequentialThinkingExecute(
|
||||||
state: SequentialThinkingState,
|
state: SequentialThinkingState,
|
||||||
|
|
Loading…
Reference in New Issue