feat(client): add variable autocompletion to JSON body#3
Merged
Conversation
- Add reference variable support to JSON body editor
- Combine CodeMirror JSON syntax highlighting with variable autocompletion
- Maintain same JSON formatting while enabling {{variable}} suggestions
- Enable consistent variable usage between request headers and body
Added support for variable autocompletion inside JSON strings by: 1. Enhanced token detection to handle JSON string context 2. Added completion triggers specifically for JSON strings 3. Removed constraint that limited completions to Reference tokens only 4. Added null check to prevent TypeError when syntax tree is unavailable
Tomaszal
added a commit
that referenced
this pull request
May 6, 2025
Unsafe and likely incorrect code was generated by Claude AI, but it works so it is used a stopgap
Contributor
|
Claude AI is not very good with more complex libraries like CodeMirror. There were a lot of type errors, as it hallucinated non-existing APIs, so I'm surprised it works at all. We'll definitely need to improve this implementation once there's time |
ElecTwix
pushed a commit
that referenced
this pull request
Jul 30, 2025
…tion feat(client): add variable autocompletion to JSON body
ElecTwix
pushed a commit
that referenced
this pull request
Jul 30, 2025
Unsafe and likely incorrect code was generated by Claude AI, but it works so it is used a stopgap
ElecTwix
added a commit
that referenced
this pull request
Jan 26, 2026
Implement POC #4 and #5 for improved AI tool discovery: - Add AIParam struct with typed parameters (name, description, type) - Add SourceHint field for auto-chaining between tools - Create {{ ai('name', 'desc', 'type', 'source') }} syntax parser - Add AIParamProvider interface for nodes to declare parameters - Add DescribableNode interface for custom tool descriptions - Add discover_tools function for on-demand tool discovery (POC #3) - Create AI expression functions (ai, aivar, airef, aidesc, aichain) - Add comprehensive integration tests comparing 5 POC approaches Test results show POC #4+#5 combination is most effective: - Typed params give AI clear input requirements - SourceHint tells AI exactly where to get chained values - Reduces tool calls and improves success rate
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.
By submitting a PR to this repository, you agree to the terms within the Contributor Covenant Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.
Description
References
Testing
Checklist