Skip to content

Adding latest commands from @github/copilot-language-server #236

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

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

TerminalFi
Copy link
Owner

@TerminalFi TerminalFi commented Feb 5, 2025

Todo

  • Ability for changing model in Chat.
  • Ability for Edit Conversations
  • Ability for Generating Commit Message

@jfcherng jfcherng force-pushed the feat/copilotModels branch 2 times, most recently from 467f1fd to a94ffd7 Compare February 5, 2025 17:40
@jfcherng jfcherng force-pushed the feat/copilotModels branch 2 times, most recently from f152a88 to 9ca25e4 Compare February 5, 2025 18:09
Signed-off-by: Jack Cherng <[email protected]>
@phene
Copy link

phene commented Mar 7, 2025

What's holding up the ability to change models?

@jfcherng
Copy link
Collaborator

jfcherng commented Mar 7, 2025

What's holding up the ability to change models?

#235 should be merged first.

And it has a blocker sublimehq/sublime_text#6424 (not sure whether we can workaround this in ST)

@TerminalFi
Copy link
Owner Author

@phene Yes, as @jfcherng stated, while functionality wise this works. When we switch over to the GH provided npm package it is 200+ MB and that causes ST to fail loading the files sadly. There is technically a potential work around, and that is to change how LSP looks for these files :) But I doubt they want to diverge from the build in solution.

The other option is that we can put these new commands behind a setting, and tell the user they must provide the package and update the settings.

I highly encourage you to contribute. It would be greatly appreciated

@TerminalFi TerminalFi force-pushed the feat/copilotModels branch from 763a290 to dbc2c3b Compare May 29, 2025 05:01
@jfcherng
Copy link
Collaborator

I have update to the latest server with npm install --lockfile-version=2, which is compatible with yarn v1.

@TerminalFi TerminalFi requested a review from Copilot June 21, 2025 06:00
@TerminalFi TerminalFi self-assigned this Jun 21, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates the latest commands and edit-conversation support from the @github/copilot-language-server package.

  • Adds edit‐conversation UI, client handlers, and request/notification constants
  • Introduces GitHelper and a code‐review request function
  • Registers new commands (code review, commit generation, edit conversation, model listing) and updates package.json to use the new server

Reviewed Changes

Copilot reviewed 11 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
plugin/ui/init.py Exported WindowEditConversationManager
plugin/types.py Added TypedDicts for edit conversations and model definitions
plugin/templates/edit_conversation.md.jinja New Jinja template for the edit-conversation UI
plugin/helpers.py Added prepare_code_review_request_doc and GitHelper class
plugin/constants.py Defined new request and notification constants for edit/chat, context, git, and models
plugin/client.py Integrated edit‐conversation flow, context provider registration, and new notification handlers
plugin/init.py Registered new Copilot commands (code review, commit generation, edit conversation, models)
language-server/package.json Switched dependency to @github/copilot-language-server and bumped version
README.md Updated documentation links to point at the new language server package
Main.sublime-commands Added new entries for code review, commit generation, edit conversation, and models
LSP-copilot.sublime-settings Introduced initializationOptions for future configuration
Files not reviewed (1)
  • language-server/package-lock.json: Language not supported
Comments suppressed due to low confidence (6)

plugin/helpers.py:351

  • [nitpick] The new GitHelper class and its methods currently lack unit tests. Consider adding tests to cover key behaviors like run_git_command and get_git_changes.
class GitHelper:

plugin/helpers.py:408

  • Path is not imported in this module, which will cause a NameError. Add from pathlib import Path to the imports.
                full_path = Path(repo_root) / file_path

Main.sublime-commands:90

  • Comments using // are not valid JSON in .sublime-commands files and may break parsing; remove or convert this to a valid JSON field.
        // Debug Command

plugin/client.py:57

  • [nitpick] The imports log_info and log_debug are not used in this file; consider removing them to keep imports clean.
from .log import log_warning, log_info, log_debug

plugin/client.py:80

  • [nitpick] Imported find_window_by_id is not used anywhere in this module; it can be removed to avoid dead code.
    find_window_by_id,

plugin/templates/edit_conversation.md.jinja:84

  • Typo in UI text: Github Copilot should be GitHub Copilot to match correct branding casing.
    <img class="icon" src="{{ asset_url('github.png') }}"> Github Copilot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to @github/copilot-language-server Support for other models than GPT-4, now that Copilot allows it in VSCode ?
3 participants