-
Notifications
You must be signed in to change notification settings - Fork 499
Launch Inline Assist Commands (Ghost Writer) - Autocomplete v0.1 #1244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
🦋 Changeset detectedLatest commit: 508a760 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
893ddb6
to
1a6275b
Compare
@hassoncs Please don't merge this because the keybinding are not working properly. I'm investigating this issue |
This commit enables the Ghost Writer feature by uncommenting its registration in `extension.ts`. It also introduces internationalization (i18n) support for all Ghost Writer related strings across multiple languages, including progress messages, input prompts, commands, and chat participant details. The `package.json` is updated to include new commands, keybindings, code actions, and chat participant declarations for the Ghost Writer. The `GhostCodeActionProvider`, `GhostModel`, and `GhostProvider` classes are updated to use the new i18n strings and to properly initialize the `GhostProvider` with the extension context. The `GhostStrategy` is also updated to incorporate custom instructions into the system prompt.
* refactor: remove chat api definition * feat: ghost navigation * Update src/services/ghost/GhostProvider.ts Co-authored-by: Copilot <[email protected]> * feat: CodeLens indicator * refactor: fix commands names * refactor(ghost): rename haveSuggestions to hasSuggestions Renames the `haveSuggestions` method and related context key to `hasSuggestions` for improved clarity and consistency. This change affects the GhostProvider, GhostSuggestions, and the `package.json` and `extension.json` files where the context key is used. --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Chris Hasson <[email protected]>
e1326d7
to
fc11235
Compare
* refactor: implement fuzzy matching * refactor: implement fuzzy matching with relative path
* refactor: fix codelens ranges, lock workspaces edits, update commands * refactor: add translations of the new cmds * refactor: move the cursor to follow the suggestions * refactor: update the pending suggestion when we applied a single op group * refactor: update the pending suggestion when we applied a single op group * refactor: ghost render when active editor change * refactor: correct typo in compute operations offset method * refactor: simplify GhostProvider method calls Removed unnecessary explicit object destructuring in method calls for `provideCodeSuggestions` and `enhanceContext` to improve readability and conciseness. Also removed redundant progress report messages. --------- Co-authored-by: Chris Hasson <[email protected]>
* test(testing): add mock editor and workspace framework for services Introduce a comprehensive mock testing framework to simulate the VS Code editor and workspace environments. This allows for isolated and deterministic unit testing of services that rely on VS Code APIs. The new framework includes: - `MockTextDocument`: Simulates document content, line/range operations. - `MockTextEditor`: Encapsulates a document with cursor position. - `MockWorkspace`: Manages a collection of mock documents. - `MockWorkspaceEdit`: Simulates applying edits to the workspace. This infrastructure will be used to build out robust tests for Ghost, autocomplete, and other editor-aware services. * test(ghost): add comprehensive test suite for ghost provider This commit introduces a robust testing framework for the Ghost feature, centered around a new `MockWorkspace` that simulates the VS Code environment. This allows for isolated unit testing of the suggestion parsing and application logic. The new test suite, `GhostProvider.spec.ts`, validates various scenarios: - Simple line additions and deletions - Mixed addition/deletion operations - Complex diffs with multiple change hunks - Sequential application of individual suggestions A minor fix is also included in `GhostStrategy.ts` to handle file path URI parsing more robustly, ensuring that paths are correctly converted to URIs whether or not they already have a `file://` prefix. * refactor: wip tests * refactor: fix all existing tests * refactor: fix random suggestion apply * refactor(ghost): update default model to stable gemini-2.5-flash * refactor: simplify the logic of apply changes * refactor: fix triple slash * fix: fix workspace edit lock * Switch GhostProvider tests to be file based --------- Co-authored-by: Chris Hasson <[email protected]> Co-authored-by: Catriel Müller <[email protected]>
catrielmuller
approved these changes
Jul 16, 2025
252626d
to
0ec2d1b
Compare
0ec2d1b
to
508a760
Compare
Merged
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.
Introduces new translation keys for the "ghost" feature across all supported languages. It also updates existing translation keys related to commit message generation to use the new
t()
function for internationalization.The changes include:
ghost
object withprogress
,input
,commands
,errors
,codeAction
,chatParticipant
, andmessages
keys to allkilocode.json
files.activationFailed
andproviderRegistered
keys in various languages.t()
function calls inGhostCodeActionProvider
,GhostModel
,GhostProvider
, andindex.ts
to use the new translation keys for UI elements and messages.extension.json
to match the rest## Context