update#321714
Conversation
…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
…nd-tests chore: add release workflow
…-documentation docs: add project documentation and pages workflow
…documentation docs: add chat architecture overview
…ate-documentation Add .env example and env setup docs
feat: add OpenAI chat client
…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
Document Git LFS usage for icon assets
…-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
There was a problem hiding this comment.
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 undersrc/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:1editor.document.getText(editor.selection)is called even whenselectionisundefined. 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 oneditor.selectionand, if available,!editor.selection.isEmpty).
src/services/openai/client.ts:1- In the “final buffer” parse,
json.usageis 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),usagewon’t be captured and debug token reporting becomes inaccurate. Mirror thejson.usageassignment here as well.
src/services/openai/client.ts:1 - This client reads
VITE_*configuration fromprocess.env, which is typically not available in browser builds (and Vite usually exposes these viaimport.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 onprocess.envin shared code.
src/services/openai/client.test.ts:1 - These tests mutate globals (
globalThis.fetch) without ensuring restoration on failure. If an assertion throws (orsendChatrejects), subsequent tests may run with the mockedfetch. Wrap the mutation/restoration in atry/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, andconsole.debugbut doesn’t guarantee restoration ifsendChatthrows or an assertion fails. Usetry/finallyto restore all mutations reliably to avoid cross-test pollution.
tests/chat.integration.test.ts:1 - This test mutates
process.env.DEBUG_CHAT,globalThis.fetch, andconsole.debugbut doesn’t guarantee restoration ifsendChatthrows or an assertion fails. Usetry/finallyto restore all mutations reliably to avoid cross-test pollution.
tests/chat.integration.test.ts:1 - This test mutates
process.env.DEBUG_CHAT,globalThis.fetch, andconsole.debugbut doesn’t guarantee restoration ifsendChatthrows or an assertion fails. Usetry/finallyto restore all mutations reliably to avoid cross-test pollution.
src/services/chat/session.ts:1 storageis resolved once at module initialization time. In environments wherelocalStoragebecomes available later (or when tests setglobalThis.localStorageafter importing this module), the code will keep using the in-memory fallback. Consider resolvinglocalStoragelazily insideloadHistory/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/filebuilds a URI from user input viajoinPath(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 ofroot) before reading, and return a clear error if it escapes the workspace.
src/vs/workbench/contrib/chat/browser/chat.contribution.ts:1p.resource.pathis 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). Bundlemarkedlocally (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). Bundlemarkedlocally (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). Bundlemarkedlocally (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 undersrc/chat/. As written,generate/runwill operate on a different folder than the compiled sources and docs describe. Point the CLI atsrc/chat(or update the rest of the repo/docs to consistently use a top-levelchat/directory).
| * 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. |
|
@rajkandula please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
No description provided.