You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add custom system prompt support for AI modes
Add ai:systemprompt and ai:systempromptmode fields to waveai.json schema
allowing users to customize the system prompt for their AI modes.
- ai:systemprompt: custom system prompt text
- ai:systempromptmode: 'replace' (default) or 'append'
Update documentation with examples for both modes.
Copy file name to clipboardExpand all lines: docs/docs/waveai-modes.mdx
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -430,6 +430,56 @@ When using providers like `openai` or `openrouter`, the secret name is automatic
430
430
431
431
The `openai` provider automatically looks for the `OPENAI_KEY` secret. See the [Secrets documentation](./secrets.mdx) for more information on managing secrets securely in Wave.
432
432
433
+
## Custom System Prompts
434
+
435
+
You can customize the system prompt for any AI mode to control the AI's behavior and personality. This allows you to override or extend the default Wave AI system prompt.
436
+
437
+
### System Prompt Modes
438
+
439
+
There are two modes for applying custom system prompts:
440
+
441
+
| Mode | Description |
442
+
|------|-------------|
443
+
|`"replace"` (default) | Completely replaces the built-in Wave AI system prompt with your custom prompt |
444
+
|`"append"`| Adds your custom prompt after the built-in Wave AI system prompt |
445
+
446
+
### Example: Replace Mode
447
+
448
+
Use this when you want full control over the AI's behavior:
449
+
450
+
```json
451
+
{
452
+
"my-custom-assistant": {
453
+
"display:name": "My Coding Assistant",
454
+
"ai:provider": "openai",
455
+
"ai:model": "gpt-4o",
456
+
"ai:systemprompt": "You are a specialized coding assistant focused on Go and TypeScript. Always provide concise, well-commented code examples. Prefer modern language features and best practices.",
457
+
"ai:systempromptmode": "replace"
458
+
}
459
+
}
460
+
```
461
+
462
+
### Example: Append Mode
463
+
464
+
Use this when you want to add context to the default Wave AI behavior:
"ai:systemprompt": "Additional context: The user is working on a terminal emulator project called Wave Terminal. They may ask about SSH, file previews, or AI integration.",
474
+
"ai:systempromptmode": "append"
475
+
}
476
+
}
477
+
```
478
+
479
+
:::tip
480
+
When using `"replace"` mode, your custom prompt completely replaces Wave's built-in prompt. Make sure to include any important instructions about tool usage and capabilities if you want the AI to maintain full Wave integration.
481
+
:::
482
+
433
483
## Multiple Modes Example
434
484
435
485
You can define multiple AI modes and switch between them easily:
@@ -543,6 +593,8 @@ If you get "model not found" errors:
543
593
|`ai:azureresourcename`| No | Azure resource name (for Azure providers) |
544
594
|`ai:azuredeployment`| No | Azure deployment name (for `azure-legacy` provider) |
545
595
|`ai:capabilities`| No | Array of supported capabilities: `"tools"`, `"images"`, `"pdfs"`|
596
+
|`ai:systemprompt`| No | Custom system prompt to control AI behavior for this mode |
597
+
|`ai:systempromptmode`| No | How to apply the custom system prompt: `"replace"` (default) or `"append"`|
546
598
|`waveai:cloud`| No | Internal - for Wave Cloud AI configuration only |
547
599
|`waveai:premium`| No | Internal - for Wave Cloud AI configuration only |
SystemPromptstring`json:"ai:systemprompt,omitempty" jsonschema_description:"Custom system prompt to control AI behavior for this mode"`
305
+
SystemPromptModestring`json:"ai:systempromptmode,omitempty" jsonschema:"enum=replace,enum=append" jsonschema_description:"How to apply the custom system prompt: replace (fully replace built-in prompt) or append (add after built-in prompt). Defaults to replace."`
Copy file name to clipboardExpand all lines: schema/waveai.json
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,18 @@
95
95
},
96
96
"type": "array"
97
97
},
98
+
"ai:systemprompt": {
99
+
"type": "string",
100
+
"description": "Custom system prompt to control AI behavior for this mode"
101
+
},
102
+
"ai:systempromptmode": {
103
+
"type": "string",
104
+
"enum": [
105
+
"replace",
106
+
"append"
107
+
],
108
+
"description": "How to apply the custom system prompt: replace (fully replace built-in prompt) or append (add after built-in prompt). Defaults to replace."
0 commit comments