@liyang8246/dsh-codetime 0.1.0 → 0.1.9
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/lib/index.js +8 -5
- package/package.json +6 -22
package/lib/index.js
CHANGED
|
@@ -1303,14 +1303,17 @@ var SessionFolder = class {
|
|
|
1303
1303
|
const modelBucket = this.modelBucket(accumulator, time, model);
|
|
1304
1304
|
modelBucket.callCount += 1;
|
|
1305
1305
|
if (usage) {
|
|
1306
|
+
const cacheRead = usage.cacheReadTokens ?? 0;
|
|
1307
|
+
const cacheWrite = usage.cacheWriteTokens ?? 0;
|
|
1308
|
+
const inputTokens = usage.inputTokens + cacheRead + cacheWrite;
|
|
1306
1309
|
const tokens = {
|
|
1307
|
-
inputTokens
|
|
1308
|
-
cachedInputTokens:
|
|
1309
|
-
cacheCreationInputTokens:
|
|
1310
|
-
cacheReadInputTokens:
|
|
1310
|
+
inputTokens,
|
|
1311
|
+
cachedInputTokens: cacheRead + cacheWrite,
|
|
1312
|
+
cacheCreationInputTokens: cacheWrite,
|
|
1313
|
+
cacheReadInputTokens: cacheRead,
|
|
1311
1314
|
outputTokens: usage.outputTokens,
|
|
1312
1315
|
reasoningOutputTokens: usage.reasoningTokens ?? 0,
|
|
1313
|
-
totalTokens: usage.totalTokens ??
|
|
1316
|
+
totalTokens: usage.totalTokens ?? inputTokens + usage.outputTokens
|
|
1314
1317
|
};
|
|
1315
1318
|
addTokens(modelRollup, tokens);
|
|
1316
1319
|
addTokens(modelBucket, tokens);
|
package/package.json
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liyang8246/dsh-codetime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.9",
|
|
5
5
|
"description": "Report DeepSeek Harness coding activity to codetime.dev; set the upload token in Settings.",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "https://github.com/liyang8246/dsh-zolin.git",
|
|
9
|
-
"directory": "packages/dsh-codetime"
|
|
10
|
-
},
|
|
6
|
+
"repository": { "type": "git", "url": "https://github.com/liyang8246/dsh-zolin.git", "directory": "packages/dsh-codetime" },
|
|
11
7
|
"exports": {
|
|
12
8
|
".": "./lib/index.js",
|
|
13
9
|
"./client": "./lib/client.js",
|
|
@@ -16,16 +12,8 @@
|
|
|
16
12
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
17
13
|
"./package.json": "./package.json"
|
|
18
14
|
},
|
|
19
|
-
"files": [
|
|
20
|
-
|
|
21
|
-
"icon.svg",
|
|
22
|
-
"lib/",
|
|
23
|
-
"locale/*.json"
|
|
24
|
-
],
|
|
25
|
-
"engines": {
|
|
26
|
-
"node": ">=22.19.0",
|
|
27
|
-
"dsh": ">=0.2.1-rc.5 <0.3.0"
|
|
28
|
-
},
|
|
15
|
+
"files": ["cordis.patch.yml", "icon.svg", "lib/", "locale/*.json"],
|
|
16
|
+
"engines": { "node": ">=22.19.0", "dsh": ">=0.2.1-rc.5 <0.3.0" },
|
|
29
17
|
"scripts": {
|
|
30
18
|
"build": "tsdown && node scripts/build-client.ts",
|
|
31
19
|
"typecheck": "tsc --noEmit"
|
|
@@ -44,15 +32,11 @@
|
|
|
44
32
|
"@deepseek-ai/dsh-session-query": "0.2.1-rc.5"
|
|
45
33
|
},
|
|
46
34
|
"dsh": {
|
|
47
|
-
"bundle": {
|
|
48
|
-
"patch": "./cordis.patch.yml"
|
|
49
|
-
},
|
|
35
|
+
"bundle": { "patch": "./cordis.patch.yml" },
|
|
50
36
|
"client": {
|
|
51
37
|
"platform": "web",
|
|
52
38
|
"immediately": true,
|
|
53
|
-
"inject": [
|
|
54
|
-
"@deepseek-ai/dsh-client-locale"
|
|
55
|
-
]
|
|
39
|
+
"inject": ["@deepseek-ai/dsh-client-locale"]
|
|
56
40
|
}
|
|
57
41
|
}
|
|
58
42
|
}
|