fix: use --append-system-prompt for Russian, change greeting to Russian

This commit is contained in:
neken
2026-04-10 17:39:51 +05:00
parent 2e28476a52
commit 8bccf6ce88
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ export function registerCommands(
// Run Claude session creation without blocking the bot
claude.createSession(
"You are now connected via Telegram. Briefly confirm you're ready and state the project directory.",
"Ты подключён через Telegram. Коротко подтверди готовность и укажи рабочую директорию проекта.",
resolved.path,
).then(({ sessionId, result }) => {
manager.createSession(resolved.name, resolved.path, sessionId);
+3 -3
View File
@@ -42,12 +42,12 @@ function runClaude(args: string[], cwd: string): Promise<string> {
});
}
const SYSTEM_PROMPT = "Always respond in Russian. Be concise.";
const APPEND_PROMPT = "Always respond in Russian. Be concise.";
export class ClaudeService {
async createSession(prompt: string, cwd: string): Promise<ClaudeResult> {
const raw = await runClaude(
["-p", prompt, "--output-format", "json", "--dangerously-skip-permissions", "--system-prompt", SYSTEM_PROMPT],
["-p", prompt, "--output-format", "json", "--dangerously-skip-permissions", "--append-system-prompt", APPEND_PROMPT],
cwd,
);
@@ -61,7 +61,7 @@ export class ClaudeService {
async sendMessage(prompt: string, sessionId: string): Promise<string> {
const raw = await runClaude(
["-p", prompt, "--output-format", "json", "--resume", sessionId, "--dangerously-skip-permissions"],
["-p", prompt, "--output-format", "json", "--resume", sessionId, "--dangerously-skip-permissions", "--append-system-prompt", APPEND_PROMPT],
process.cwd(),
);