You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/skills/README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,9 @@
1
+
---
2
+
title: GitHub Copilot Agent Skills
3
+
description: Overview of agent skills for GitHub Copilot Token Tracker extension
4
+
lastUpdated: 2026-01-26
5
+
---
6
+
1
7
# GitHub Copilot Agent Skills
2
8
3
9
This directory contains Agent Skills for GitHub Copilot and other compatible AI agents. Agent Skills are used to teach agents specialized tasks and provide domain-specific knowledge.
description: Analyzing GitHub Copilot session log files to extract token usage, model info, and interaction data. Use when working with session filesor debugging token tracking.
3
+
description: Analyzing GitHub Copilot session log files to extract token usage, model information, and interaction data. Use when working with session files, understanding the extension's log analysis methods, or debugging token tracking issues.
4
4
---
5
5
6
6
# Copilot Log Analysis Skill
@@ -16,8 +16,8 @@ The extension analyzes two types of log files:
- Anthropic: Claude Sonnet 3.5, Claude Sonnet 3.7, Claude Sonnet 4
133
-
- Google: Gemini 2.5 Pro, Gemini 3 Pro (Preview), Gemini 3 Pro
134
-
- Default fallback: gpt-4
71
+
- Fallback: parses `request.result.details` for known model patterns
72
+
- Detected patterns: GPT-3.5-Turbo, GPT-4 family (4, 4.1, 4o, 4o-mini, 5, o3-mini, o4-mini), Claude Sonnet (3.5, 3.7, 4), Gemini (2.5 Pro, 3 Pro, 3 Pro Preview); defaults to `gpt-4`
73
+
- Display name mapping in `getModelDisplayName()` (lines 1778-1811) adds variants such as GPT-5 family, Claude Haiku, Claude Opus, Gemini 3 Flash, Grok, and Raptor when present in `metadata.modelId`.
135
74
136
-
**Note**: The display name mapping in `getModelDisplayName()` includes additional model variants (GPT-5 family, Claude Haiku, Claude Opus, Gemini 3 Flash, Grok, Raptor) that may appear if specified via `metadata.modelId` but are not pattern-matched from `result.details`.
137
-
138
-
### 4. Editor Type Detection: `getEditorTypeFromPath()`
75
+
### Editor Type Detection: `getEditorTypeFromPath()`
139
76
**Location**: `src/extension.ts` (lines 111-143)
140
77
141
78
**Purpose**: Determines which VS Code variant created the session file.
@@ -151,31 +88,10 @@ Recursively scans directories for `.json` and `.jsonl` session files.
151
88
- Contains `/code/` → `'VS Code'`
152
89
- Default → `'Unknown'`
153
90
154
-
### 5. Session Title Extraction
155
-
**Location**: `src/extension.ts` in `getSessionFileDetails()` method
156
-
157
-
**Purpose**: Extracts the session title for display in diagnostics.
158
-
159
-
**How it works:**
160
-
161
-
**For JSON files:**
162
-
1. Primary: `customTitle` field from root of session object
- Iterates through `requests[].response[]` looking for `generatedTitle`
165
-
166
-
**For JSONL files (Incremental format):**
167
-
1. Primary: `customTitle` from the `kind: 0` header entry
168
-
2. Fallback: `generatedTitle` from `kind: 2` response entries
169
-
170
-
**For JSONL files (CLI format):**
171
-
- Not available (CLI sessions don't have titles)
172
-
173
-
**Note**: `customTitle` is user-defined (when they rename the session). `generatedTitle` is AI-generated summary text found in thinking blocks or tool results.
All use `getSessionFileDataCached()` (lines 732-753) which:
216
-
1. Checks cache validity using file mtime
217
-
2. Returns cached data if valid
218
-
3. Otherwise reads file and caches result
113
+
-`isCacheValid()` (lines 227-230): Validates cached entry by mtime
114
+
-`getCachedSessionData()` (lines 232-234): Retrieves cached data
115
+
-`setCachedSessionData()` (lines 236-254): Stores data with FIFO eviction after 1000 files
116
+
-`clearExpiredCache()` (lines 250-264): Drops cache entries for missing files
117
+
-`getSessionFileDataCached()` (lines 811-845): Reads session content, parses via `parseSessionFileContent()`, and caches results
219
118
220
119
## Schema Documentation
221
120
@@ -229,10 +128,10 @@ All use `getSessionFileDataCached()` (lines 732-753) which:
229
128
4.**`SCHEMA-ANALYSIS.md`**: Quick reference guide
230
129
5.**`VSCODE-VARIANTS.md`**: VS Code variant detection documentation
231
130
232
-
**Note**: The analysis JSON file is auto-generated and may not exist in fresh clones. It's created by running the schema analysis script documented in the README.
131
+
**Note**: The analysis JSON file is auto-generated and may not exist in fresh clones. It is created by running the schema analysis script documented below.
233
132
234
133
### Schema Analysis
235
-
See the **Executable Scripts** section above for three available scripts:
134
+
See the **Executable Scripts** section for available utilities:
**Introduced in**: VS Code Insiders ~0.25+ (April 2025)
294
-
295
-
This is a newer incremental format used by VS Code Insiders that logs session data progressively. Unlike the CLI format that uses `type`, this format uses `kind` to identify log entry types.
Copy file name to clipboardExpand all lines: .github/skills/refresh-json-data/README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,9 @@
1
+
---
2
+
title: Refresh JSON Data Skill
3
+
description: Instructions for refreshing token estimator and model pricing data
4
+
lastUpdated: 2026-01-26
5
+
---
6
+
1
7
# Refresh JSON Data Skill
2
8
3
9
This is a GitHub Copilot Agent Skill that provides instructions for refreshing the token estimator and model pricing data in the Copilot Token Tracker extension.
0 commit comments