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: [],
|
||||
};
|
||||
|
||||
if (state.toolCallId) {
|
||||
const reasoningEntry = createSequentialThinkingReasoningMessage(
|
||||
state,
|
||||
context.messageId,
|
||||
state.toolCallId,
|
||||
'completed'
|
||||
);
|
||||
const rawLlmMessage = createSequentialThinkingRawLlmMessageEntry(state, context.messageId);
|
||||
const rawLlmMessage = createSequentialThinkingRawLlmMessageEntry(state, state.toolCallId);
|
||||
|
||||
const rawToolResultEntry = createRawToolResultEntry(
|
||||
context.messageId,
|
||||
|
@ -59,6 +60,11 @@ async function processSequentialThinking(
|
|||
return {
|
||||
success: true,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
success: false,
|
||||
};
|
||||
}
|
||||
|
||||
// Factory function that creates the execute function with proper context typing
|
||||
|
|
Loading…
Reference in New Issue