779ca4872b
- Removed Prettier configuration files (.prettierignore and .prettierrc) and migrated formatting to Biome. - Updated Biome configuration from version 2.3.11 to 2.3.12 and changed arrowParentheses rule from 'always' to 'asNeeded'. - Pinned @biomejs/biome dependency to exact version 2.3.12 in package.json and bun.lock. - Applied consistent arrow function formatting across 489 files by removing unnecessary parentheses around single parameters. - Removed blank lines after comment blocks and reorganized imports for consistency across the codebase.
35 lines
941 B
TypeScript
35 lines
941 B
TypeScript
/**
|
|
* System Prompt Capability
|
|
*
|
|
* Custom system prompt files (SYSTEM.md) that modify the agent's base system prompt.
|
|
* Distinct from context-files which are user instructions shown in conversation.
|
|
*/
|
|
import { defineCapability } from ".";
|
|
import type { SourceMeta } from "./types";
|
|
|
|
/**
|
|
* A system prompt customization file.
|
|
*/
|
|
export interface SystemPrompt {
|
|
/** Absolute path to the file */
|
|
path: string;
|
|
/** File content */
|
|
content: string;
|
|
/** Which level this came from */
|
|
level: "user" | "project";
|
|
/** Source metadata */
|
|
_source: SourceMeta;
|
|
}
|
|
|
|
export const systemPromptCapability = defineCapability<SystemPrompt>({
|
|
id: "system-prompt",
|
|
displayName: "System Prompt",
|
|
description: "Custom system prompt files (SYSTEM.md) that modify agent behavior",
|
|
key: sp => sp.level,
|
|
validate: sp => {
|
|
if (!sp.path) return "Missing path";
|
|
if (sp.content === undefined) return "Missing content";
|
|
return undefined;
|
|
},
|
|
});
|