RAG changes - #3
Open
ChaiEranki wants to merge 11 commits into
Open
Conversation
ChaiEranki
pushed a commit
that referenced
this pull request
Mar 30, 2026
…ons (cline#9783) * fix: Claude Code provider failing with 4.6 models and newer CLI versions - Update --disallowedTools list to match current Claude Code CLI tools (12 new tools were unblocked, causing models to use native tool_use instead of Cline's XML tools) - Fix rate_limit_event handling for new CLI format (top-level type instead of system subtype) - Handle unknown content block types and new message types gracefully - Fix assistantHasContent check to account for tool calls accumulated via toolUseHandler even when useNativeToolCalls is false * resolved .include mismatch to .containEql * Update src/integrations/claude-code/types.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Removed `LegacyRateLimitEvent` type and its union reference from `types.ts` * Fixed loop with async tool calls in new claude code. * PR review feedback fixes __Fix #2 (claude-code.ts):__ Cleaned up the error field check — replaced verbose `"error" in message` guard + ternary chain with a simpler `message.error` check using optional chaining and nullish coalescing (`message.content?.[0]` + `?? fallback`). __Fix #3 (claude-code.ts):__ Replaced `message.content.length > 0 ? message.content[0] : undefined` with `message.content?.[0]` using optional chaining for the `stop_reason` block. __Fix #4 (claude-code.ts):__ Replaced repeated `(content as any)` casts in the `default` switch case with a single typed cast: `const unknownBlock = content as { type: string; text?: string }`, making the code cleaner and safer. __Fix #5 (ApplyPatchHandler.ts):__ Replaced both `await import("node:path")` and `require("node:path")` dynamic imports with a static `import { resolve as resolvePath } from "node:path"` at the top of the file. * Remove file read deduplication feature (moved to separate PR) * Remove ReadFileToolHandler file-not-found test (moved to separate PR) * Add LegacyRateLimitEvent type for older CLI format * Restore ReadFileToolHandler.ts and test from upstream/main (fix stale local main revert) * Revert ReadFileToolHandler.ts to match fork main (no try/catch, no test file) * manually reverting back * Update src/core/api/providers/claude-code.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Restore ReadFileToolHandler.ts and test to match cline/cline upstream main --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rag changes