fix(gateway): read_thoughts range/last queries now include branch thoughts#100
Open
glassBead-tc wants to merge 2 commits intomainfrom
Open
fix(gateway): read_thoughts range/last queries now include branch thoughts#100glassBead-tc wants to merge 2 commits intomainfrom
glassBead-tc wants to merge 2 commits intomainfrom
Conversation
… queries read_thoughts range, last N, and default queries used getThoughts() which only returns main chain. Branch thoughts were invisible to these queries despite get_structure and deep_analysis being fixed in PR #99. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Contributor
Greptile OverviewGreptile SummaryThis PR completes the branch visibility fix started in PR #99 by updating the remaining three query paths in Changes:
Test coverage:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant Gateway as GatewayHandler
participant Storage as ThoughtboxStorage
participant Store as LinkedThoughtStore
Note over Client,Store: Range Query Example: [4, 8]
Client->>Gateway: read_thoughts(range: [4, 8])
Gateway->>Storage: getAllThoughts(sessionId)
Storage->>Store: getSessionNodes(sessionId)
Note over Store: Returns ALL nodes<br/>(main chain + branches)
Store-->>Storage: [nodes 1-10]
Storage-->>Gateway: [thoughts 1-10]
Gateway->>Gateway: Filter: t.thoughtNumber >= 4 && <= 8
Note over Gateway: Returns: main 4-5 + branch 6-8
Gateway-->>Client: {count: 5, thoughts: [4,5,6,7,8]}
Note over Client,Store: Last N Query Example: last 3
Client->>Gateway: read_thoughts(last: 3)
Gateway->>Storage: getAllThoughts(sessionId)
Storage->>Store: getSessionNodes(sessionId)
Store-->>Storage: [nodes 1-10]
Storage-->>Gateway: [thoughts 1-10]
Gateway->>Gateway: Slice: allThoughts.slice(-3)
Note over Gateway: Returns: thoughts 8, 9, 10
Gateway-->>Client: {count: 3, thoughts: [8,9,10]}
Note over Client,Store: Default Query (no params)
Client->>Gateway: read_thoughts()
Gateway->>Storage: getAllThoughts(sessionId)
Storage->>Store: getSessionNodes(sessionId)
Store-->>Storage: [nodes 1-10]
Storage-->>Gateway: [thoughts 1-10]
Gateway->>Gateway: Slice: allThoughts.slice(-5)
Note over Gateway: Returns: last 5 thoughts
Gateway-->>Client: {count: 5, thoughts: [6,7,8,9,10]}
|
notebook, session, mental_models, and deep_analysis had no args documentation in the gateway tool description. Agents had to guess or fail once to learn the schema. Now each points to its resource or lists its args inline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7 tasks
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.
Summary
read_thoughtsrange, last N, and default queries usedgetThoughts()(main chain only). Branch thoughts were invisible despiteget_structureanddeep_analysisbeing fixed in PR fix(gateway): surface branch thoughts in get_structure, read_thoughts, deep_analysis #99.getAllThoughts()(main chain + branches), matching the fix already applied toget_structureanddeep_analysis.Test plan
🤖 Generated with Claude Code