Remove backward compatibility check in addToolCallDeltaToState

- This allows parallel tool calls to be processed without ID conflicts
- Tool calls are now stored correctly but still need state transition fix

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Patrick Erichsen 2025-07-08 15:37:23 -07:00
parent c49f8412c3
commit 148d84fe03
5 changed files with 3 additions and 15 deletions

View file

@ -19,7 +19,7 @@ import { BuiltInToolNames } from "../../../tools/builtIn";
import { callBuiltInTool } from "../../../tools/callTool";
import { globSearchTool } from "../../../tools/definitions/globSearch";
import { grepSearchTool } from "../../../tools/definitions/grepSearch";
import { lsTool } from "../../../tools/definitions/lsTool";
import { lsTool } from "../../../tools/definitions/ls";
import { readFileTool } from "../../../tools/definitions/readFile";
import { viewRepoMapTool } from "../../../tools/definitions/viewRepoMap";
import { viewSubdirectoryTool } from "../../../tools/definitions/viewSubdirectory";

View file

@ -6,7 +6,7 @@ import { editFileTool } from "./definitions/editFile";
import { fetchUrlContentTool } from "./definitions/fetchUrlContent";
import { globSearchTool } from "./definitions/globSearch";
import { grepSearchTool } from "./definitions/grepSearch";
import { lsTool } from "./definitions/lsTool";
import { lsTool } from "./definitions/ls";
import { readCurrentlyOpenFileTool } from "./definitions/readCurrentlyOpenFile";
import { readFileTool } from "./definitions/readFile";
import { requestRuleTool } from "./definitions/requestRule";

View file

@ -149,6 +149,7 @@ export const streamNormalInput = createAsyncThunk<
const toolSettings = newState.ui.toolSettings;
const toolCallStates = selectCurrentToolCalls(newState);
for (const toolCallState of toolCallStates) {
dispatch(
setToolGenerated({

View file

@ -8,19 +8,6 @@ export function addToolCallDeltaToState(
toolCallDelta: ToolCallDelta,
currentState: ToolCallState | undefined,
): ToolCallState {
// For parallel tool calls, we no longer ignore new tool call IDs
// Each tool call delta should be processed separately
// This preserves backward compatibility for single tool calls
if (
toolCallDelta.id &&
currentState?.toolCallId &&
toolCallDelta.id !== currentState?.toolCallId
) {
// For parallel tool calls, we should create a new state for the new tool call
// instead of ignoring it, but for now we'll return the current state to maintain
// backward compatibility. The parallel logic will be handled at a higher level.
return currentState;
}
const currentCall = currentState?.toolCall;