claude-discover 1.10.0 → 1.10.1
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/out/main/main.js
CHANGED
|
@@ -51,6 +51,7 @@ class DeepLink extends EventEmitter {
|
|
|
51
51
|
});
|
|
52
52
|
this.#register();
|
|
53
53
|
this.#pending = findTarget(process.argv);
|
|
54
|
+
return this;
|
|
54
55
|
}
|
|
55
56
|
open(target) {
|
|
56
57
|
if (target) this.emit("open", target);
|
|
@@ -2086,7 +2087,7 @@ class Application {
|
|
|
2086
2087
|
Menu.setApplicationMenu(this.#buildMenu());
|
|
2087
2088
|
sessionsService.on("update", (sessions) => win.send("sessions:update", sessions));
|
|
2088
2089
|
sessionsService.on("progress", (p) => win.send("sessions:scan-progress", p));
|
|
2089
|
-
deepLink
|
|
2090
|
+
deepLink?.on("open", (target) => {
|
|
2090
2091
|
win.focus();
|
|
2091
2092
|
win.send("deeplink:open-session", target);
|
|
2092
2093
|
});
|
|
@@ -2101,7 +2102,7 @@ class Application {
|
|
|
2101
2102
|
ipcMain.handle("work-hours:set", (_e, data) => workHours.write(data));
|
|
2102
2103
|
ipcMain.handle("agent:run", (e, text, systemTools, cache) => agentRunner.run(text, e.sender, systemTools, cache));
|
|
2103
2104
|
ipcMain.handle("shell:open-link", (_e, href, baseFile) => openLinkSafely(href, baseFile));
|
|
2104
|
-
ipcMain.handle("deeplink:take-pending", () => deepLink
|
|
2105
|
+
ipcMain.handle("deeplink:take-pending", () => deepLink?.takePending() ?? null);
|
|
2105
2106
|
ipcMain.on("find:query", (_e, text, options) => win.findBar?.query(text, options));
|
|
2106
2107
|
ipcMain.on("find:stop", () => win.findBar?.stop());
|
|
2107
2108
|
ipcMain.on("find:close", () => win.findBar?.hide());
|
|
@@ -2171,11 +2172,41 @@ class Application {
|
|
|
2171
2172
|
]);
|
|
2172
2173
|
}
|
|
2173
2174
|
}
|
|
2175
|
+
const APP_ID = "claude-discover";
|
|
2176
|
+
class Shortcuts {
|
|
2177
|
+
// Call before any window is created, so the window picks up the app id.
|
|
2178
|
+
activate() {
|
|
2179
|
+
if (process.platform !== "win32") return;
|
|
2180
|
+
app.setAppUserModelId(APP_ID);
|
|
2181
|
+
if (IS_EPHEMERAL || false) return;
|
|
2182
|
+
const installed = app.getAppPath().split(/[\\/]/).includes("node_modules");
|
|
2183
|
+
const name = installed ? "Claude Discover" : "Claude Discover (local)";
|
|
2184
|
+
const created = config.read().shortcuts ?? {};
|
|
2185
|
+
const install = fs.statSync(app.getAppPath()).birthtimeMs;
|
|
2186
|
+
const newInstall = created[name] !== install;
|
|
2187
|
+
for (const dir of [join(app.getPath("appData"), "Microsoft/Windows/Start Menu/Programs"), app.getPath("desktop")]) {
|
|
2188
|
+
const path2 = join(dir, `${name}.lnk`);
|
|
2189
|
+
const exists = fs.existsSync(path2);
|
|
2190
|
+
if (!exists && !newInstall) continue;
|
|
2191
|
+
const written = shell.writeShortcutLink(path2, exists ? "replace" : "create", {
|
|
2192
|
+
target: process.execPath,
|
|
2193
|
+
args: `"${app.getAppPath()}"`,
|
|
2194
|
+
description: "Browse your local Claude Code sessions",
|
|
2195
|
+
icon: process.execPath,
|
|
2196
|
+
iconIndex: 0,
|
|
2197
|
+
appUserModelId: APP_ID
|
|
2198
|
+
});
|
|
2199
|
+
if (!written) throw new Error(`cannot write ${path2}`);
|
|
2200
|
+
}
|
|
2201
|
+
if (newInstall) config.save({ shortcuts: { ...created, [name]: install } });
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2174
2204
|
const isFirstInstance = app.requestSingleInstanceLock();
|
|
2175
2205
|
if (isFirstInstance) {
|
|
2176
|
-
let application;
|
|
2177
|
-
|
|
2178
|
-
deepLink.activate();
|
|
2206
|
+
let application = null;
|
|
2207
|
+
let deepLink = null;
|
|
2208
|
+
optional("deep links", () => deepLink = new DeepLink().activate());
|
|
2209
|
+
optional("shortcuts", () => new Shortcuts().activate());
|
|
2179
2210
|
app.whenReady().then(() => {
|
|
2180
2211
|
application = new Application({ deepLink });
|
|
2181
2212
|
application.start();
|
|
@@ -2185,7 +2216,7 @@ if (isFirstInstance) {
|
|
|
2185
2216
|
if (argv.includes("--restart")) {
|
|
2186
2217
|
application?.restart();
|
|
2187
2218
|
} else if (target) {
|
|
2188
|
-
deepLink
|
|
2219
|
+
deepLink?.open(target);
|
|
2189
2220
|
} else {
|
|
2190
2221
|
application?.win.focus();
|
|
2191
2222
|
}
|
|
@@ -2193,3 +2224,10 @@ if (isFirstInstance) {
|
|
|
2193
2224
|
} else {
|
|
2194
2225
|
app.exit(0);
|
|
2195
2226
|
}
|
|
2227
|
+
function optional(label, activate) {
|
|
2228
|
+
try {
|
|
2229
|
+
activate();
|
|
2230
|
+
} catch (err) {
|
|
2231
|
+
console.warn(`[${label}] skipped:`, err.message);
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
@@ -34,13 +34,13 @@ function useLocalStorage(key, initial) {
|
|
|
34
34
|
}
|
|
35
35
|
function clearOutdatedLocalStorage() {
|
|
36
36
|
const version = localStorage.getItem(VERSION_KEY);
|
|
37
|
-
if (version !== "1.10.
|
|
38
|
-
const [MAJOR, MINOR, PATCH] = "1.10.
|
|
37
|
+
if (version !== "1.10.1") {
|
|
38
|
+
const [MAJOR, MINOR, PATCH] = "1.10.1".split(".");
|
|
39
39
|
const [major, minor, patch] = (version ?? "").split(".");
|
|
40
40
|
if (MAJOR !== major || MINOR !== minor) {
|
|
41
41
|
localStorage.clear();
|
|
42
42
|
}
|
|
43
|
-
localStorage.setItem(VERSION_KEY, "1.10.
|
|
43
|
+
localStorage.setItem(VERSION_KEY, "1.10.1");
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
function useMouseFontScale(storageKey) {
|
package/out/renderer/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta charset="UTF-8" />
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
8
|
<title>Discover</title>
|
|
9
|
-
<script type="module" crossorigin src="./assets/index-
|
|
9
|
+
<script type="module" crossorigin src="./assets/index-FM6CSRHb.js"></script>
|
|
10
10
|
<link rel="modulepreload" crossorigin href="./assets/vendors-D2DMOduT.js">
|
|
11
11
|
<link rel="stylesheet" crossorigin href="./assets/vendors-B4XMnGdr.css">
|
|
12
12
|
<link rel="stylesheet" crossorigin href="./assets/index-DnYN00T3.css">
|
package/package.json
CHANGED
|
@@ -1,76 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "claude-discover",
|
|
3
|
-
"version": "1.10.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "Claude Discover — a desktop tool to browse your local Claude Code sessions: conversations, token costs, and captured API traffic",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"author": "dichev <dichev.lab@gmail.com>",
|
|
8
|
-
"repository": "github:dichev/claude-discover",
|
|
9
|
-
"engines": {
|
|
10
|
-
"node": ">=22"
|
|
11
|
-
},
|
|
12
|
-
"main": "out/main/main.js",
|
|
13
|
-
"bin": {
|
|
14
|
-
"claude-discover": "bin/claude-discover.mjs"
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"out",
|
|
18
|
-
"bin"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"dev": "electron-vite dev",
|
|
22
|
-
"build": "electron-vite build",
|
|
23
|
-
"start": "electron .",
|
|
24
|
-
"test": "vitest run --reporter=tree",
|
|
25
|
-
"proxy": "node bin/proxy.mjs --restart",
|
|
26
|
-
"readme": "gh markdown-preview",
|
|
27
|
-
"smoke": "npm pack && npx -y ./claude-discover-${npm_package_version}.tgz",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"@
|
|
35
|
-
"date-fns": "^
|
|
36
|
-
"
|
|
37
|
-
"electron
|
|
38
|
-
"electron-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"@fontsource/
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"react": "^
|
|
53
|
-
"react
|
|
54
|
-
"react-
|
|
55
|
-
"react-
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"claude
|
|
65
|
-
"claude-code
|
|
66
|
-
"claude-code-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"session-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"token-
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-discover",
|
|
3
|
+
"version": "1.10.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Claude Discover — a desktop tool to browse your local Claude Code sessions: conversations, token costs, and captured API traffic",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "dichev <dichev.lab@gmail.com>",
|
|
8
|
+
"repository": "github:dichev/claude-discover",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=22"
|
|
11
|
+
},
|
|
12
|
+
"main": "out/main/main.js",
|
|
13
|
+
"bin": {
|
|
14
|
+
"claude-discover": "bin/claude-discover.mjs"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"out",
|
|
18
|
+
"bin"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "electron-vite dev",
|
|
22
|
+
"build": "electron-vite build",
|
|
23
|
+
"start": "electron .",
|
|
24
|
+
"test": "vitest run --reporter=tree",
|
|
25
|
+
"proxy": "node bin/proxy.mjs --restart",
|
|
26
|
+
"readme": "gh markdown-preview",
|
|
27
|
+
"smoke:local": "npm pack && npx -y ./claude-discover-${npm_package_version}.tgz",
|
|
28
|
+
"smoke:global": "npm pack && npm i -g ./claude-discover-${npm_package_version}.tgz && claude-discover",
|
|
29
|
+
"postinstall": "install-electron",
|
|
30
|
+
"prepack": "npm run build",
|
|
31
|
+
"prepublishOnly": "npm whoami && npm test"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.266",
|
|
35
|
+
"@date-fns/tz": "^1.5.0",
|
|
36
|
+
"date-fns": "^4.4.0",
|
|
37
|
+
"electron": "43.2.0",
|
|
38
|
+
"electron-context-menu": "^4.1.2",
|
|
39
|
+
"electron-window-state": "^5.0.3",
|
|
40
|
+
"gpt-tokenizer": "^3.4.0",
|
|
41
|
+
"which": "^7.0.0",
|
|
42
|
+
"write-file-atomic": "^8.0.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@fontsource/inter": "^5.3.0",
|
|
46
|
+
"@fontsource/jetbrains-mono": "^5.3.0",
|
|
47
|
+
"@tomjs/electron-devtools-installer": "^4.0.1",
|
|
48
|
+
"@uiw/react-json-view": "^2.0.0-alpha.43",
|
|
49
|
+
"@vitejs/plugin-react": "^5.2.0",
|
|
50
|
+
"electron-vite": "^5.0.0",
|
|
51
|
+
"highlight.js": "^11.12.0",
|
|
52
|
+
"lucide-react": "^1.43.0",
|
|
53
|
+
"react": "^19.3.0",
|
|
54
|
+
"react-dom": "^19.3.0",
|
|
55
|
+
"react-markdown": "^10.1.0",
|
|
56
|
+
"react-resizable-panels": "^4.12.4",
|
|
57
|
+
"rehype-highlight": "^7.0.2",
|
|
58
|
+
"remark-gfm": "^4.0.1",
|
|
59
|
+
"tippy.js": "^6.3.7",
|
|
60
|
+
"vite": "^7.3.6",
|
|
61
|
+
"vitest": "^4.1.11"
|
|
62
|
+
},
|
|
63
|
+
"keywords": [
|
|
64
|
+
"claude",
|
|
65
|
+
"claude-code",
|
|
66
|
+
"claude-code-proxy",
|
|
67
|
+
"claude-code-inspect",
|
|
68
|
+
"system-prompt",
|
|
69
|
+
"session-browser",
|
|
70
|
+
"session-profiler",
|
|
71
|
+
"transcript-viewer",
|
|
72
|
+
"token-usage",
|
|
73
|
+
"token-cost",
|
|
74
|
+
"usage-dashboard",
|
|
75
|
+
"api-inspector"
|
|
76
|
+
]
|
|
77
|
+
}
|