dsh-as-aistudio 0.5.18 → 0.5.19
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/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/client.js +2 -2
- package/src/components.js +1 -1
- package/src/vendor/host/dsh-edit-turn.js +2 -2
- package/src/vendor/host/dsh-edit-turn.patch.js +1 -1
- package/src/vendor/host/dsh-log-trim.flatten.js +1 -1
- package/src/vendor/host/dsh-log-trim.goal-repair.js +1 -1
- package/src/vendor/host/dsh-log-trim.host-libs.mjs +1 -1
- package/src/vendor/host/dsh-log-trim.js +8 -4
- package/src/vendor/host/dsh-log-trim.ledger.js +1 -1
- package/src/vendor/host/dsh-log-trim.lossless.js +1 -1
- package/src/vendor/host/dsh-log-trim.roots.js +1 -1
- package/src/vendor/host/dsh-log-trim.vendor.compact-session.mjs +2 -2
- package/src/vendor/host/dsh-log-trim.verify-session-log.mjs +1 -1
- package/src/vendor/host/dsh-log-trim.worker.mjs +1 -1
- package/src/vendor/versions.json +2 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-as-aistudio",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.19",
|
|
4
4
|
"description": "Google-AI-Studio-style turn controls for DeepSeek Harness, in one install: edit a prompt and re-run it, re-run a reply in place, delete a turn from the model context, render sent prompts as Markdown, and trim idle session logs on boot. Self-contained: the plugin list shows this one row, and the five components (four actions + one maintenance) are vendored inside it - installing the studio installs nothing else.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
package/src/client.js
CHANGED
|
@@ -9642,7 +9642,7 @@ window.__ModuleLoader__.load({
|
|
|
9642
9642
|
const react = require('react')
|
|
9643
9643
|
const { jsx, jsxs } = require('react/jsx-runtime')
|
|
9644
9644
|
|
|
9645
|
-
const PLUGIN_VERSION = '0.7.
|
|
9645
|
+
const PLUGIN_VERSION = '0.7.6'
|
|
9646
9646
|
const ROUTE_PREFIX = '/api/dsh-log-trim'
|
|
9647
9647
|
|
|
9648
9648
|
/** The knobs this card edits, in the order they are drawn. */
|
|
@@ -10168,7 +10168,7 @@ window.__ModuleLoader__.load({
|
|
|
10168
10168
|
const NS = 'dsh-as-aistudio'
|
|
10169
10169
|
|
|
10170
10170
|
/** Keep in sync with package.json and src/components.js. */
|
|
10171
|
-
const PLUGIN_VERSION = '0.5.
|
|
10171
|
+
const PLUGIN_VERSION = '0.5.19'
|
|
10172
10172
|
|
|
10173
10173
|
/** Presence marker the live verifier reads. */
|
|
10174
10174
|
const DEBUG_KEY = '__DSH_AS_AISTUDIO__'
|
package/src/components.js
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
export const STUDIO_ID = 'dsh-as-aistudio'
|
|
27
27
|
|
|
28
28
|
/** Keep in sync with package.json and src/client.js. */
|
|
29
|
-
export const STUDIO_VERSION = '0.5.
|
|
29
|
+
export const STUDIO_VERSION = '0.5.19'
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* The AI Studio action strip this studio composes, in the order the user meets
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-edit-turn host half (dsh-edit-turn.js), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-edit-turn/lib/index.js (v0.5.
|
|
3
|
+
// Source: ../dsh-edit-turn/lib/index.js (v0.5.22, sha256 c91f351013c90495)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|
|
@@ -85,7 +85,7 @@ export const PLUGIN_ID = 'dsh-edit-turn'
|
|
|
85
85
|
export const name = PLUGIN_ID
|
|
86
86
|
|
|
87
87
|
/** Keep in sync with package.json and lib/client.js. */
|
|
88
|
-
export const PLUGIN_VERSION = '0.5.
|
|
88
|
+
export const PLUGIN_VERSION = '0.5.22'
|
|
89
89
|
|
|
90
90
|
// A ring of the last few requests, answering "did the browser half even ask, and
|
|
91
91
|
// what did it get?" without needing its console. Read-only diagnostics: the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-edit-turn host half (dsh-edit-turn.patch.js), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-edit-turn/lib/patch.js (v0.5.
|
|
3
|
+
// Source: ../dsh-edit-turn/lib/patch.js (v0.5.22, sha256 5e1e8cce1d168f6c)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-log-trim host half (dsh-log-trim.flatten.js), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-log-trim/lib/flatten.js (v0.7.
|
|
3
|
+
// Source: ../dsh-log-trim/lib/flatten.js (v0.7.6, sha256 3aa1fdcbb120ab06)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-log-trim host half (dsh-log-trim.goal-repair.js), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-log-trim/lib/goal-repair.js (v0.7.
|
|
3
|
+
// Source: ../dsh-log-trim/lib/goal-repair.js (v0.7.6, sha256 0801a28f35667ee7)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-log-trim host half (dsh-log-trim.host-libs.mjs), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-log-trim/lib/host-libs.mjs (v0.7.
|
|
3
|
+
// Source: ../dsh-log-trim/lib/host-libs.mjs (v0.7.6, sha256 5ebed01988b5bfcf)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-log-trim host half (dsh-log-trim.js), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-log-trim/lib/index.js (v0.7.
|
|
3
|
+
// Source: ../dsh-log-trim/lib/index.js (v0.7.6, sha256 78ee6ff182ff4b93)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|
|
@@ -37,14 +37,14 @@ import { discoverRoots, isCurrentLog, listLegacy } from './dsh-log-trim.roots.js
|
|
|
37
37
|
import fs from 'node:fs'
|
|
38
38
|
import os from 'node:os'
|
|
39
39
|
import path from 'node:path'
|
|
40
|
-
import { applyTrim, commitTrim, encodeLogAsync, foldSurface, isSessionLocked, keepLastWindows, readLogAsync, renumber, windowsOf } from './dsh-log-trim.vendor.compact-session.mjs'
|
|
40
|
+
import { applyTrim, commitTrim, dropShadowedPrefix, encodeLogAsync, foldSurface, isSessionLocked, keepLastWindows, readLogAsync, renumber, windowsOf } from './dsh-log-trim.vendor.compact-session.mjs'
|
|
41
41
|
import { applyFlatten, applyLossless, applyStreamOnly, planLossless, applyRebuild } from './dsh-log-trim.lossless.js'
|
|
42
42
|
import { orphanGoalRounds, stripOrphanGoalSources } from './dsh-log-trim.goal-repair.js'
|
|
43
43
|
import { readLedger, recordFor } from './dsh-log-trim.ledger.js'
|
|
44
44
|
|
|
45
45
|
export const name = 'dsh-log-trim'
|
|
46
46
|
export const PLUGIN_ID = name
|
|
47
|
-
export const PLUGIN_VERSION = '0.7.
|
|
47
|
+
export const PLUGIN_VERSION = '0.7.6'
|
|
48
48
|
export const ROUTE_PREFIX = '/api/dsh-log-trim'
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -893,13 +893,17 @@ export async function estimate(logFile, keepWindows) {
|
|
|
893
893
|
// that the host then accepted verbatim.
|
|
894
894
|
const after =
|
|
895
895
|
trimmed.cutSeq === null ? before : foldSurface(renumber(trimmed.events).events).visible.length
|
|
896
|
+
// 只丢被遮蔽的前缀不改表面,模型视图必须逐条不变。
|
|
897
|
+
// 「窗口不用裁」不等于「没活干」:最后一窗的 checkpoint 会把前面一整段历史遮蔽掉,
|
|
898
|
+
// 那些行模型和界面都看不到,丢掉它们同样是裁剪(窗口页还会把它算成一窗)。
|
|
899
|
+
const shadowed = trimmed.cutSeq === null ? dropShadowedPrefix(trimmed.events) : { dropped: 0 }
|
|
896
900
|
return {
|
|
897
901
|
title: titleOf(log.events),
|
|
898
902
|
events: log.events.length,
|
|
899
903
|
bytes: log.compressedBytes,
|
|
900
904
|
windows: trimmed.windows,
|
|
901
905
|
cutSeq: trimmed.cutSeq,
|
|
902
|
-
droppable: trimmed.dropped,
|
|
906
|
+
droppable: trimmed.dropped + shadowed.dropped,
|
|
903
907
|
modelBefore: before,
|
|
904
908
|
modelAfter: after,
|
|
905
909
|
sessionId: log.header?.id ?? path.basename(path.dirname(logFile)),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-log-trim host half (dsh-log-trim.ledger.js), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-log-trim/lib/ledger.js (v0.7.
|
|
3
|
+
// Source: ../dsh-log-trim/lib/ledger.js (v0.7.6, sha256 5ca2460b42a3a776)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-log-trim host half (dsh-log-trim.lossless.js), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-log-trim/lib/lossless.js (v0.7.
|
|
3
|
+
// Source: ../dsh-log-trim/lib/lossless.js (v0.7.6, sha256 7e8478a2fd2ec10b)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-log-trim host half (dsh-log-trim.roots.js), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-log-trim/lib/roots.js (v0.7.
|
|
3
|
+
// Source: ../dsh-log-trim/lib/roots.js (v0.7.6, sha256 028d9c12a395aaab)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-log-trim host half (dsh-log-trim.vendor.compact-session.mjs), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-log-trim/lib/vendor.compact-session.mjs (v0.7.
|
|
3
|
+
// Source: ../dsh-log-trim/lib/vendor.compact-session.mjs (v0.7.6, sha256 3df242c4e94bd6d9)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|
|
@@ -2154,7 +2154,7 @@ export function repairLateToolResults(events) {
|
|
|
2154
2154
|
* @param {object[]} events - 候选保留事件(keepLastWindows 的结果)。
|
|
2155
2155
|
* @returns {{ events: object[], dropped: number }} 结果。
|
|
2156
2156
|
*/
|
|
2157
|
-
function dropShadowedPrefix(events) {
|
|
2157
|
+
export function dropShadowedPrefix(events) {
|
|
2158
2158
|
const checkpoints = events.filter((event) => event.type === 'user/message' && event.data?.source?.kind === 'compact-checkpoint')
|
|
2159
2159
|
const last = checkpoints[checkpoints.length - 1]
|
|
2160
2160
|
const shadowEnd = last !== undefined && typeof last.surfaceOp?.endSeq === 'number' ? last.surfaceOp.endSeq : null
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-log-trim host half (dsh-log-trim.verify-session-log.mjs), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-log-trim/lib/verify-session-log.mjs (v0.7.
|
|
3
|
+
// Source: ../dsh-log-trim/lib/verify-session-log.mjs (v0.7.6, sha256 7cf835c053942961)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// dsh-log-trim host half (dsh-log-trim.worker.mjs), VENDORED by tools/vendor.mjs - DO NOT EDIT.
|
|
2
2
|
//
|
|
3
|
-
// Source: ../dsh-log-trim/lib/worker.mjs (v0.7.
|
|
3
|
+
// Source: ../dsh-log-trim/lib/worker.mjs (v0.7.6, sha256 675a759a767b7e38)
|
|
4
4
|
// Regenerate with `npm run vendor`; test/sync.test.js fails when this is stale.
|
|
5
5
|
//
|
|
6
6
|
// src/shell.js imports the copy named after the component, which is why the
|