Skip to content

Conversation

@ulugbekna
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings January 29, 2026 13:21
@ulugbekna ulugbekna enabled auto-merge January 29, 2026 13:21
@ulugbekna ulugbekna self-assigned this Jan 29, 2026
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 29, 2026
Copy link
Contributor

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 change threads a structured logger through the ghost-text inline completions pipeline so that ghost-text behavior can be traced and correlated with GhostTextLogContext for easier diagnostics.

Changes:

  • Injects ILogService / ILogger into the inline completions stack (node chat lib, VS Code extension provider, and core lib) and passes it down to GhostText and GhostTextComputer.
  • Extends GhostTextComputer and related code paths to use sub-loggers and adds detailed trace/debug logging at key decision points (caching, async wait, network fetch, post-processing, speculative requests).
  • Updates tests and helper utilities to construct or retrieve ILogService/ILogger and call the new getGhostText / getInlineCompletions signatures.

Reviewed changes

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

Show a summary per file
File Description
src/lib/node/chatLibMain.ts Wires ILogService into the node inline completions provider and passes it to GhostText.getInlineCompletions so lib calls participate in the new logging pipeline.
src/extension/completions-core/vscode-node/lib/src/inlineCompletion.ts Extends GhostText.getInlineCompletions and its internal result helper to accept an ILogger and forward it into getGhostText, including speculative request callbacks.
src/extension/completions-core/vscode-node/lib/src/ghostText/ghostText.ts Adds a parent ILogger parameter to GhostTextComputer.getGhostText / getGhostTextWithoutAbortHandling, uses sub-loggers, and enriches logging throughout prompt building, cache usage, async waits, network calls, and result processing.
src/extension/completions-core/vscode-node/lib/src/test/inlineCompletion.test.ts Adjusts tests to fetch an ILogService from the testing service collection and call GhostText.getInlineCompletions with the new logger argument.
src/extension/completions-core/vscode-node/lib/src/prompt/test/prompt.ts Updates test helper to resolve ILogService and pass it into getGhostText so prompt/ghost text tests compile with the new signature.
src/extension/completions-core/vscode-node/lib/src/ghostText/test/ghostText.test.ts Updates isolated ghost-text tests to obtain ILogService from the test accessor and supply it to getGhostText, including speculative call paths.
src/extension/completions-core/vscode-node/lib/src/ghostText/ghostText.ts (bottom getGhostText free function) Extends the exported getGhostText helper with an ILogger parameter and passes it to GhostTextComputer.getGhostText.
src/extension/completions-core/vscode-node/extension/src/vscodeInlineCompletionItemProvider.ts Injects ILogService into the VS Code inline completion provider, introduces an ILogger field, creates a per-request sub-logger that also logs into GhostTextLogContext with timestamps, and threads the logger to GhostTextProvider.
src/extension/completions-core/vscode-node/extension/src/ghostText/ghostTextProvider.ts Adds an ILogger parameter to provideInlineCompletionItems, creates a provider-specific sub-logger, and forwards it to GhostText.getInlineCompletions.

Comment on lines +227 to 230
parentLogger: ILogger,
): Promise<GhostTextResultWithTelemetry<[CompletionResult[], ResultType]>> {
const logger = parentLogger.createSubLogger(['GhostTextComputer', 'getGhostText']);
let start = preIssuedTelemetryDataWithExp.issuedTime; // Start before getting exp assignments
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

getGhostText already creates a sub-logger with the ['GhostTextComputer', 'getGhostText'] topics and passes it as parentLogger, but getGhostTextWithoutAbortHandling calls createSubLogger with the same topics again, which will duplicate the prefix in log messages and create an extra unnecessary logger wrapper. Consider either passing the root logger into getGhostTextWithoutAbortHandling or reusing parentLogger directly here to avoid the redundant sub-logger creation.

Copilot uses AI. Check for mistakes.
@ulugbekna ulugbekna added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit d88cb24 Jan 29, 2026
25 checks passed
@ulugbekna ulugbekna deleted the ulugbekna/ghost-provideInlineEdit-3 branch January 29, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants