feat(cloud-agent): prompt autocomplete (ghost text)#2120
Draft
markijbema wants to merge 1 commit intomainfrom
Draft
feat(cloud-agent): prompt autocomplete (ghost text)#2120markijbema wants to merge 1 commit intomainfrom
markijbema wants to merge 1 commit intomainfrom
Conversation
Implements ghost-text prompt autocomplete for the Cloud Agent chat input (based on original PR #5 by @markijbema, rebased on monorepo main). - Adds `cloudAgent.getFimAutocomplete` tRPC mutation using Mistral Codestral FIM - Adds `useChatGhostText` hook with debounced completion requests - Adds ghost text overlay rendering in `cloud-agent-next` ChatInput - Accept suggestion: Tab (all), ArrowRight (next word), Escape clears - Improves error handling in `sendProxiedChatCompletion`
|
This Pull Request has been inactive for 30 days and will be closed in 7 days if no further activity occurs. Please update or close this PR if it is no longer relevant. |
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
Recreates PR #5 by @markijbema on the monorepo main, as requested by @jeanduplessis.
cloudAgent.getFimAutocompletetRPC mutation backed by Mistral Codestral FIM endpointuseChatGhostTexthook incloud-agent-nextwith debounced completion requests and stale-request guardcloud-agent-next/ChatInput; accept with Tab (full), ArrowRight (next word), or dismiss with EscapesendProxiedChatCompletionerror handling to catch network failures and JSON parse errors gracefullyVerification
tsgo --noEmit -p apps/web/tsconfig.json)Visual Changes
N/A (ghost text overlay is invisible until a suggestion is returned)
Reviewer Notes
getFimAutocompleteendpoint usesgenerateApiTokenwithinternalApiUse: trueto bypass abuse heuristics, consistent with the original PR's intenttrpc.cloudAgent.getFimAutocomplete(notcloudAgentNext) since the FIM endpoint is user-scoped, not session-scopedsrc/components/cloud-agent/→apps/web/src/components/cloud-agent-next/andsrc/routers/→apps/web/src/routers/per monorepo structureCloses #5