Skip to content

[Bug] Conversation templates and skills do not update dynamically on project lifecycle changes #446

Description

Currently, when Eclipse starts with an empty workspace (or when projects are imported, opened, closed, or deleted during a session), conversation templates, including slash commands (/), custom prompts, and skills, do not update until Eclipse is completely restarted.

Root Cause

  1. ChatCompletionService initializes its workspace list using LSPEclipseUtils.getWorkspaceFolders(), which holds a static startup snapshot from LSP4E and does not update when projects are imported or opened at runtime.
  2. ChatCompletionService does not register an IResourceChangeListener on ResourcesPlugin.getWorkspace(), so project lifecycle events (adding, removing, opening, or closing projects) never trigger a re-fetch of templates from the language server.

(Note: There is also an upstream language server issue where conversation/templates skips global skills when workspaceFolders is empty, but the Eclipse client must also dynamically refresh its templates whenever workspace projects change).

Steps to Reproduce

  1. Start Eclipse with an empty workspace (no open projects).
  2. Open Copilot Chat and type / in the input box (observe the initial command list).
  3. Import or open a project containing prompts (.github/prompts/) or skills (.github/skills/).
  4. Type / in Copilot Chat again.

Expected behavior:
The newly imported project's prompts and skills appear in the / completion list dynamically.

Actual behavior:
The completion list remains unchanged until Eclipse is restarted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions