Skip to content

update#321714

Open
rajkandula wants to merge 70 commits into
microsoft:mainfrom
rajkandula:main
Open

update#321714
rajkandula wants to merge 70 commits into
microsoft:mainfrom
rajkandula:main

Conversation

@rajkandula

Copy link
Copy Markdown

No description provided.

…ts-in-setup.md

docs: document build prerequisites
…ssets-nbn8v4

chore: store icons via git-lfs
…ts-in-telemetryservice

Allow telemetry endpoint override and document privacy
…ure-changes

feat: add capitalize utility
…ensions

chore: add curated sample extension
…-documentation

docs: add project documentation and pages workflow
…documentation

docs: add chat architecture overview
…ate-documentation

Add .env example and env setup docs
…cecontext-and-buildpromptwithcontext

feat: add workspace context collector
…th-ui-features

feat: add simple chat side panel
…n-and-history-storage

Handle chat session persistence and streaming
…tion-and-examples

docs: add chat usage guide
…ile-fetch-and-search

feat: add chat file and search commands
…d-.env.example

docs: document setup commands and sample env config
…e-at-startup

feat: show chat container on startup
…o-simplechatviewpane

feat: apply theme to simple chat input
…ines-and-directory

Add documentation scaffolding and policy
…-instructions

Update README setup guidance
…mmand-execution

Add command parsing and terminal execution guard
…r-fancy-chat

Add fancy chat activation extension
…-instructions-nxif1l

Clarify chat setup guidance
…mand-execution

Add guard for auto executing chat commands
…r-fancy-chat-xkd6xy

Add Fancy Chat extension activation and build plumbing
Copilot AI review requested due to automatic review settings June 17, 2026 03:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR adds a “Simple Chat” experience (view + extension UI), introduces OpenAI chat clients and workspace-context utilities, and expands documentation/build plumbing (telemetry endpoint override, bundled extensions, docs + workflows).

Changes:

  • Add a new Simple Chat view container/view pane + CSS and ensure the Chat container remains visible on first launch.
  • Add OpenAI chat client(s), context collection, session persistence, and new slash commands (/file, /search) with accompanying tests.
  • Add docs, CI workflows (docs deploy + release), extension scaffolding, and telemetry endpoint env override.

Reviewed changes

Copilot reviewed 58 out of 63 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/chat.integration.test.ts Adds an integration test for OpenAI streaming debug logging.
src/vs/workbench/contrib/chat/browser/simpleChatView.ts Implements a simple chat view pane UI with fake API and markdown rendering.
src/vs/workbench/contrib/chat/browser/simpleChat.contribution.ts Registers the Simple Chat view container and view.
src/vs/workbench/contrib/chat/browser/media/simpleChat.css Adds styling for the simple chat UI.
src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.ts Keeps chat container visible even if empty.
src/vs/workbench/contrib/chat/browser/chat.contribution.ts Wires in simple chat contribution + adds /file and /search slash commands.
src/vs/platform/telemetry/common/telemetryService.ts Allows telemetry endpoint override/disable via VSCODE_TELEMETRY_ENDPOINT.
src/vs/base/test/common/strings.test.ts Adds tests for new capitalize string helper.
src/vs/base/common/strings.ts Adds capitalize() helper (and adjusts stripWildcards formatting).
src/tsconfig.json Adjusts TS include globs (adds ./chat/**/*.ts).
src/services/openai/client.ts Adds an OpenAI Chat Completions client with streaming parsing + debug metrics.
src/services/openai/client.test.ts Adds unit tests for OpenAI client streaming/non-streaming/error behavior.
src/services/context/context.ts Adds workspace context collection + prompt building utilities.
src/services/context/context.test.ts Adds unit tests for workspace context collection + truncation.
src/services/chat/session.ts Adds chat session history persistence + prompt submission orchestration.
src/services/chat/session.test.ts Adds tests for session submission/persistence/streaming hook.
src/chat/ui/panel.ts Adds a VS Code webview chat panel implementation (extension UI).
src/chat/test/runnableSnippets.test.ts Adds tests for runnable command extraction behavior.
src/chat/test/promptProcessor.test.ts Adds tests for prompt intent analysis + enhancement.
src/chat/test/commandParser.test.ts Adds tests for command parsing and precedence.
src/chat/services/openaiClient.ts Adds a streaming OpenAI client for the extension webview path.
src/chat/services/contextCollector.ts Adds VS Code editor context collection for prompts.
src/chat/promptProcessor.ts Adds prompt analysis + enhancement logic for extension chat.
src/chat/extension.ts Adds activation entry for the Fancy Chat extension command.
src/chat/commandParser.ts Adds runnable command extraction helper used by the extension.
scripts/chat-cli.js Adds a helper CLI to scaffold/watch a chat directory.
resources/icon-server.png Adds LFS-tracked icon asset pointer.
resources/icon-linux.png Adds LFS-tracked icon asset pointer.
extensions/fancy-chat/tsconfig.json Adds TS config for building the Fancy Chat bundled extension.
extensions/fancy-chat/package.json Adds Fancy Chat extension manifest + configuration.
extensions/curated-sample/tsconfig.json Adds TS config for a curated sample bundled extension.
extensions/curated-sample/src/extension.ts Adds a minimal curated sample extension implementation.
extensions/curated-sample/package.json Adds curated sample extension manifest + scripts.
extensions/curated-sample/README.md Documents curated sample extension purpose/config.
docs/setup.md Adds developer setup instructions + env var guidance + manual test.
docs/release-process.md Adds a release process guide aligned to the workflow.
docs/privacy.md Documents telemetry endpoint opt-out via env var.
docs/overview.md Adds a docs overview entrypoint.
docs/index.md Adds docs index page.
docs/features/string-capitalize.md Documents new capitalize helper.
docs/extensions.md Documents bundled/curated extensions.
docs/contribution.md Adds docs-level contribution guidance pointer.
docs/chat/usage.md Adds chat usage guide (opening/config/workflows).
docs/chat/debugging.md Adds chat debugging guide (API key/network/context).
docs/chat/commands.md Documents slash commands including /file and /search.
docs/chat/cli.md Documents the chat CLI helper.
docs/chat/chat-bar.svg Adds an SVG illustration for the chat bar.
docs/chat/architecture.md Adds a high-level chat architecture doc.
docs/branding.md Documents Git LFS policy for resources/*.png.
docs/architecture.md Adds a high-level repository architecture doc.
build/gulpfile.extensions.js Adds new extension compilations and source override for Fancy Chat.
README.md Replaces upstream README with repo-specific overview + chat setup.
NOTICE.md Adds notice about upstream modifications + telemetry endpoint override.
CONTRIBUTING.md Adds doc-update requirement for feature PRs (duplicated line present).
CHANGELOG.md Adds initial changelog entry for capitalize.
.gitignore Ignores .env.
.github/workflows/release.yml Adds a tag-based release build workflow with signing + GitHub Release.
.github/workflows/docs.yml Adds GitHub Pages deploy workflow for docs/.
.gitattributes Adds Git LFS rule for resources/*.png.
.env.example Adds example env vars for chat configuration.
Comments suppressed due to low confidence (15)

src/tsconfig.json:1

  • src/services/** is not included in this TS project, but this PR adds new TypeScript modules under src/services/ (e.g. src/services/openai/client.ts, src/services/chat/session.ts, src/services/context/context.ts). Unless there is another tsconfig compiling these paths, this will break builds/typechecking. Add an include glob for ./services/**/*.ts (or a broader include that matches the repo’s convention) so the new service code is compiled consistently.
    src/services/context/context.ts:1
  • editor.document.getText(editor.selection) is called even when selection is undefined. In VS Code, getText(undefined) returns the full document text, which would incorrectly duplicate the entire file under “Selected Text”. Only read selected text when a real non-empty selection exists (e.g., guard on editor.selection and, if available, !editor.selection.isEmpty).
    src/services/openai/client.ts:1
  • In the “final buffer” parse, json.usage is not handled, while it is handled in the main loop. If the stream ends with a usage-only event (or any usage event without a trailing newline), usage won’t be captured and debug token reporting becomes inaccurate. Mirror the json.usage assignment here as well.
    src/services/openai/client.ts:1
  • This client reads VITE_* configuration from process.env, which is typically not available in browser builds (and Vite usually exposes these via import.meta.env). If this module is intended to run in the web UI, it will fail at runtime or ship an empty Authorization header. Consider injecting the key via the platform’s configuration/secret storage path for desktop, and using the web build’s env mechanism (or a server-side proxy) rather than relying on process.env in shared code.
    src/services/openai/client.test.ts:1
  • These tests mutate globals (globalThis.fetch) without ensuring restoration on failure. If an assertion throws (or sendChat rejects), subsequent tests may run with the mocked fetch. Wrap the mutation/restoration in a try/finally (or use the test runner’s cleanup hooks) to guarantee cleanup.
    tests/chat.integration.test.ts:1
  • This test mutates process.env.DEBUG_CHAT, globalThis.fetch, and console.debug but doesn’t guarantee restoration if sendChat throws or an assertion fails. Use try/finally to restore all mutations reliably to avoid cross-test pollution.
    tests/chat.integration.test.ts:1
  • This test mutates process.env.DEBUG_CHAT, globalThis.fetch, and console.debug but doesn’t guarantee restoration if sendChat throws or an assertion fails. Use try/finally to restore all mutations reliably to avoid cross-test pollution.
    tests/chat.integration.test.ts:1
  • This test mutates process.env.DEBUG_CHAT, globalThis.fetch, and console.debug but doesn’t guarantee restoration if sendChat throws or an assertion fails. Use try/finally to restore all mutations reliably to avoid cross-test pollution.
    src/services/chat/session.ts:1
  • storage is resolved once at module initialization time. In environments where localStorage becomes available later (or when tests set globalThis.localStorage after importing this module), the code will keep using the in-memory fallback. Consider resolving localStorage lazily inside loadHistory/saveHistory, or allow injecting a storage implementation for deterministic behavior in tests and different runtimes.
    src/vs/workbench/contrib/chat/browser/chat.contribution.ts:1
  • /file builds a URI from user input via joinPath(root, path) without guarding against .. segments or absolute-path style input. That can enable reading files outside the workspace folder (depending on URI normalization and file service behavior). Normalize and validate that the resolved resource is within the workspace root (e.g., ensure it isEqualOrParent of root) before reading, and return a clear error if it escapes the workspace.
    src/vs/workbench/contrib/chat/browser/chat.contribution.ts:1
  • p.resource.path is the URI path, which is not a user-friendly filesystem path on Windows and may include leading slashes/URI encoding. For workspace search results, prefer a filesystem path (fsPath) or a workspace-relative label (via label service / workspace context utilities) so results are readable and clickable across platforms.
    src/chat/ui/panel.ts:1
  • The webview loads a remote script from a CDN and renders untrusted model output via innerHTML. This combination is a common webview security risk (supply-chain + HTML injection). Bundle marked locally (or use a trusted built-in markdown renderer), tighten CSP to avoid remote script sources, and sanitize rendered HTML (or render as text/DOM nodes) before inserting into the DOM.
    src/chat/ui/panel.ts:1
  • The webview loads a remote script from a CDN and renders untrusted model output via innerHTML. This combination is a common webview security risk (supply-chain + HTML injection). Bundle marked locally (or use a trusted built-in markdown renderer), tighten CSP to avoid remote script sources, and sanitize rendered HTML (or render as text/DOM nodes) before inserting into the DOM.
    src/chat/ui/panel.ts:1
  • The webview loads a remote script from a CDN and renders untrusted model output via innerHTML. This combination is a common webview security risk (supply-chain + HTML injection). Bundle marked locally (or use a trusted built-in markdown renderer), tighten CSP to avoid remote script sources, and sanitize rendered HTML (or render as text/DOM nodes) before inserting into the DOM.
    scripts/chat-cli.js:1
  • The CLI writes to a top-level chat/ directory, but the new chat TypeScript sources in this PR live under src/chat/. As written, generate/run will operate on a different folder than the compiled sources and docs describe. Point the CLI at src/chat (or update the rest of the repo/docs to consistently use a top-level chat/ directory).

Comment thread CONTRIBUTING.md
Comment on lines +68 to +71
* Feature pull requests must update or add relevant documentation in the `docs/` directory.
* Documentation completeness is reviewed at each project milestone.

* Feature pull requests must update or create relevant documentation in the docs/ directory. Documentation completeness is reviewed at each project milestone.
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

@rajkandula please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"
Contributor License Agreement

Contribution License Agreement

This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
and conveys certain license rights to Microsoft Corporation and its affiliates (“Microsoft”) for Your
contributions to Microsoft open source projects. This Agreement is effective as of the latest signature
date below.

  1. Definitions.
    “Code” means the computer software code, whether in human-readable or machine-executable form,
    that is delivered by You to Microsoft under this Agreement.
    “Project” means any of the projects owned or managed by Microsoft and offered under a license
    approved by the Open Source Initiative (www.opensource.org).
    “Submit” is the act of uploading, submitting, transmitting, or distributing code or other content to any
    Project, including but not limited to communication on electronic mailing lists, source code control
    systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of
    discussing and improving that Project, but excluding communication that is conspicuously marked or
    otherwise designated in writing by You as “Not a Submission.”
    “Submission” means the Code and any other copyrightable material Submitted by You, including any
    associated comments and documentation.
  2. Your Submission. You must agree to the terms of this Agreement before making a Submission to any
    Project. This Agreement covers any and all Submissions that You, now or in the future (except as
    described in Section 4 below), Submit to any Project.
  3. Originality of Work. You represent that each of Your Submissions is entirely Your original work.
    Should You wish to Submit materials that are not Your original work, You may Submit them separately
    to the Project if You (a) retain all copyright and license information that was in the materials as You
    received them, (b) in the description accompanying Your Submission, include the phrase “Submission
    containing materials of a third party:” followed by the names of the third party and any licenses or other
    restrictions of which You are aware, and (c) follow any other instructions in the Project’s written
    guidelines concerning Submissions.
  4. Your Employer. References to “employer” in this Agreement include Your employer or anyone else
    for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your
    Submission is made in the course of Your work for an employer or Your employer has intellectual
    property rights in Your Submission by contract or applicable law, You must secure permission from Your
    employer to make the Submission before signing this Agreement. In that case, the term “You” in this
    Agreement will refer to You and the employer collectively. If You change employers in the future and
    desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement
    and secure permission from the new employer before Submitting those Submissions.
  5. Licenses.
  • Copyright License. You grant Microsoft, and those who receive the Submission directly or
    indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the
    Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute
    the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third
    parties.
  • Patent License. You grant Microsoft, and those who receive the Submission directly or
    indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under
    Your patent claims that are necessarily infringed by the Submission or the combination of the
    Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and
    import or otherwise dispose of the Submission alone or with the Project.
  • Other Rights Reserved. Each party reserves all rights not expressly granted in this Agreement.
    No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are
    granted by implication, exhaustion, estoppel or otherwise.
  1. Representations and Warranties. You represent that You are legally entitled to grant the above
    licenses. You represent that each of Your Submissions is entirely Your original work (except as You may
    have disclosed under Section 3). You represent that You have secured permission from Your employer to
    make the Submission in cases where Your Submission is made in the course of Your work for Your
    employer or Your employer has intellectual property rights in Your Submission by contract or applicable
    law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You
    have the necessary authority to bind the listed employer to the obligations contained in this Agreement.
    You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS
    REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES
    EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS
    PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF
    NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
  2. Notice to Microsoft. You agree to notify Microsoft in writing of any facts or circumstances of which
    You later become aware that would make Your representations in this Agreement inaccurate in any
    respect.
  3. Information about Submissions. You agree that contributions to Projects and information about
    contributions may be maintained indefinitely and disclosed publicly, including Your name and other
    information that You submit with Your Submission.
  4. Governing Law/Jurisdiction. This Agreement is governed by the laws of the State of Washington, and
    the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County,
    Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to
    exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all
    defenses of lack of personal jurisdiction and forum non-conveniens.
  5. Entire Agreement/Assignment. This Agreement is the entire agreement between the parties, and
    supersedes any and all prior agreements, understandings or communications, written or oral, between
    the parties relating to the subject matter hereof. This Agreement may be assigned by Microsoft.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants