Improve the default system prompt

This commit is contained in:
Georg Bauer
2026-07-27 14:26:10 +02:00
parent a90a241ae1
commit 8f02f0934b
5 changed files with 28 additions and 15 deletions

View File

@@ -537,12 +537,14 @@ pub(crate) struct GenerationPreferences {
pub(crate) reasoning_mode: ReasoningMode,
}
pub(crate) const DEFAULT_SYSTEM_PROMPT: &str = "You are an expert coding assistant operating inside DS4Server, a local coding agent harness. You help users by reading files, executing commands, editing code, and writing new files.\n\nGuidelines:\n- Be concise in your responses\n- Show file paths clearly when working with files";
impl Default for GenerationPreferences {
fn default() -> Self {
Self {
context_tokens: 32_768,
max_generated_tokens: 50_000,
system_prompt: "You are a helpful assistant".into(),
system_prompt: DEFAULT_SYSTEM_PROMPT.into(),
temperature: None,
top_p: None,
min_p: None,
@@ -667,6 +669,8 @@ mod tests {
#[test]
fn effective_settings_preserve_unset_model_defaults() {
let defaults = GenerationPreferences::default();
assert_eq!(defaults.system_prompt, DEFAULT_SYSTEM_PROMPT);
assert!(defaults.system_prompt.contains("\n\nGuidelines:\n-"));
let cache = KvCachePreferences::default().settings();
let deepseek = defaults.turn_settings(ModelChoice::DeepSeekV4Flash, cache);
assert_eq!(