- Replace manual PATH and HOME env var handling with getDefaultEnvironment()
- Improves consistency and reliability of MCP client environment setup
- Leverages SDK's built-in environment configuration
- Allow specific binary formats (.pdf, .docx, .ipynb) to be processed by extractTextFromFile
- Block unsupported binary files with existing "Binary file" notice
- Update tests to cover both supported and unsupported binary file scenarios
- Refactor test mocks for better maintainability and coverage
* Improves model info detection for custom Bedrock ARNs
Adds heuristics to better estimate model capabilities when using unknown or custom model ARNs, including context window and max tokens. Allows user overrides for key model parameters via provider settings, improving flexibility and reliability for non-standard model integrations.
Fixes#3712
* Improves JSON syntax error handling in import flow
Provides more informative error messages for JSON syntax
errors by extracting the error position and formatting it
for clarity during import. Enhances user feedback when
invalid JSON is encountered.
* Fixed failing tests
* Delete pnpm-lock.yaml
* Added Rory's cache fix from PR #3099
PR #3009 has an important fix, alerted to me by @JBBrown
It was a one liner so I pulled it in.
This brings up a question can we merge PR's in the GH UI?
* Add Claude 4 and Opus 4 to modelID's
Kept previous parameters, did not see any changes in those.
* Fixed types being moved and me breaking the merge.
* Fix merge
---------
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* refactor: Unify history item UI with TaskItem and TaskItemHeader
Introduces `TaskItem.tsx` and `TaskItemHeader.tsx` to centralize and
standardize the rendering of history entries. `TaskItem` handles the
overall structure for "compact" (Preview) and "full" (HistoryView)
variants. `TaskItemHeader` consolidates all metadata (timestamp, tokens,
cost, cache, file size) into a single, consistent line above the task
content, enhancing visual clarity and reducing UI clutter.
This refactor significantly simplifies `HistoryPreview.tsx` and
`HistoryView.tsx`. Approximately 314 lines of previous rendering logic
were removed from these components and replaced by 242 lines in the new,
focused, and reusable `TaskItem` and `TaskItemHeader` components,
resulting in a net reduction and improved maintainability.
Most importantly, rendering logic happens in one place.
Key UI Changes:
- Metadata (timestamp, tokens, cost, cache, file size) now displayed
inline on a single header row in both variants.
- Removed explicit "Tokens:" and "API Cost:" labels for a cleaner look.
- Action buttons (Copy, Export, Delete) in the full view are now
aligned with the metadata header.
- File size is displayed in the header for the "full" variant only.
- Workspace information is no longer displayed in the "compact" preview.
Component Changes:
- Created `webview-ui/src/components/history/TaskItem.tsx` (125 lines)
- Created `webview-ui/src/components/history/TaskItemHeader.tsx` (117 lines)
- Modified `webview-ui/src/components/history/HistoryPreview.tsx` (-65 lines, +3 lines)
- Modified `webview-ui/src/components/history/HistoryView.tsx` (-249 lines, +3 lines)
- Uses `HistoryItem` type for standardized data handling.
Fixes: #4018
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* test: fix TaskItem and HistoryView test failures after refactor
Fixes test failures that occurred after the major refactoring that introduced
the shared TaskItem component. The original implementation was correct but
the tests needed updates to match the new component structure.
- Add data-testid attributes to TaskItemHeader for reliable test selection
- Update TaskItem.test.tsx assertions to use new test IDs for tokens/cache
- Fix Checkbox import path in TaskItem.tsx (ui/checkbox vs ui)
- Add missing mocks for lucide-react and Checkbox in HistoryView.test.tsx
- Update HistoryView test assertions to use correct selectors
- Ensure all 19 history component tests pass successfully
The refactoring reduced code duplication by ~250+ lines while maintaining
functionality, and these test fixes ensure the quality gates remain intact.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* ui: move token and cost info from header to dedicated footer
Create a new TaskItemFooter component that displays token and cost information
with different styles for compact and full views. Move the CopyButton and
ExportButton from header to footer in full view. Adjust file size display
positioning in the header for better visual alignment.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* test: update history component tests to match implementation
Update data-testid attributes in HistoryView and TaskItem tests to match the
actual implementation in TaskItemFooter component. The tests were looking for
generic "tokens-in" and "tokens-out" attributes, but the implementation uses
variant-specific attributes like "tokens-in-footer-full".
Also added mocks for CopyButton and ExportButton components to resolve
"Element type is invalid" errors during test rendering.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* Move cache information from header to footer to be consistent with cost/token data
* Fix ESLint warnings: remove unused imports and variables
---------
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
fix: improve directory link handling in markdown
Enhance the openFile function to better handle directory links in markdown:
- Add support for resolving ./SimpleName paths to home directory if not found in workspace
- Improve path resolution by checking multiple potential locations
- Ensure directories are properly revealed in the Explorer view
- Attempt to expand directories after revealing them
Fixes: #3686
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
* add support for mcp server instructions
* Update McpView.tsx
* feat(mcp): add instructions field to MCP localization files and update UI to display instructions
---------
Co-authored-by: huixin <yuanhx@cffex.com.cn>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Adds a new test case that allows testing the multi-search-replace diff strategy directly from the command line by passing source and diff files as arguments.
This enables easier debugging and manual testing of the diff application functionality without needing to modify test code for each test case.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>