@dsh-cc/command-rename 0.8.1-rc.1 → 0.8.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/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/package.json +3 -2
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.1
|
|
4
|
+
"version": "0.8.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/dsh-cc/dsh-cc.git",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
],
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@dsh-cc/command-usage": "^0.8.1
|
|
28
|
+
"@dsh-cc/command-usage": "^0.8.1",
|
|
29
|
+
"@dsh-cc/memory": "^0.8.1"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
32
|
"@deepseek-ai/dsh-commands": ">=0.1.5-rc.1",
|