Commit graph

3595 commits

Author SHA1 Message Date
Patrick Erichsen
7da112bbfa merge main 2025-07-10 17:29:08 -07:00
Patrick Erichsen
e100d9f8ad improve tool group ui 2025-07-10 16:59:04 -07:00
Dallin Romney
c3e95b6a22
Merge pull request #6561 from continuedev/dallin/fix-set-inactive-logic
fix: only set inactive when conversation isn't continuing
2025-07-10 15:44:23 -07:00
Dallin Romney
82d1c466b7 set inactive if no tool call 2025-07-10 15:33:09 -07:00
Patrick Erichsen
77a1482c09 UI polish 2025-07-10 14:56:43 -07:00
Dallin Romney
b9f0f17f4f
Merge pull request #6566 from continuedev/dallin/cmd-backspace-tools
Fix cmd backspace for pending tool calls
2025-07-10 14:51:18 -07:00
Dallin Romney
55504f9bf1 fix cmd backspace 2025-07-10 14:13:53 -07:00
Dallin Romney
2b845d07c4 fix: only set inactive when conversation isn't continuing 2025-07-10 11:30:45 -07:00
Patrick Erichsen
f573597b44 Fix parallel tool calls accept/reject issue and refactor selectors
- Fixed utility functions to find tool calls in correct assistant message instead of last history item
- Enhanced PendingToolCallToolbar to handle individual tool call actions properly
- Added comprehensive tests for multiple tool call scenarios
- Consolidated tool call selectors into single file with cleaner naming
- Added mock support for tools/call endpoint to enable proper testing
- Fixed streamResponseAfterToolCall to wait for all parallel tool calls before continuing

This resolves the issue where accepting/rejecting one tool call would cause other pending tool calls to disappear from the UI.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 11:25:59 -07:00
Dallin Romney
254774ca2a
Merge pull request #6498 from continuedev/pe/package-run-config
chore: build all packages in install scripts
2025-07-09 23:55:17 -07:00
Dallin Romney
37a4492969
Merge pull request #6533 from continuedev/pe/remove-feedback-dialog
chore: remove feedback dialog
2025-07-09 21:46:06 -07:00
Patrick Erichsen
cd7a360883 Merge branch 'main' into pe/package-run-config 2025-07-09 21:43:41 -07:00
Nate Sesti
84daec27bd
Merge pull request #6540 from continuedev/dallin/nvidia-templating
fix: Nvidia Agent and handle different arg streaming styles
2025-07-09 19:19:33 -07:00
Nate Sesti
df2dc117c0
Merge pull request #6520 from jhpiedrahitao/snova-jorgep/sambanova_new_icon
style: update sambanova logo
2025-07-09 18:37:15 -07:00
Nate Sesti
1ef7ebdcbd
Merge pull request #6468 from chezsmithy/enhance-context-searching
feat: ✨ Enhance searching for context providers
2025-07-09 17:41:46 -07:00
Dallin Romney
55467648e0
Merge pull request #6522 from continuedev/edit-outcome-missing-data
Expand editOutcome schema with code fields + add rules to chatInteraction
2025-07-09 17:03:28 -07:00
Dallin Romney
1527345c71 handle different arg streaming styles 2025-07-09 15:38:33 -07:00
Patrick Erichsen
4da6a68f32 remove unneeded fn 2025-07-09 14:35:08 -07:00
Patrick Erichsen
277053db1c remove more stale code 2025-07-09 11:08:59 -07:00
Patrick Erichsen
dc1adabee4 chore: remove feedback dialog 2025-07-09 11:04:57 -07:00
Patrick Erichsen
cd30d42181 fix: countTokens bug 2025-07-09 10:55:41 -07:00
Patrick Erichsen
c6b5eb383b
Merge pull request #6455 from uinstinct/mermaid-diagrams-2
feat: mermaid diagrams
2025-07-09 10:10:09 -07:00
Patrick Erichsen
ab305f2109
Merge pull request #6495 from panyamkeerthana/panyamkeerthana/chat_editor_freeze
fix: prevent UI freeze when ⌘I pressed without active editor
2025-07-09 09:43:55 -07:00
Patrick Erichsen
64d66530c5
Merge pull request #6518 from chezsmithy/fix-terminal-background-output
fix: 🐛 When a terminal command is moved to the background preserve existing output
2025-07-09 08:49:21 -07:00
Nate
7c39878ed8 add applied rules to dev data 2025-07-08 21:37:15 -07:00
Patrick Erichsen
a9e3a56a61 Fix parallel tool calls core processing and Claude API compatibility
## Key Issues Fixed

### 1. Tool Output Matching Error
- **Problem**: `compileChatMessages` only processed the last tool message, causing "no tool call found to match tool output" errors
- **Solution**: Modified to collect and process all consecutive tool messages from the end
- **Files**: `core/llm/countTokens.ts` - Enhanced tool message collection and validation logic

### 2. Claude API Missing tool_result Blocks
- **Problem**: `flattenMessages` was merging adjacent tool messages, losing individual `toolCallId` properties
- **Solution**: Prevented merging of tool messages to preserve unique `toolCallId` for each `tool_result` block
- **Files**: `core/llm/messages.ts` - Added condition to prevent tool message merging

### 3. Token Counting for Parallel Tool Calls
- **Problem**: Token counting only considered the last tool message
- **Solution**: Added logic to count tokens for all tool messages in parallel scenarios
- **Files**: `core/llm/countTokens.ts` - Enhanced token counting for multiple tool messages

## Test Coverage
- Added comprehensive tests for parallel tool call scenarios
- Tests verify correct message structure for Claude API format
- All existing functionality preserved with backward compatibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 21:18:48 -07:00
uinstinct
049fd21b2d Merge branch 'main' into mermaid-diagrams-2 2025-07-09 08:48:40 +05:30
Patrick Erichsen
8bdffaf44b Fix parallel tool calling functionality
- Fixed import for selectCurrentToolCalls in streamNormalInput
- Tool calls now properly transition from 'generating' to 'generated' status
- All parallel tool calling tests are now passing
- Enables true parallel tool execution with proper permission handling

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 15:40:46 -07:00
Patrick Erichsen
148d84fe03 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>
2025-07-08 15:37:23 -07:00
Patrick Erichsen
c49f8412c3 Revert streaming fixes and preserve parallel tool calls progress
- Reverted ID-based streaming logic back to index-based approach
- Reverted permission processing changes
- Preserved existing parallel tool calls infrastructure
- Tests show tool calls are stored but not transitioning to "generated" status
- Ready to start fresh on the parallel tool calling issue

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 15:33:08 -07:00
Patrick Erichsen
bcf0969f34 Fix parallel tool calls utility functions and remove backward compatibility
- Fix findCurrentToolCalls to prioritize toolCallStates array over single toolCallState
- Remove all backward compatibility code for single toolCallState field
- Update clearDanglingMessages to only use toolCallStates array
- Clean up utility function tests to only test new behavior
- Add comprehensive test coverage for parallel tool calls functionality
- Suppress ProseMirror DOM errors in test environment
- Fix TypeScript errors in test files

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 13:52:44 -07:00
Dallin Romney
3b9331b721
Merge pull request #6515 from continuedev/pe/truncate-btn-styling
fix: use correct styling on truncate btn
2025-07-08 13:27:12 -07:00
Patrick Erichsen
41a3106ad5 Update message construction for parallel tool calls
- Modified constructMessages to find correct tool call state for each tool call ID
- Updated tool message generation to use toolCallStates array when available
- Falls back to legacy toolCallState for backward compatibility
- Each tool call now gets proper output/content from its corresponding state
- Removed TODO comment about parallel tool call limitation
- TypeScript compilation passes, all utility tests pass

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 13:24:39 -07:00
Patrick Erichsen
c48eeb4642 Update Redux state management for parallel tool calls
- Modified streamUpdate to process all tool calls instead of just [0]
- Store multiple tool calls in toolCallStates array
- Maintain backward compatibility with single toolCallState
- Update streaming logic to handle multiple tool call deltas
- Enhanced abort logic to cancel all pending tool calls
- Removed "Intentionally only supporting one tool call" limitation
- TypeScript compilation passes, all utility tests pass

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 13:22:22 -07:00
Patrick Erichsen
e3d6d166b4 Update PendingToolCallToolbar for parallel tool calls
- Changed from selectCurrentToolCall to selectCurrentToolCallsByStatus
- Show individual UI for each tool call requiring approval
- Display dynamic text: "1 pending tool call" vs "X pending tool calls"
- Individual approve/reject buttons for each tool call
- Added test IDs with toolCallId for specific tool testing
- Used only Tailwind classes, no styled components
- Returns null when no pending tool calls exist

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 13:19:49 -07:00
Patrick Erichsen
aa50f54999 Update streamNormalInput to handle multiple tool calls
- Changed from selectCurrentToolCall to selectCurrentToolCalls selector
- Added loop to iterate over all tool calls in a response
- Each tool call is marked as "generated" with setToolGenerated
- Auto-execute tools with "allowedWithoutPermission" policy
- Tools with "allowedWithPermission" require manual approval
- Maintains backward compatibility with single tool calls
- TypeScript compilation passes, core functionality verified

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 13:15:06 -07:00
Patrick Erichsen
7cb78fe209 Rename callCurrentTool to callToolById for clarity
- Renamed function from callCurrentTool to callToolById to better reflect its purpose
- Updated function signature to accept toolCallId parameter for parallel tool execution
- Renamed file from callCurrentTool.ts to callToolById.ts
- Updated all import paths and call sites across codebase
- Verified TypeScript compilation passes
- All utility function tests still pass (21/21)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 13:11:43 -07:00
Rohit Khanwani
ca0938c679 change tests to check for agent mode as default 2025-07-08 21:09:28 +01:00
Rohit Khanwani
f8881f43b1 change default mode to agent 2025-07-08 21:09:28 +01:00
Patrick Erichsen
082a73e277 Refactor utility functions for parallel tool call support
- Remove findCurrentToolCall and replace with parallel-aware alternatives
- Add hasCurrentToolCalls() for boolean checks
- Add findCurrentToolCallsByStatus() for status-specific filtering
- Add new selectors: selectCurrentToolCalls, selectHasCurrentToolCalls, selectCurrentToolCallsByStatus
- Keep selectCurrentToolCall as legacy selector (returns first tool call)
- Update all imports to use proper selectors
- Comprehensive unit tests with 21 passing tests
- Maintain backward compatibility while enabling parallel tool calls

Key Changes:
- Deprecated single tool call logic in favor of array-based approach
- All utility functions now handle both single and multiple tool call scenarios
- TypeScript compilation clean, all tests passing

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 13:04:05 -07:00
jhpiedrahitao
94cd063fbf update sambanova logo 2025-07-08 13:25:17 -05:00
Patrick Erichsen
ab5be7b171 Fix parallel tool calls test format to use OpenAI toolCalls structure
- Update test to use proper ChatMessage format with toolCalls array
- Fix TypeScript errors by using correct message part types
- Test now properly validates parallel tool calls behavior
- First test passes, showing system can handle multiple tool calls without crashing
- Other tests fail as expected since parallel tool calls aren't implemented yet

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 11:02:00 -07:00
Patrick Erichsen
e34d71e600 Add initial parallel tool calls support to core data structures
- Add toolCallStates array to ChatHistoryItem interface for multiple tool calls
- Update findToolCall and findCurrentToolCall utilities to support both single and multiple tool calls
- Add findCurrentToolCalls function to get all current tool calls
- Create comprehensive test suite for parallel tool calls
- Maintain backward compatibility with existing single tool call logic

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-08 10:59:36 -07:00
chezsmithy
3dc2711c53 fix: 🐛 When a terminal command is moved to the background preserve existing output 2025-07-08 10:59:17 -07:00
Nate Sesti
e4016edce9
Merge pull request #6475 from continuedev/nate/adjust-find-replace-prompt
Polishing find / replace tool (UI, prompt)
2025-07-08 10:23:29 -07:00
Dallin Romney
11c4ba7497
Merge pull request #6108 from shssoichiro/issue-5419
fix: enable parsing of OpenAI-compatible agent mode messages
2025-07-08 10:14:13 -07:00
Nate Sesti
742006dcdc
Merge branch 'main' into nate/adjust-find-replace-prompt 2025-07-08 10:10:19 -07:00
Patrick Erichsen
7205639dec fix: update toolbar btn stylings 2025-07-08 09:38:57 -07:00
Patrick Erichsen
9a15213f63 fix: use correct styling on truncate btn 2025-07-08 09:35:13 -07:00
Keerthana Panyam
f50862f3c0 fix: prevent entering edit mode without editor
previously, edit mode was triggered even without an active editor and
the existing fallback mechanism failed silently if no active editor was
available.

this commit ensures that there is a validation check before entering
edit mode to ensure codeToEdit exists. It shows a toast message when
trying to switch to edit mode using '⌘I'. It also removes the fallback
check that occurs after edit mode is already activated.
2025-07-08 10:03:58 -04:00