Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 17, 2026

Session summaries now show a button to load detailed logs on demand instead of auto-scrolling. Background sessions without PR data use VS Code's LLM API to generate summaries from logs.

Changes

Content Loading

  • Summary loads first with button only - detailed logs hidden initially
  • Button click triggers state change and content refresh via onDidChangeChatSessionOptions
  • Second load includes full session history with tool calls and interactions

LLM Integration

  • Uses vscode.lm.selectChatModels with GPT-4o, falls back to any Copilot model
  • Parses session logs to extract tool calls and agent output
  • Generates 1-2 sentence user-focused summaries (max 300 chars)

State Management

// Track which sessions show full logs
private readonly sessionShowFullLogsMap = new ResourceMap<boolean>();

// Toggle and refresh
showFullLogs(sessionResourceUri: string) {
  this.sessionShowFullLogsMap.set(resource, true);
  this._onDidChangeChatSessionOptions.fire({ resource, updates: [] });
}

Conditional History Building

buildSessionHistory(..., options?: { 
  includeSummary?: boolean;
  includeDetailedLogs?: boolean 
})

// Early return if summary-only
if (options?.includeSummary && !options?.includeDetailedLogs) {
  return [summaryTurn];
}

Example Output

Cloud Session (with PR)

## 📋 Session Summary

**Goal:** Add authentication to API endpoints
✅ **Status:** Completed
**What it does:** Implements JWT-based authentication middleware...
**Changes Made:** 8 files modified (+247 / -12 lines)

[View Session Log] ← Button

Background Session (LLM-generated)

## 📋 Session Summary

**Goal:** Fix database connection issues
✅ **Status:** Completed
**What it does:** Updated connection pool settings and added retry logic to handle transient failures.

[View Session Log] ← Button

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add summary view for background and cloud sessions Add summary view for background and cloud agent sessions Jan 17, 2026
Copilot AI requested a review from pierceboggan January 17, 2026 05:36
Copilot AI changed the title Add summary view for background and cloud agent sessions Add on-demand detailed logs with button and LLM summaries for background sessions Jan 18, 2026
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.

2 participants