@deepseek-ai/dsh-file-reference 0.1.6-alpha.1 → 0.1.7-alpha.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 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 run verify-translation-pairing --write packages/context/file-reference/README.md
5
- README.md: ce84a91e96988fb662ee665707d1ce2ad1651327
6
- README.zh.md: ffdce668dd1b4a5a39a076d6abc998ec6db2ce92
5
+ README.md: 3b759a88bd9ebb59fbf3d039756e66ad6901a893
6
+ README.zh.md: d7dedc46365d70740480167cdfa0432f494d4563
package/README.md CHANGED
@@ -29,7 +29,7 @@ Choose this package when a host-backed UI (web or terminal) should offer `@file`
29
29
 
30
30
  ### Mention grammar
31
31
 
32
- An `@path` token at the start of input or after whitespace triggers completion; an `@` inside another token, such as an email address, does not. `@"path with spaces"` opens a quoted mention, and a directory candidate keeps that quote open after its trailing slash so completion can descend another level. The formatter rejects paths with control characters or embedded quotes that the grammar cannot represent safely.
32
+ An `@path` token at the start of input or after whitespace triggers completion; an `@` inside another token, such as an email address, does not. `@"path with spaces"` opens a quoted mention, and a directory candidate keeps that quote open after its trailing slash so completion can descend another level. Completed directory chips close the quote after the trailing slash. Relative mentions resolve from the workspace root; absolute mentions retain the host path. The formatter rejects paths with control characters or embedded quotes that the grammar cannot represent safely.
33
33
 
34
34
  ### Getting candidates
35
35
 
package/README.zh.md CHANGED
@@ -29,7 +29,7 @@ kind: "package-reference"
29
29
 
30
30
  ### mention 语法
31
31
 
32
- 输入开头或空白后的 `@path` token 会触发补全;其他 token 内部的 `@`(如电子邮件地址)不会。`@"path with spaces"` 打开带引号的 mention,目录候选在其尾斜杠后保持引号打开,使补全可以继续深入下一层。格式化器会拒绝含有语法无法安全表示的控制字符或内嵌引号的路径。
32
+ 输入开头或空白后的 `@path` token 会触发补全;其他 token 内部的 `@`(如电子邮件地址)不会。`@"path with spaces"` 打开带引号的 mention,目录候选在其尾斜杠后保持引号打开,使补全可以继续深入下一层。格式化器会拒绝含有语法无法安全表示的控制字符或内嵌引号的路径。 已完成的目录 chip 在末尾斜杠之后闭合引号。相对引用从工作区根目录解析,绝对引用保留主机路径。
33
33
 
34
34
  ### 获取候选
35
35
 
package/lib/index.js CHANGED
@@ -51,7 +51,7 @@ function formatFileMention(candidate, preserveQuote) {
51
51
  * @module @deepseek-ai/dsh-file-reference
52
52
  */
53
53
  /** Model guidance for path-only references selected by a user interface. */
54
- const FILE_REFERENCE_PROMPT = "Tokens prefixed with @ are workspace paths the user explicitly referenced, relative to the workspace root. A trailing slash marks a directory: list it when its contents matter. Anything else is a file: use the read tool when its contents are needed, and do not claim to have inspected it before reading. @\"...\" quotes a path containing spaces.";
54
+ const FILE_REFERENCE_PROMPT = "Tokens prefixed with @ are paths the user explicitly referenced. Relative paths resolve from the workspace root; absolute paths identify files or directories on the host. A trailing slash marks a directory: list it when its contents matter. Anything else is a file: use the read tool when its contents are needed, and do not claim to have inspected it before reading. @\"...\" quotes a path containing spaces.";
55
55
  /** Host capability for cancellable file-reference discovery. */
56
56
  var FileReferenceService = class extends Service {
57
57
  constructor(ctx) {
@@ -10,7 +10,7 @@ export { activeAtToken, formatFileMention } from './grammar.ts';
10
10
  export type { ActiveAtToken } from './grammar.ts';
11
11
  export type { FileReferenceCandidate } from './types.ts';
12
12
  /** Model guidance for path-only references selected by a user interface. */
13
- export declare const FILE_REFERENCE_PROMPT = "Tokens prefixed with @ are workspace paths the user explicitly referenced, relative to the workspace root. A trailing slash marks a directory: list it when its contents matter. Anything else is a file: use the read tool when its contents are needed, and do not claim to have inspected it before reading. @\"...\" quotes a path containing spaces.";
13
+ export declare const FILE_REFERENCE_PROMPT = "Tokens prefixed with @ are paths the user explicitly referenced. Relative paths resolve from the workspace root; absolute paths identify files or directories on the host. A trailing slash marks a directory: list it when its contents matter. Anything else is a file: use the read tool when its contents are needed, and do not claim to have inspected it before reading. @\"...\" quotes a path containing spaces.";
14
14
  declare module '@deepseek-ai/cordis' {
15
15
  interface Context {
16
16
  fileReferences: FileReferenceService;
@@ -6,7 +6,7 @@
6
6
  import { Service } from '@deepseek-ai/cordis';
7
7
  export { activeAtToken, formatFileMention } from "./grammar.js";
8
8
  /** Model guidance for path-only references selected by a user interface. */
9
- export const FILE_REFERENCE_PROMPT = 'Tokens prefixed with @ are workspace paths the user explicitly referenced, relative to the workspace root. A trailing slash marks a directory: list it when its contents matter. Anything else is a file: use the read tool when its contents are needed, and do not claim to have inspected it before reading. @"..." quotes a path containing spaces.';
9
+ export const FILE_REFERENCE_PROMPT = 'Tokens prefixed with @ are paths the user explicitly referenced. Relative paths resolve from the workspace root; absolute paths identify files or directories on the host. A trailing slash marks a directory: list it when its contents matter. Anything else is a file: use the read tool when its contents are needed, and do not claim to have inspected it before reading. @"..." quotes a path containing spaces.';
10
10
  /** Host capability for cancellable file-reference discovery. */
11
11
  export class FileReferenceService extends Service {
12
12
  constructor(ctx) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-file-reference",
3
3
  "description": "File-reference discovery contract and shared @file grammar",
4
- "version": "0.1.6-alpha.1",
4
+ "version": "0.1.7-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -36,11 +36,11 @@
36
36
  ],
37
37
  "license": "MIT",
38
38
  "peerDependencies": {
39
- "@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
40
- "@deepseek-ai/cordis": "^4.0.2"
39
+ "@deepseek-ai/dsh-agent": "^0.1.7-alpha.1",
40
+ "@deepseek-ai/cordis": "^4.0.3"
41
41
  },
42
42
  "devDependencies": {
43
- "@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
44
- "@deepseek-ai/cordis": "^4.0.2"
43
+ "@deepseek-ai/dsh-agent": "^0.1.7-alpha.1",
44
+ "@deepseek-ai/cordis": "^4.0.3"
45
45
  }
46
46
  }