cc-proficiency 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -18
- package/README.zh-CN.md +36 -10
- package/dist/cli/commands/achievements.d.ts.map +1 -1
- package/dist/cli/commands/achievements.js +1 -0
- package/dist/cli/commands/achievements.js.map +1 -1
- package/dist/cli/commands/analyze.d.ts.map +1 -1
- package/dist/cli/commands/analyze.js +14 -2
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cli/commands/badge.d.ts.map +1 -1
- package/dist/cli/commands/badge.js +8 -2
- package/dist/cli/commands/badge.js.map +1 -1
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/config.js +4 -0
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/explain.js +1 -1
- package/dist/cli/commands/explain.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +7 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/leaderboard.d.ts +2 -0
- package/dist/cli/commands/leaderboard.d.ts.map +1 -0
- package/dist/cli/commands/leaderboard.js +58 -0
- package/dist/cli/commands/leaderboard.js.map +1 -0
- package/dist/cli/commands/process.d.ts.map +1 -1
- package/dist/cli/commands/process.js +25 -5
- package/dist/cli/commands/process.js.map +1 -1
- package/dist/cli/commands/refresh.d.ts +7 -0
- package/dist/cli/commands/refresh.d.ts.map +1 -0
- package/dist/cli/commands/refresh.js +66 -0
- package/dist/cli/commands/refresh.js.map +1 -0
- package/dist/cli/commands/share.d.ts +2 -0
- package/dist/cli/commands/share.d.ts.map +1 -0
- package/dist/cli/commands/share.js +129 -0
- package/dist/cli/commands/share.js.map +1 -0
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +1 -0
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/update.d.ts +2 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +40 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/index.js +38 -19
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/services/hooks.d.ts.map +1 -1
- package/dist/cli/services/hooks.js +36 -18
- package/dist/cli/services/hooks.js.map +1 -1
- package/dist/cli/services/leaderboard.d.ts +11 -0
- package/dist/cli/services/leaderboard.d.ts.map +1 -0
- package/dist/cli/services/leaderboard.js +120 -0
- package/dist/cli/services/leaderboard.js.map +1 -0
- package/dist/cli/services/publishing.d.ts +16 -0
- package/dist/cli/services/publishing.d.ts.map +1 -1
- package/dist/cli/services/publishing.js +88 -39
- package/dist/cli/services/publishing.js.map +1 -1
- package/dist/cli/services/self-update.d.ts +14 -0
- package/dist/cli/services/self-update.d.ts.map +1 -0
- package/dist/cli/services/self-update.js +45 -0
- package/dist/cli/services/self-update.js.map +1 -0
- package/dist/cli/services/sessions.d.ts +1 -0
- package/dist/cli/services/sessions.d.ts.map +1 -1
- package/dist/cli/services/sessions.js +15 -2
- package/dist/cli/services/sessions.js.map +1 -1
- package/dist/cli/utils/formatting.d.ts +2 -2
- package/dist/cli/utils/formatting.d.ts.map +1 -1
- package/dist/cli/utils/formatting.js +7 -1
- package/dist/cli/utils/formatting.js.map +1 -1
- package/dist/cli/utils/update-check.d.ts +9 -0
- package/dist/cli/utils/update-check.d.ts.map +1 -0
- package/dist/cli/utils/update-check.js +124 -0
- package/dist/cli/utils/update-check.js.map +1 -0
- package/dist/cli/utils/version.d.ts +2 -0
- package/dist/cli/utils/version.d.ts.map +1 -0
- package/dist/cli/utils/version.js +16 -0
- package/dist/cli/utils/version.js.map +1 -0
- package/dist/gist/registry.d.ts +26 -0
- package/dist/gist/registry.d.ts.map +1 -0
- package/dist/gist/registry.js +101 -0
- package/dist/gist/registry.js.map +1 -0
- package/dist/gist/uploader.d.ts +9 -1
- package/dist/gist/uploader.d.ts.map +1 -1
- package/dist/gist/uploader.js +47 -1
- package/dist/gist/uploader.js.map +1 -1
- package/dist/hooks/token-refresh.js +72 -0
- package/dist/i18n/locales.d.ts.map +1 -1
- package/dist/i18n/locales.js +2 -1
- package/dist/i18n/locales.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/parsers/config-detectors.d.ts +29 -0
- package/dist/parsers/config-detectors.d.ts.map +1 -0
- package/dist/parsers/config-detectors.js +367 -0
- package/dist/parsers/config-detectors.js.map +1 -0
- package/dist/parsers/config-parser.d.ts +7 -2
- package/dist/parsers/config-parser.d.ts.map +1 -1
- package/dist/parsers/config-parser.js +31 -229
- package/dist/parsers/config-parser.js.map +1 -1
- package/dist/parsers/transcript-parser.d.ts.map +1 -1
- package/dist/parsers/transcript-parser.js +10 -0
- package/dist/parsers/transcript-parser.js.map +1 -1
- package/dist/renderer/animated-svg.d.ts +9 -0
- package/dist/renderer/animated-svg.d.ts.map +1 -0
- package/dist/renderer/animated-svg.js +125 -0
- package/dist/renderer/animated-svg.js.map +1 -0
- package/dist/renderer/svg.d.ts +33 -5
- package/dist/renderer/svg.d.ts.map +1 -1
- package/dist/renderer/svg.js +77 -55
- package/dist/renderer/svg.js.map +1 -1
- package/dist/scoring/engine.d.ts +1 -1
- package/dist/scoring/engine.d.ts.map +1 -1
- package/dist/scoring/engine.js +30 -8
- package/dist/scoring/engine.js.map +1 -1
- package/dist/scoring/feature-scores.d.ts +27 -0
- package/dist/scoring/feature-scores.d.ts.map +1 -0
- package/dist/scoring/feature-scores.js +63 -0
- package/dist/scoring/feature-scores.js.map +1 -0
- package/dist/scoring/rules.d.ts.map +1 -1
- package/dist/scoring/rules.js +12 -0
- package/dist/scoring/rules.js.map +1 -1
- package/dist/scoring/signals.js +2 -0
- package/dist/scoring/signals.js.map +1 -1
- package/dist/store/achievements.d.ts.map +1 -1
- package/dist/store/achievements.js +8 -0
- package/dist/store/achievements.js.map +1 -1
- package/dist/store/config-sync.d.ts +36 -0
- package/dist/store/config-sync.d.ts.map +1 -0
- package/dist/store/config-sync.js +161 -0
- package/dist/store/config-sync.js.map +1 -0
- package/dist/store/local-store.d.ts +6 -1
- package/dist/store/local-store.d.ts.map +1 -1
- package/dist/store/local-store.js +74 -3
- package/dist/store/local-store.js.map +1 -1
- package/dist/store/public-profile.d.ts +12 -0
- package/dist/store/public-profile.d.ts.map +1 -0
- package/dist/store/public-profile.js +50 -0
- package/dist/store/public-profile.js.map +1 -0
- package/dist/store/queue.js +1 -1
- package/dist/store/queue.js.map +1 -1
- package/dist/store/remote-store.d.ts +8 -1
- package/dist/store/remote-store.d.ts.map +1 -1
- package/dist/store/remote-store.js +32 -4
- package/dist/store/remote-store.js.map +1 -1
- package/dist/types.d.ts +77 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/format.d.ts +6 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +15 -0
- package/dist/utils/format.js.map +1 -0
- package/hooks/token-refresh.ts +75 -0
- package/package.json +1 -1
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseClaudeConfig = parseClaudeConfig;
|
|
4
4
|
exports.buildSetupChecklist = buildSetupChecklist;
|
|
5
|
-
const
|
|
6
|
-
const node_path_1 = require("node:path");
|
|
7
|
-
const node_os_1 = require("node:os");
|
|
8
|
-
const CLAUDE_DIR = (0, node_path_1.join)((0, node_os_1.homedir)(), ".claude");
|
|
5
|
+
const config_detectors_js_1 = require("./config-detectors.js");
|
|
9
6
|
function emptySignals() {
|
|
10
7
|
return {
|
|
11
8
|
hasGlobalClaudeMd: false,
|
|
@@ -16,240 +13,43 @@ function emptySignals() {
|
|
|
16
13
|
pluginCount: 0,
|
|
17
14
|
pluginNames: [],
|
|
18
15
|
hasRulesFiles: false,
|
|
16
|
+
rulesFileCount: 0,
|
|
19
17
|
hasMcpServers: false,
|
|
20
18
|
hasMemoryFiles: false,
|
|
21
19
|
memoryFileCount: 0,
|
|
22
20
|
activeMemoryFileCount: 0,
|
|
23
21
|
effortLevel: "",
|
|
22
|
+
hasCustomAgents: false,
|
|
23
|
+
hasCustomSkills: false,
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
function parseGlobalClaudeMd(result) {
|
|
27
|
-
const globalClaudeMd = (0, node_path_1.join)(CLAUDE_DIR, "CLAUDE.md");
|
|
28
|
-
if (!(0, node_fs_1.existsSync)(globalClaudeMd))
|
|
29
|
-
return;
|
|
30
|
-
result.hasGlobalClaudeMd = true;
|
|
31
|
-
try {
|
|
32
|
-
const content = (0, node_fs_1.readFileSync)(globalClaudeMd, "utf-8");
|
|
33
|
-
result.globalClaudeMdHasImports =
|
|
34
|
-
content.includes("@import") ||
|
|
35
|
-
content.includes("<!-- import") ||
|
|
36
|
-
content.includes("## ") && content.split("## ").length > 3;
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
// can't read — still counts as existing
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function parseSettings(result) {
|
|
43
|
-
const settingsPath = (0, node_path_1.join)(CLAUDE_DIR, "settings.json");
|
|
44
|
-
if (!(0, node_fs_1.existsSync)(settingsPath))
|
|
45
|
-
return;
|
|
46
|
-
try {
|
|
47
|
-
const settings = JSON.parse((0, node_fs_1.readFileSync)(settingsPath, "utf-8"));
|
|
48
|
-
if (settings.enabledPlugins) {
|
|
49
|
-
const names = Object.keys(settings.enabledPlugins).filter((k) => settings.enabledPlugins[k] === true);
|
|
50
|
-
result.pluginCount = names.length;
|
|
51
|
-
result.pluginNames = names;
|
|
52
|
-
}
|
|
53
|
-
result.effortLevel = settings.effortLevel ?? "";
|
|
54
|
-
if (settings.hooks) {
|
|
55
|
-
const allHooks = Object.values(settings.hooks);
|
|
56
|
-
let totalHooks = 0;
|
|
57
|
-
let matcherHooks = 0;
|
|
58
|
-
for (const eventHooks of allHooks) {
|
|
59
|
-
if (!Array.isArray(eventHooks))
|
|
60
|
-
continue;
|
|
61
|
-
for (const hookGroup of eventHooks) {
|
|
62
|
-
const group = hookGroup;
|
|
63
|
-
if (group.hooks) {
|
|
64
|
-
totalHooks += group.hooks.length;
|
|
65
|
-
if (group.matcher)
|
|
66
|
-
matcherHooks += group.hooks.length;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
result.hasCustomHooks = totalHooks > 0;
|
|
71
|
-
result.hookWithMatcherCount = matcherHooks;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
catch {
|
|
75
|
-
// settings unreadable
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
function parsePluginHooks(result) {
|
|
79
|
-
const pluginCacheDir = (0, node_path_1.join)(CLAUDE_DIR, "plugins", "cache");
|
|
80
|
-
if (!(0, node_fs_1.existsSync)(pluginCacheDir))
|
|
81
|
-
return;
|
|
82
|
-
try {
|
|
83
|
-
for (const marketplace of (0, node_fs_1.readdirSync)(pluginCacheDir)) {
|
|
84
|
-
const marketDir = (0, node_path_1.join)(pluginCacheDir, marketplace);
|
|
85
|
-
if (!(0, node_fs_1.statSync)(marketDir).isDirectory())
|
|
86
|
-
continue;
|
|
87
|
-
for (const plugin of (0, node_fs_1.readdirSync)(marketDir)) {
|
|
88
|
-
const pluginDir = (0, node_path_1.join)(marketDir, plugin);
|
|
89
|
-
if (!(0, node_fs_1.statSync)(pluginDir).isDirectory())
|
|
90
|
-
continue;
|
|
91
|
-
const candidates = [(0, node_path_1.join)(pluginDir, "hooks", "hooks.json")];
|
|
92
|
-
try {
|
|
93
|
-
for (const sub of (0, node_fs_1.readdirSync)(pluginDir)) {
|
|
94
|
-
const subHooks = (0, node_path_1.join)(pluginDir, sub, "hooks", "hooks.json");
|
|
95
|
-
if ((0, node_fs_1.existsSync)(subHooks))
|
|
96
|
-
candidates.push(subHooks);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
catch { /* skip */ }
|
|
100
|
-
for (const hooksPath of candidates) {
|
|
101
|
-
if (!(0, node_fs_1.existsSync)(hooksPath))
|
|
102
|
-
continue;
|
|
103
|
-
try {
|
|
104
|
-
const hooksConfig = JSON.parse((0, node_fs_1.readFileSync)(hooksPath, "utf-8"));
|
|
105
|
-
if (hooksConfig.hooks) {
|
|
106
|
-
for (const eventHooks of Object.values(hooksConfig.hooks)) {
|
|
107
|
-
if (!Array.isArray(eventHooks))
|
|
108
|
-
continue;
|
|
109
|
-
for (const hookGroup of eventHooks) {
|
|
110
|
-
const group = hookGroup;
|
|
111
|
-
if (group.hooks) {
|
|
112
|
-
result.hasCustomHooks = true;
|
|
113
|
-
if (group.matcher)
|
|
114
|
-
result.hookWithMatcherCount += group.hooks.length;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
catch { /* skip */ }
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
catch { /* skip */ }
|
|
126
|
-
}
|
|
127
|
-
function parseProjectsAndMemory(result) {
|
|
128
|
-
const projectsDir = (0, node_path_1.join)(CLAUDE_DIR, "projects");
|
|
129
|
-
if (!(0, node_fs_1.existsSync)(projectsDir))
|
|
130
|
-
return;
|
|
131
|
-
try {
|
|
132
|
-
const projects = (0, node_fs_1.readdirSync)(projectsDir);
|
|
133
|
-
for (const proj of projects) {
|
|
134
|
-
const projDir = (0, node_path_1.join)(projectsDir, proj);
|
|
135
|
-
if (!(0, node_fs_1.statSync)(projDir).isDirectory())
|
|
136
|
-
continue;
|
|
137
|
-
if ((0, node_fs_1.existsSync)((0, node_path_1.join)(projDir, "CLAUDE.md"))) {
|
|
138
|
-
result.projectClaudeMdCount++;
|
|
139
|
-
}
|
|
140
|
-
const memoryDir = (0, node_path_1.join)(projDir, "memory");
|
|
141
|
-
if ((0, node_fs_1.existsSync)(memoryDir) && (0, node_fs_1.statSync)(memoryDir).isDirectory()) {
|
|
142
|
-
try {
|
|
143
|
-
const memFiles = (0, node_fs_1.readdirSync)(memoryDir).filter((f) => f.endsWith(".md") && f !== "MEMORY.md");
|
|
144
|
-
result.memoryFileCount += memFiles.length;
|
|
145
|
-
if (memFiles.length > 0)
|
|
146
|
-
result.hasMemoryFiles = true;
|
|
147
|
-
const thirtyDaysAgo = Date.now() - 30 * 24 * 60 * 60 * 1000;
|
|
148
|
-
for (const f of memFiles) {
|
|
149
|
-
try {
|
|
150
|
-
const stat = (0, node_fs_1.statSync)((0, node_path_1.join)(memoryDir, f));
|
|
151
|
-
if (stat.mtimeMs > thirtyDaysAgo) {
|
|
152
|
-
result.activeMemoryFileCount++;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
catch {
|
|
156
|
-
// skip
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
catch {
|
|
161
|
-
// can't read memory dir
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
catch {
|
|
167
|
-
// can't read projects dir
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
function parseRulesFiles(result) {
|
|
171
|
-
const rulesDir = (0, node_path_1.join)(CLAUDE_DIR, "rules");
|
|
172
|
-
if (!(0, node_fs_1.existsSync)(rulesDir))
|
|
173
|
-
return;
|
|
174
|
-
try {
|
|
175
|
-
const rules = (0, node_fs_1.readdirSync)(rulesDir).filter((f) => f.endsWith(".md"));
|
|
176
|
-
result.hasRulesFiles = rules.length > 0;
|
|
177
|
-
}
|
|
178
|
-
catch {
|
|
179
|
-
// can't read
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
function parseMcpServers(result) {
|
|
183
|
-
const mcpPaths = [
|
|
184
|
-
(0, node_path_1.join)(CLAUDE_DIR, ".mcp.json"),
|
|
185
|
-
(0, node_path_1.join)(CLAUDE_DIR, "mcp.json"),
|
|
186
|
-
(0, node_path_1.join)(process.cwd(), ".mcp.json"),
|
|
187
|
-
(0, node_path_1.join)(process.cwd(), "mcp.json"),
|
|
188
|
-
];
|
|
189
|
-
for (const mcpPath of mcpPaths) {
|
|
190
|
-
if ((0, node_fs_1.existsSync)(mcpPath)) {
|
|
191
|
-
try {
|
|
192
|
-
const mcp = JSON.parse((0, node_fs_1.readFileSync)(mcpPath, "utf-8"));
|
|
193
|
-
if (mcp.mcpServers && Object.keys(mcp.mcpServers).length > 0) {
|
|
194
|
-
result.hasMcpServers = true;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
catch {
|
|
198
|
-
// invalid JSON
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
const pluginCacheDir = (0, node_path_1.join)(CLAUDE_DIR, "plugins", "cache");
|
|
203
|
-
if (!(0, node_fs_1.existsSync)(pluginCacheDir))
|
|
204
|
-
return;
|
|
205
|
-
try {
|
|
206
|
-
for (const marketplace of (0, node_fs_1.readdirSync)(pluginCacheDir)) {
|
|
207
|
-
const marketDir = (0, node_path_1.join)(pluginCacheDir, marketplace);
|
|
208
|
-
if (!(0, node_fs_1.statSync)(marketDir).isDirectory())
|
|
209
|
-
continue;
|
|
210
|
-
for (const plugin of (0, node_fs_1.readdirSync)(marketDir)) {
|
|
211
|
-
const pluginDir = (0, node_path_1.join)(marketDir, plugin);
|
|
212
|
-
if (!(0, node_fs_1.statSync)(pluginDir).isDirectory())
|
|
213
|
-
continue;
|
|
214
|
-
const mcpCandidates = [(0, node_path_1.join)(pluginDir, ".mcp.json")];
|
|
215
|
-
try {
|
|
216
|
-
for (const sub of (0, node_fs_1.readdirSync)(pluginDir)) {
|
|
217
|
-
const subMcp = (0, node_path_1.join)(pluginDir, sub, ".mcp.json");
|
|
218
|
-
if ((0, node_fs_1.existsSync)(subMcp))
|
|
219
|
-
mcpCandidates.push(subMcp);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
catch { /* skip */ }
|
|
223
|
-
for (const mcpFile of mcpCandidates) {
|
|
224
|
-
if (!(0, node_fs_1.existsSync)(mcpFile))
|
|
225
|
-
continue;
|
|
226
|
-
try {
|
|
227
|
-
const mcp = JSON.parse((0, node_fs_1.readFileSync)(mcpFile, "utf-8"));
|
|
228
|
-
if (mcp.mcpServers && Object.keys(mcp.mcpServers).length > 0) {
|
|
229
|
-
result.hasMcpServers = true;
|
|
230
|
-
}
|
|
231
|
-
else if (Object.keys(mcp).some((k) => typeof mcp[k] === "object" && mcp[k]?.command)) {
|
|
232
|
-
result.hasMcpServers = true;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
catch { /* skip */ }
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
catch { /* skip */ }
|
|
241
|
-
}
|
|
242
26
|
/**
|
|
243
|
-
* Parse Claude Code configuration from ~/.claude/
|
|
27
|
+
* Parse Claude Code configuration from ~/.claude/ and project .claude/ directories.
|
|
28
|
+
* @param projectCwds - project directories to scan for project-level config.
|
|
29
|
+
* Defaults to [process.cwd()] for backward compatibility.
|
|
244
30
|
*/
|
|
245
|
-
function parseClaudeConfig() {
|
|
31
|
+
function parseClaudeConfig(projectCwds) {
|
|
32
|
+
const cwds = [...new Set((projectCwds ?? [process.cwd()]).map((p) => p.replace(/\/+$/, "")))];
|
|
246
33
|
const result = emptySignals();
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
34
|
+
// Global signals (scanned once)
|
|
35
|
+
(0, config_detectors_js_1.parseGlobalClaudeMd)(result);
|
|
36
|
+
(0, config_detectors_js_1.parseGlobalSettings)(result);
|
|
37
|
+
(0, config_detectors_js_1.parsePluginHooks)(result);
|
|
38
|
+
(0, config_detectors_js_1.parseProjectsAndMemory)(result);
|
|
39
|
+
(0, config_detectors_js_1.parseGlobalRulesFiles)(result);
|
|
40
|
+
(0, config_detectors_js_1.parseGlobalMcpServers)(result);
|
|
41
|
+
(0, config_detectors_js_1.parseGlobalAgents)(result);
|
|
42
|
+
(0, config_detectors_js_1.parseGlobalSkills)(result);
|
|
43
|
+
// Project-level signals (scanned for each project cwd)
|
|
44
|
+
for (const cwd of cwds) {
|
|
45
|
+
(0, config_detectors_js_1.parseSettings)(result, cwd);
|
|
46
|
+
(0, config_detectors_js_1.parseProjectClaudeMd)(result, cwd);
|
|
47
|
+
(0, config_detectors_js_1.parseProjectAgentMemory)(result, cwd);
|
|
48
|
+
(0, config_detectors_js_1.parseRulesFiles)(result, cwd);
|
|
49
|
+
(0, config_detectors_js_1.parseMcpServers)(result, cwd);
|
|
50
|
+
(0, config_detectors_js_1.parseCustomAgents)(result, cwd);
|
|
51
|
+
(0, config_detectors_js_1.parseCustomSkills)(result, cwd);
|
|
52
|
+
}
|
|
253
53
|
return result;
|
|
254
54
|
}
|
|
255
55
|
/**
|
|
@@ -257,12 +57,14 @@ function parseClaudeConfig() {
|
|
|
257
57
|
*/
|
|
258
58
|
function buildSetupChecklist(config) {
|
|
259
59
|
return {
|
|
260
|
-
hasClaudeMd: config.hasGlobalClaudeMd,
|
|
60
|
+
hasClaudeMd: config.hasGlobalClaudeMd || config.projectClaudeMdCount > 0,
|
|
261
61
|
hasHooks: config.hasCustomHooks,
|
|
262
62
|
hasPlugins: config.pluginCount > 0,
|
|
263
63
|
hasMcpServers: config.hasMcpServers,
|
|
264
64
|
hasMemory: config.hasMemoryFiles,
|
|
265
65
|
hasRules: config.hasRulesFiles,
|
|
66
|
+
hasAgents: config.hasCustomAgents,
|
|
67
|
+
hasSkills: config.hasCustomSkills,
|
|
266
68
|
};
|
|
267
69
|
}
|
|
268
70
|
//# sourceMappingURL=config-parser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-parser.js","sourceRoot":"","sources":["../../src/parsers/config-parser.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"config-parser.js","sourceRoot":"","sources":["../../src/parsers/config-parser.ts"],"names":[],"mappings":";;AAgEA,8CA0BC;AAKD,kDAWC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AAC;QACvB,IAAA,mCAAa,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC3B,IAAA,0CAAoB,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAClC,IAAA,6CAAuB,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACrC,IAAA,qCAAe,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC7B,IAAA,qCAAe,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC7B,IAAA,uCAAiB,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC/B,IAAA,uCAAiB,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CAAC,MAAqB;IACvD,OAAO;QACL,WAAW,EAAE,MAAM,CAAC,iBAAiB,IAAI,MAAM,CAAC,oBAAoB,GAAG,CAAC;QACxE,QAAQ,EAAE,MAAM,CAAC,cAAc;QAC/B,UAAU,EAAE,MAAM,CAAC,WAAW,GAAG,CAAC;QAClC,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,SAAS,EAAE,MAAM,CAAC,cAAc;QAChC,QAAQ,EAAE,MAAM,CAAC,aAAa;QAC9B,SAAS,EAAE,MAAM,CAAC,eAAe;QACjC,SAAS,EAAE,MAAM,CAAC,eAAe;KAClC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript-parser.d.ts","sourceRoot":"","sources":["../../src/parsers/transcript-parser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGtF;;;GAGG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"transcript-parser.d.ts","sourceRoot":"","sources":["../../src/parsers/transcript-parser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAsB,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGtF;;;GAGG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA8D9E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAmBxE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAoB1E"}
|
|
@@ -18,6 +18,7 @@ async function parseTranscript(filePath) {
|
|
|
18
18
|
let project = "";
|
|
19
19
|
let firstTimestamp = "";
|
|
20
20
|
let lastTimestamp = "";
|
|
21
|
+
let totalTokens = 0;
|
|
21
22
|
const rl = (0, node_readline_1.createInterface)({
|
|
22
23
|
input: (0, node_fs_1.createReadStream)(filePath, { encoding: "utf-8" }),
|
|
23
24
|
crlfDelay: Infinity,
|
|
@@ -43,6 +44,14 @@ async function parseTranscript(filePath) {
|
|
|
43
44
|
if (raw.timestamp) {
|
|
44
45
|
lastTimestamp = raw.timestamp;
|
|
45
46
|
}
|
|
47
|
+
// Sum token usage from assistant messages
|
|
48
|
+
if (raw.type === "assistant" && raw.message?.usage) {
|
|
49
|
+
const u = raw.message.usage;
|
|
50
|
+
totalTokens += (u.input_tokens ?? 0)
|
|
51
|
+
+ (u.cache_creation_input_tokens ?? 0)
|
|
52
|
+
+ (u.cache_read_input_tokens ?? 0)
|
|
53
|
+
+ (u.output_tokens ?? 0);
|
|
54
|
+
}
|
|
46
55
|
const normalized = (0, normalizer_js_1.normalizeEntry)(raw);
|
|
47
56
|
events.push(...normalized);
|
|
48
57
|
}
|
|
@@ -57,6 +66,7 @@ async function parseTranscript(filePath) {
|
|
|
57
66
|
project,
|
|
58
67
|
events,
|
|
59
68
|
version,
|
|
69
|
+
totalTokens,
|
|
60
70
|
};
|
|
61
71
|
}
|
|
62
72
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript-parser.js","sourceRoot":"","sources":["../../src/parsers/transcript-parser.ts"],"names":[],"mappings":";;AASA,
|
|
1
|
+
{"version":3,"file":"transcript-parser.js","sourceRoot":"","sources":["../../src/parsers/transcript-parser.ts"],"names":[],"mappings":";;AASA,0CA8DC;AAOD,kDAGC;AAMD,wDAmBC;AAMD,4DAoBC;AApID,qCAA2C;AAC3C,iDAAgD;AAEhD,mDAAiD;AAEjD;;;GAGG;AACI,KAAK,UAAU,eAAe,CAAC,QAAgB;IACpD,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,cAAc,GAAG,EAAE,CAAC;IACxB,IAAI,aAAa,GAAG,EAAE,CAAC;IACvB,IAAI,WAAW,GAAG,CAAC,CAAC;IAEpB,MAAM,EAAE,GAAG,IAAA,+BAAe,EAAC;QACzB,KAAK,EAAE,IAAA,0BAAgB,EAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;QACxD,SAAS,EAAE,QAAQ;KACpB,CAAC,CAAC;IAEH,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,EAAE,EAAE,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YAAE,SAAS;QAE3B,IAAI,CAAC;YACH,MAAM,GAAG,GAAuB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAEjD,4CAA4C;YAC5C,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;gBAChC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;YAC5B,CAAC;YACD,IAAI,CAAC,OAAO,IAAI,GAAG,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AM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAyB,CAAC;QAC/C,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,GAAG,CAAC,CAAyB,CAAC;QACnD,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,GAAG,CAAC,CAAyB,CAAC;QAEnD,gCAAgC;QAChC,IACE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC;YAChD,CAAC,CAAC,QAAQ,KAAK,MAAM;YACrB,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,EACjD,CAAC;YACD,aAAa,EAAE,CAAC;QAClB,CAAC;IACH,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ProficiencyResult, TokenWindows } from "../types.js";
|
|
2
|
+
import { type Locale } from "../i18n/locales.js";
|
|
3
|
+
export declare function renderAnimatedFullBadge(result: ProficiencyResult, locale?: Locale, tokenWindows?: TokenWindows): string;
|
|
4
|
+
/**
|
|
5
|
+
* Render animated badge. Falls back to static calibrating badge
|
|
6
|
+
* (no animation needed for the calibrating phase).
|
|
7
|
+
*/
|
|
8
|
+
export declare function renderAnimatedBadge(result: ProficiencyResult, locale?: Locale, tokenWindows?: TokenWindows): string;
|
|
9
|
+
//# sourceMappingURL=animated-svg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animated-svg.d.ts","sourceRoot":"","sources":["../../src/renderer/animated-svg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAe,YAAY,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAa,KAAK,MAAM,EAAsB,MAAM,oBAAoB,CAAC;AAwFhF,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAE,MAAa,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,MAAM,CAiD7H;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAE,MAAa,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,MAAM,CAKzH"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderAnimatedFullBadge = renderAnimatedFullBadge;
|
|
4
|
+
exports.renderAnimatedBadge = renderAnimatedBadge;
|
|
5
|
+
const locales_js_1 = require("../i18n/locales.js");
|
|
6
|
+
const svg_js_1 = require("./svg.js");
|
|
7
|
+
const format_js_1 = require("../utils/format.js");
|
|
8
|
+
// ── Animation timing ──
|
|
9
|
+
const BAR_DUR = "1s";
|
|
10
|
+
const BAR_EASING = `calcMode="spline" keySplines="0.25 0.1 0.25 1"`;
|
|
11
|
+
const FADE_DUR = "0.25s";
|
|
12
|
+
function barDelay(i) {
|
|
13
|
+
return (0.3 + i * 0.2).toFixed(1);
|
|
14
|
+
}
|
|
15
|
+
function numberDelay(i) {
|
|
16
|
+
return (0.3 + i * 0.2 + 0.8).toFixed(1);
|
|
17
|
+
}
|
|
18
|
+
// ── Animated domain row ──
|
|
19
|
+
function renderAnimatedDomainRow(d, y, i, t) {
|
|
20
|
+
const label = (0, svg_js_1.escapeXml)((0, svg_js_1.domainLabel)(d.id, t));
|
|
21
|
+
const color = svg_js_1.DOMAIN_COLORS[d.id] ?? svg_js_1.C.textDim;
|
|
22
|
+
const barWidth = 220;
|
|
23
|
+
const filledWidth = Math.round((d.score / 100) * barWidth);
|
|
24
|
+
const bDelay = barDelay(i);
|
|
25
|
+
const nDelay = numberDelay(i);
|
|
26
|
+
return `<g transform="translate(25, ${y})">
|
|
27
|
+
<text x="0" y="14" fill="${svg_js_1.C.textDim}" font-size="13" font-family="${svg_js_1.SANS}" font-weight="500">${label}</text>
|
|
28
|
+
<g transform="translate(120, 3)">
|
|
29
|
+
<rect width="${barWidth}" height="12" rx="6" fill="${svg_js_1.C.barBg}" opacity="0.5"/>
|
|
30
|
+
<rect width="0" height="12" rx="6" fill="${color}" filter="url(#glow)">
|
|
31
|
+
<animate attributeName="width" from="0" to="${filledWidth}" dur="${BAR_DUR}" begin="${bDelay}s" fill="freeze" ${BAR_EASING}/>
|
|
32
|
+
</rect>
|
|
33
|
+
</g>
|
|
34
|
+
<text x="${120 + barWidth + 10}" y="14" fill="${svg_js_1.C.text}" font-size="14" font-family="${svg_js_1.MONO}" font-weight="700" opacity="0">${d.score}<animate attributeName="opacity" from="0" to="1" dur="${FADE_DUR}" begin="${nDelay}s" fill="freeze"/></text>
|
|
35
|
+
<text x="${120 + barWidth + 42}" y="14" fill="${color}" font-size="12" font-family="${svg_js_1.MONO}" opacity="0">${(0, svg_js_1.confidenceSymbol)(d.confidence)}<animate attributeName="opacity" from="0" to="1" dur="${FADE_DUR}" begin="${nDelay}s" fill="freeze"/></text>
|
|
36
|
+
</g>`;
|
|
37
|
+
}
|
|
38
|
+
// ── Animated mini-bar grid ──
|
|
39
|
+
function renderAnimatedMiniBarGrid(featureScores, y, baseDelay, t) {
|
|
40
|
+
const scores = featureScores ?? {};
|
|
41
|
+
const totalFeatures = svg_js_1.MINI_BAR_KEYS.length;
|
|
42
|
+
const gap = 4;
|
|
43
|
+
const startX = 25;
|
|
44
|
+
const availableWidth = 445;
|
|
45
|
+
const colWidth = Math.floor((availableWidth - gap * (totalFeatures - 1)) / totalFeatures);
|
|
46
|
+
const barHeight = 24;
|
|
47
|
+
const lines = [];
|
|
48
|
+
for (let i = 0; i < totalFeatures; i++) {
|
|
49
|
+
const feat = svg_js_1.MINI_BAR_KEYS[i];
|
|
50
|
+
const score = scores[feat.key] ?? 0;
|
|
51
|
+
const label = (0, svg_js_1.escapeXml)(String(t[feat.localeKey]));
|
|
52
|
+
const x = startX + i * (colWidth + gap);
|
|
53
|
+
const fillColor = (0, svg_js_1.miniBarColor)(score, feat.color);
|
|
54
|
+
const opacity = (0, svg_js_1.miniBarOpacity)(score);
|
|
55
|
+
const fadeDelay = (baseDelay + i * 0.06).toFixed(2);
|
|
56
|
+
lines.push(`<g transform="translate(${x}, ${y})" opacity="0">`);
|
|
57
|
+
lines.push(` <animate attributeName="opacity" from="0" to="1" dur="0.3s" begin="${fadeDelay}s" fill="freeze"/>`);
|
|
58
|
+
lines.push(` <rect width="${colWidth}" height="${barHeight}" rx="4" fill="${fillColor}" opacity="${opacity}"/>`);
|
|
59
|
+
lines.push(` <text x="${colWidth / 2}" y="${barHeight / 2 + 1}" fill="${score > 0 ? '#fff' : svg_js_1.C.textMuted}" font-size="10" font-family="${svg_js_1.MONO}" font-weight="600" text-anchor="middle" dominant-baseline="middle">${score}</text>`);
|
|
60
|
+
lines.push(` <text x="${colWidth / 2}" y="${barHeight + 13}" fill="${svg_js_1.C.textMuted}" font-size="9" font-family="${svg_js_1.SANS}" text-anchor="middle">${label}</text>`);
|
|
61
|
+
lines.push(`</g>`);
|
|
62
|
+
}
|
|
63
|
+
return lines.join("\n");
|
|
64
|
+
}
|
|
65
|
+
// ── Full animated badge ──
|
|
66
|
+
function hasTokens(tw) {
|
|
67
|
+
return tw != null && (tw.tokens24h > 0 || tw.tokens30d > 0);
|
|
68
|
+
}
|
|
69
|
+
function renderAnimatedFullBadge(result, locale = "en", tokenWindows) {
|
|
70
|
+
const t = (0, locales_js_1.getLocale)(locale);
|
|
71
|
+
const width = 495;
|
|
72
|
+
const rows = result.domains.length;
|
|
73
|
+
const separatorY = 62 + rows * 28 + 6;
|
|
74
|
+
const miniBarY = separatorY + 14;
|
|
75
|
+
const footerY = miniBarY + svg_js_1.MINI_BAR_SECTION_HEIGHT + 6;
|
|
76
|
+
const showTokens = hasTokens(tokenWindows);
|
|
77
|
+
const tokenOffset = showTokens ? 16 : 0;
|
|
78
|
+
const height = footerY + 40 + tokenOffset;
|
|
79
|
+
const u = (0, svg_js_1.escapeXml)(result.username);
|
|
80
|
+
// Timing: last domain bar finishes at barDelay(rows-1) + 1.0s
|
|
81
|
+
const lastBarEnd = parseFloat(numberDelay(rows - 1));
|
|
82
|
+
const miniDelay = lastBarEnd + 0.3;
|
|
83
|
+
const footerDelay = (miniDelay + 0.6).toFixed(1);
|
|
84
|
+
const footerDelay2 = (miniDelay + 0.8).toFixed(1);
|
|
85
|
+
const domainSvg = result.domains
|
|
86
|
+
.map((d, i) => renderAnimatedDomainRow(d, 62 + i * 28, i, t))
|
|
87
|
+
.join("\n");
|
|
88
|
+
const phaseLabel = result.phase === "early"
|
|
89
|
+
? `<text x="${width - 25}" y="${footerY + 16}" fill="#d29922" font-size="10" font-family="${svg_js_1.MONO}" text-anchor="end" opacity="0">${(0, svg_js_1.escapeXml)(t.earlyResults)}<animate attributeName="opacity" from="0" to="1" dur="${FADE_DUR}" begin="${footerDelay}s" fill="freeze"/></text>`
|
|
90
|
+
: "";
|
|
91
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" role="img" aria-labelledby="cc-title cc-desc">
|
|
92
|
+
<title id="cc-title">${(0, svg_js_1.escapeXml)(t.title)} \u2014 @${u}</title>
|
|
93
|
+
<desc id="cc-desc">${result.sessionCount} ${(0, svg_js_1.escapeXml)(t.sessions)}, ${result.projectCount} ${(0, svg_js_1.escapeXml)(t.projects)}</desc>
|
|
94
|
+
${(0, svg_js_1.svgDefs)()}
|
|
95
|
+
<rect width="${width}" height="${height}" rx="12" fill="${svg_js_1.C.bg}"/>
|
|
96
|
+
<rect x="0.5" y="0.5" width="${width - 1}" height="${height - 1}" rx="11.5" fill="${svg_js_1.C.card}" stroke="${svg_js_1.C.border}"/>
|
|
97
|
+
<text x="25" y="34" fill="${svg_js_1.C.text}" font-size="18" font-family="${svg_js_1.SANS}" font-weight="600">${(0, svg_js_1.escapeXml)(t.title)}</text>
|
|
98
|
+
<a href="https://github.com/${u}" target="_blank"><text x="${width - 25}" y="34" fill="${svg_js_1.C.textDim}" font-size="13" font-family="${svg_js_1.MONO}" text-anchor="end">@${u}</text></a>
|
|
99
|
+
<line x1="25" y1="48" x2="${width - 25}" y2="48" stroke="${svg_js_1.C.border}"/>
|
|
100
|
+
|
|
101
|
+
${domainSvg}
|
|
102
|
+
|
|
103
|
+
<line x1="25" y1="${separatorY}" x2="${width - 25}" y2="${separatorY}" stroke="${svg_js_1.C.border}"/>
|
|
104
|
+
|
|
105
|
+
${renderAnimatedMiniBarGrid(result.features.featureScores, miniBarY, miniDelay, t)}
|
|
106
|
+
|
|
107
|
+
<line x1="25" y1="${footerY}" x2="${width - 25}" y2="${footerY}" stroke="${svg_js_1.C.border}"/>
|
|
108
|
+
<text x="25" y="${footerY + 16}" fill="${svg_js_1.C.textMuted}" font-size="11" font-family="${svg_js_1.MONO}" opacity="0">${(0, svg_js_1.formatHours)(result.features.totalHours)} \u00B7 ${result.sessionCount} ${(0, svg_js_1.escapeXml)(t.sessions)} \u00B7 ${result.projectCount} ${(0, svg_js_1.escapeXml)(t.projects)}${result.streak ? ` \u00B7 \uD83D\uDD25 ${result.streak}d` : ""}${result.achievementCount ? ` \u00B7 \uD83C\uDFC6 ${result.achievementCount}` : ""}<animate attributeName="opacity" from="0" to="1" dur="0.4s" begin="${footerDelay}s" fill="freeze"/></text>
|
|
109
|
+
${showTokens ? `<text x="25" y="${footerY + 30}" fill="${svg_js_1.C.textDim}" font-size="10" font-family="${svg_js_1.MONO}" opacity="0">tokens ${(0, format_js_1.formatTokens)(tokenWindows.tokens24h)}/24h \u00B7 ${(0, format_js_1.formatTokens)(tokenWindows.tokens30d)}/30d<animate attributeName="opacity" from="0" to="1" dur="0.4s" begin="${footerDelay}s" fill="freeze"/></text>` : ""}
|
|
110
|
+
<text x="25" y="${footerY + 16 + tokenOffset + 16}" fill="${svg_js_1.C.textMuted}" font-size="9" font-family="${svg_js_1.MONO}" opacity="0">${result.timestamp.slice(0, 10)}<animate attributeName="opacity" from="0" to="1" dur="0.4s" begin="${footerDelay2}s" fill="freeze"/></text>
|
|
111
|
+
<text x="${width - 25}" y="${footerY + 16 + tokenOffset + 16}" fill="${svg_js_1.C.textMuted}" font-size="9" font-family="${svg_js_1.MONO}" text-anchor="end" opacity="0">github.com/Z-M-Huang/cc-proficiency<animate attributeName="opacity" from="0" to="1" dur="0.4s" begin="${footerDelay2}s" fill="freeze"/></text>
|
|
112
|
+
${phaseLabel}
|
|
113
|
+
</svg>`;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Render animated badge. Falls back to static calibrating badge
|
|
117
|
+
* (no animation needed for the calibrating phase).
|
|
118
|
+
*/
|
|
119
|
+
function renderAnimatedBadge(result, locale = "en", tokenWindows) {
|
|
120
|
+
if (result.phase === "calibrating") {
|
|
121
|
+
return (0, svg_js_1.renderCalibratingBadge)(result, locale, tokenWindows);
|
|
122
|
+
}
|
|
123
|
+
return renderAnimatedFullBadge(result, locale, tokenWindows);
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=animated-svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animated-svg.js","sourceRoot":"","sources":["../../src/renderer/animated-svg.ts"],"names":[],"mappings":";;AAyFA,0DAiDC;AAMD,kDAKC;AApJD,mDAAgF;AAChF,qCAIkB;AAClB,kDAAkD;AAElD,yBAAyB;AAEzB,MAAM,OAAO,GAAG,IAAI,CAAC;AACrB,MAAM,UAAU,GAAG,gDAAgD,CAAC;AACpE,MAAM,QAAQ,GAAG,OAAO,CAAC;AAEzB,SAAS,QAAQ,CAAC,CAAS;IACzB,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,WAAW,CAAC,CAAS;IAC5B,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,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je,UAAU,CAAC,CAAC,CAAC,mBAAmB,OAAO,GAAG,EAAE,WAAW,UAAC,CAAC,OAAO,iCAAiC,aAAI,yBAAyB,IAAA,wBAAY,EAAC,YAAa,CAAC,SAAS,CAAC,eAAe,IAAA,wBAAY,EAAC,YAAa,CAAC,SAAS,CAAC,0EAA0E,WAAW,2BAA2B,CAAC,CAAC,CAAC,EAAE;oBAC5T,OAAO,GAAG,EAAE,GAAG,WAAW,GAAG,EAAE,WAAW,UAAC,CAAC,SAAS,gCAAgC,aAAI,iBAAiB,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,sEAAsE,YAAY;aAChO,KAAK,GAAG,EAAE,QAAQ,OAAO,GAAG,EAAE,GAAG,WAAW,GAAG,EAAE,WAAW,UAAC,CAAC,SAAS,gCAAgC,aAAI,yIAAyI,YAAY;IACzQ,UAAU;OACP,CAAC;AACR,CAAC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,MAAyB,EAAE,SAAiB,IAAI,EAAE,YAA2B;IAC/G,IAAI,MAAM,CAAC,KAAK,KAAK,aAAa,EAAE,CAAC;QACnC,OAAO,IAAA,+BAAsB,EAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AAC/D,CAAC"}
|
package/dist/renderer/svg.d.ts
CHANGED
|
@@ -1,8 +1,36 @@
|
|
|
1
|
-
import type { ProficiencyResult } from "../types.js";
|
|
2
|
-
import { type Locale } from "../i18n/locales.js";
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { ProficiencyResult, ConfidenceLevel, TokenWindows } from "../types.js";
|
|
2
|
+
import { type Locale, type LocaleStrings } from "../i18n/locales.js";
|
|
3
|
+
export declare const C: {
|
|
4
|
+
bg: string;
|
|
5
|
+
card: string;
|
|
6
|
+
border: string;
|
|
7
|
+
text: string;
|
|
8
|
+
textDim: string;
|
|
9
|
+
textMuted: string;
|
|
10
|
+
barBg: string;
|
|
11
|
+
red: string;
|
|
12
|
+
green: string;
|
|
13
|
+
blue: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const DOMAIN_COLORS: Record<string, string>;
|
|
16
|
+
export declare const SANS = "'Segoe UI', system-ui, -apple-system, sans-serif";
|
|
17
|
+
export declare const MONO = "ui-monospace, 'SF Mono', SFMono-Regular, monospace";
|
|
18
|
+
export declare function escapeXml(str: string): string;
|
|
19
|
+
export declare function confidenceSymbol(c: ConfidenceLevel): string;
|
|
20
|
+
export declare function svgDefs(): string;
|
|
21
|
+
export declare function domainLabel(id: string, t: LocaleStrings): string;
|
|
22
|
+
export declare function formatHours(h: number): string;
|
|
23
|
+
export declare const MINI_BAR_KEYS: Array<{
|
|
24
|
+
key: string;
|
|
25
|
+
localeKey: keyof LocaleStrings;
|
|
26
|
+
color: string;
|
|
27
|
+
}>;
|
|
28
|
+
export declare function miniBarColor(score: number, baseColor: string): string;
|
|
29
|
+
export declare function miniBarOpacity(score: number): string;
|
|
30
|
+
export declare const MINI_BAR_SECTION_HEIGHT = 42;
|
|
31
|
+
export declare function renderCalibratingBadge(result: ProficiencyResult, locale?: Locale, tokenWindows?: TokenWindows): string;
|
|
32
|
+
export declare function renderFullBadge(result: ProficiencyResult, locale?: Locale, tokenWindows?: TokenWindows): string;
|
|
33
|
+
export declare function renderBadge(result: ProficiencyResult, locale?: Locale, tokenWindows?: TokenWindows): string;
|
|
6
34
|
export declare function getInsights(result: ProficiencyResult): {
|
|
7
35
|
topStrength: string;
|
|
8
36
|
nextAction: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../src/renderer/svg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../src/renderer/svg.ts"],"names":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