fix: use --append-system-prompt for Russian, change greeting to Russian
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user