@dsh-cc/command-rename 0.8.1-rc.1 → 0.8.2-rc.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/README.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/package.json +8 -7
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm check:readme --write
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 7cc776c0992f4c4c61ee3573926e8fc197d4ad42
|
|
6
|
+
README.zh.md: 21510b4b9544b17cefc1e520dfe448e70e859280
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
Human-facing `/rename <title>` command: pin an explicit user title on the current session through the optional host `sessionTitle` service. The plugin registers one global command through
|
|
5
|
+
Human-facing `/rename <title>` command: pin an explicit user title on the current session through the optional host `sessionTitle` service. The plugin registers one global command through `ctx.commands`.
|
|
6
6
|
|
|
7
7
|
## Command contract
|
|
8
8
|
|
package/README.zh.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
面向用户的 `/rename <title>` 命令:通过可选的宿主 `sessionTitle` 服务为当前会话固定一个显式用户标题。该插件通过
|
|
5
|
+
面向用户的 `/rename <title>` 命令:通过可选的宿主 `sessionTitle` 服务为当前会话固定一个显式用户标题。该插件通过 `ctx.commands` 注册一个全局命令。
|
|
6
6
|
|
|
7
7
|
## 命令约定
|
|
8
8
|
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAKlD,eAAO,MAAM,IAAI,mBAAmB,CAAA;AACpC,eAAO,MAAM,MAAM,UAAe,CAAA;AAElC;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAC3D;AAyBD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAMxC"}
|
package/lib/index.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @module @dsh-cc/command-rename
|
|
7
7
|
*/
|
|
8
8
|
import { helpable } from '@dsh-cc/command-usage';
|
|
9
|
+
import { writeTitleSidecar } from '@dsh-cc/memory';
|
|
9
10
|
export const name = 'command-rename';
|
|
10
11
|
export const inject = ['commands'];
|
|
11
12
|
/** Execute `/rename <title>`: pin a user title on the receiving agent's session. */
|
|
@@ -20,6 +21,11 @@ function executeRename(ctx, invocation) {
|
|
|
20
21
|
}
|
|
21
22
|
try {
|
|
22
23
|
const accepted = titles.rename(invocation.agent.session, raw);
|
|
24
|
+
// Best-effort sidecar after acceptance — the host may rewrite/reject, so
|
|
25
|
+
// only the accepted value is persisted. header.cwd is optional; an absent
|
|
26
|
+
// one falls back to the host process cwd.
|
|
27
|
+
const session = invocation.agent.session;
|
|
28
|
+
writeTitleSidecar(session.header?.cwd ?? process.cwd(), String(session.id), accepted.title);
|
|
23
29
|
return { kind: 'success', text: `Renamed to: ${accepted.title}` };
|
|
24
30
|
}
|
|
25
31
|
catch (error) {
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAElD,MAAM,CAAC,MAAM,IAAI,GAAG,gBAAgB,CAAA;AACpC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAU,CAAC,CAAA;AAUlC,oFAAoF;AACpF,SAAS,aAAa,CAAC,GAAY,EAAE,UAA6B;IAChE,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,cAAc,CAAiC,CAAA;IACtE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,0EAA0E,EAAE,CAAA;IAC5G,CAAC;IACD,MAAM,GAAG,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAA;IACtC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAA;IAC1D,CAAC;IACD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;QAC7D,yEAAyE;QACzE,0EAA0E;QAC1E,0CAA0C;QAC1C,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,OAAqD,CAAA;QACtF,iBAAiB,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC3F,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAA;IACnE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAA;IACxF,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,GAAY;IAChC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC7B,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE,CAAC,UAA6B,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC;KAC3E,CAAC,CAAC,CAAA;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-cc/command-rename",
|
|
3
3
|
"description": "Human-facing slash command to rename the current session via the session-title service",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.2-rc.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/dsh-cc/dsh-cc.git",
|
|
@@ -25,14 +25,15 @@
|
|
|
25
25
|
],
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@dsh-cc/
|
|
28
|
+
"@dsh-cc/memory": "^0.8.2-rc.1",
|
|
29
|
+
"@dsh-cc/command-usage": "^0.8.2-rc.1"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
|
-
"@deepseek-ai/dsh-commands": ">=0.1.
|
|
32
|
-
"@deepseek-ai/dsh-invariants": ">=0.1.
|
|
33
|
-
"@deepseek-ai/dsh-session": ">=0.1.
|
|
34
|
-
"@deepseek-ai/dsh-session-title": ">=0.1.
|
|
35
|
-
"@deepseek-ai/cordis": ">=0.1.
|
|
32
|
+
"@deepseek-ai/dsh-commands": ">=0.1.7-rc.2",
|
|
33
|
+
"@deepseek-ai/dsh-invariants": ">=0.1.7-rc.2",
|
|
34
|
+
"@deepseek-ai/dsh-session": ">=0.1.7-rc.2",
|
|
35
|
+
"@deepseek-ai/dsh-session-title": ">=0.1.7-rc.2",
|
|
36
|
+
"@deepseek-ai/cordis": ">=0.1.7-rc.2"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@deepseek-ai/cordis-plugin-loader": "link:../../../../deepseek-harness/vendor/loader",
|