feat(mode): register one slash command per mode
Replace /mode [name] with same-named no-argument commands such as /plan. Update the TUI and ACP snapshots, and validate mode names against command syntax.
This commit is contained in:
@@ -762,8 +762,8 @@ Requires: `tools` · `systemPrompt`
|
||||
/**
|
||||
* Plugin config: mode definitions by name. The deployment must define
|
||||
* {@link PLAN_MODE}, including its complete model instructions;
|
||||
* {@link DEFAULT_MODE} is rejected as a key ({@link resolveConfig} throws at
|
||||
* load).
|
||||
* {@link DEFAULT_MODE} is rejected as a key and definition names must be valid
|
||||
* slash-command names ({@link resolveConfig} throws at load).
|
||||
*/
|
||||
export interface ModeConfig {
|
||||
/** Mode definitions by name; `plan` is required and owns its full prompt text. */
|
||||
@@ -782,7 +782,7 @@ export interface ModeDefinition {
|
||||
}
|
||||
```
|
||||
|
||||
Source: [`packages/mode/mode/src/index.ts:95`](../packages/mode/mode/src/index.ts)
|
||||
Source: [`packages/mode/mode/src/index.ts:99`](../packages/mode/mode/src/index.ts)
|
||||
|
||||
## `@deepseek-ai/dsh-permission`
|
||||
|
||||
|
||||
@@ -726,7 +726,7 @@ set(agent: Agent, mode: string): void
|
||||
|
||||
Types: [Agent](../core-data-structures/core.md)
|
||||
|
||||
Source: [`packages/mode/mode/src/index.ts:210`](../../packages/mode/mode/src/index.ts)
|
||||
Source: [`packages/mode/mode/src/index.ts:217`](../../packages/mode/mode/src/index.ts)
|
||||
|
||||
## `ctx.permission` — `PermissionService`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user