@walkhi/code-relax 0.1.0-beta.38 → 0.1.0-beta.39
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/dist/build-platform.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"layout":"npm-platform-packages","version":"0.1.0-beta.
|
|
1
|
+
{"layout":"npm-platform-packages","version":"0.1.0-beta.39"}
|
|
@@ -89,7 +89,7 @@ export class SharedAppServer extends EventEmitter {
|
|
|
89
89
|
}
|
|
90
90
|
else {
|
|
91
91
|
this.traceLifecycle('complete', pending, { status: message.result?.status,
|
|
92
|
-
resultThreadId: message.result?.thread?.id });
|
|
92
|
+
resultThreadId: message.result?.thread?.id, resultServiceTier: message.result?.serviceTier });
|
|
93
93
|
try { pending.resolve(pending.transform(message.result)); }
|
|
94
94
|
catch (error) { pending.reject(error); }
|
|
95
95
|
}
|
|
@@ -161,6 +161,8 @@ export class SharedAppServer extends EventEmitter {
|
|
|
161
161
|
method: request.method, requestId: request.requestId, threadId: threadId(request.threadId),
|
|
162
162
|
...([null, 'default', 'priority', 'fast'].includes(request.serviceTier) ? { serviceTier: request.serviceTier } : {}),
|
|
163
163
|
...(extra.resultThreadId ? { resultThreadId: threadId(extra.resultThreadId) } : {}),
|
|
164
|
+
...(extra.resultServiceTier !== undefined && [null, 'default', 'priority', 'fast'].includes(extra.resultServiceTier)
|
|
165
|
+
? { resultServiceTier: extra.resultServiceTier } : {}),
|
|
164
166
|
...(typeof extra.status === 'string' && /^[\w-]{1,40}$/.test(extra.status) ? { status: extra.status } : {}),
|
|
165
167
|
...(typeof extra.rpcCode === 'number' ? { rpcCode: extra.rpcCode } : {}),
|
|
166
168
|
...(extra.writerError ? { writerError: extra.writerError } : {}) }));
|
|
@@ -325,6 +327,7 @@ export class SharedAppServer extends EventEmitter {
|
|
|
325
327
|
if (record?.readOnly || record?.needsReload) this.contexts.delete(threadId);
|
|
326
328
|
if (pageOptions.reconcileObserved || !record || record.readOnly || record.needsReload || record.historyTrimmed || record.metadataOnly) {
|
|
327
329
|
let result, snapshot;
|
|
330
|
+
const settingsBeforeResume = this.settingsNotifications.get(threadId);
|
|
328
331
|
try {
|
|
329
332
|
result = await this.resumeTimeline(threadId, value => {
|
|
330
333
|
const retained = new Map((previous?.thread.turns || []).map(turn => [turn.id, turn]));
|
|
@@ -363,8 +366,10 @@ export class SharedAppServer extends EventEmitter {
|
|
|
363
366
|
record.thread.turns = record.thread.turns.map(turn => ({ ...turn, items: [], cacheStub: true }));
|
|
364
367
|
} else await Promise.all(page.data.map(turn => this.compactTurn(threadId, turn, null, page => snapshot.merge(page), 20)));
|
|
365
368
|
record.hydrating = false;
|
|
366
|
-
|
|
367
|
-
|
|
369
|
+
if (this.settingsNotifications.get(threadId) === settingsBeforeResume) {
|
|
370
|
+
this.contexts.set(threadId, { ...this.contexts.get(threadId), model: result.model, thinking: result.reasoningEffort, serviceTier: result.serviceTier ?? null,
|
|
371
|
+
cwd: result.cwd, ...events.permissionState(result) });
|
|
372
|
+
}
|
|
368
373
|
} finally { snapshot?.close(); }
|
|
369
374
|
}
|
|
370
375
|
const id = randomUUID(), expires = Date.now() + syncTokenTtlMs;
|
|
@@ -605,8 +610,14 @@ export class SharedAppServer extends EventEmitter {
|
|
|
605
610
|
const result = await this.request('model/list', { limit: 100, ...(cursor ? { cursor } : {}) });
|
|
606
611
|
models.push(...result.data); cursor = result.nextCursor;
|
|
607
612
|
} while (cursor);
|
|
608
|
-
|
|
609
|
-
|
|
613
|
+
let config, configWarning;
|
|
614
|
+
try { config = await this.request('config/read', { includeLayers: false }); }
|
|
615
|
+
catch (error) {
|
|
616
|
+
configWarning = `读取思考强度偏好失败:${error.message}`;
|
|
617
|
+
console.warn('[model-catalog]', configWarning);
|
|
618
|
+
}
|
|
619
|
+
return { models: models.filter(model => !model.hidden), enabledReasoningEfforts: config?.config?.desktop?.['enabled-reasoning-efforts'] ?? null,
|
|
620
|
+
...(configWarning ? { configWarning } : {}) };
|
|
610
621
|
}
|
|
611
622
|
|
|
612
623
|
async usage() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkhi/code-relax",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.39",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"tag": "beta"
|
|
42
42
|
},
|
|
43
43
|
"optionalDependencies": {
|
|
44
|
-
"@walkhi/code-relax-native-win32-x64": "0.1.0-beta.
|
|
45
|
-
"@walkhi/code-relax-native-darwin-arm64": "0.1.0-beta.
|
|
46
|
-
"@walkhi/code-relax-native-darwin-x64": "0.1.0-beta.
|
|
44
|
+
"@walkhi/code-relax-native-win32-x64": "0.1.0-beta.39",
|
|
45
|
+
"@walkhi/code-relax-native-darwin-arm64": "0.1.0-beta.39",
|
|
46
|
+
"@walkhi/code-relax-native-darwin-x64": "0.1.0-beta.39"
|
|
47
47
|
}
|
|
48
48
|
}
|