Skip to content

Commit 619b6cf

Browse files
kagura-agentKagura Chen
andauthored
fix: allow creating markdown (.md) files (fixes #11) (#22)
Co-authored-by: Kagura Chen <daniyuu19@sjtu.edu.cn>
1 parent 8493ea8 commit 619b6cf

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ export async function loadAgent(
318318
319319
Your working directory is \`${agentDir}\`.
320320
321-
When creating files (documents, PDFs, images, spreadsheets, code output, exports, assets, etc.), write them to the \`workspace/\` directory by default.
322-
- Example: \`workspace/report.pdf\`, \`workspace/chart.png\`, \`workspace/data.csv\`
321+
When creating files (documents, markdown files, PDFs, images, spreadsheets, code output, exports, assets, etc.), write them to the \`workspace/\` directory by default.
322+
- Example: \`workspace/report.pdf\`, \`workspace/chart.png\`, \`workspace/data.csv\`, \`workspace/todo.md\`
323323
- The \`workspace/\` directory is the designated output folder for generated artifacts
324324
- If the user explicitly specifies a path (e.g. "create ~/notes/todo.md"), use the path they requested
325325
- This rule applies to ALL channels: voice, chat, Telegram, WhatsApp`);

src/voice/server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ export async function startVoiceServer(opts: VoiceServerOptions): Promise<() =>
484484
const { tools: composioTools, promptSuffix: composioPromptSuffix } = await getComposioContext(prompt);
485485

486486
let systemPromptSuffix = getCurrentDateTimeContext();
487-
systemPromptSuffix += "\nWhen creating files (PDFs, images, documents, code output, etc.), write them to the workspace/ directory by default. If the user explicitly specifies a different path, use the path they requested.";
487+
systemPromptSuffix += "\nWhen creating files (PDFs, images, documents, markdown files, code output, etc.), write them to the workspace/ directory by default. If the user explicitly specifies a different path, use the path they requested.";
488488
if (whatsappSock && whatsappConnected) {
489489
systemPromptSuffix += "\nYou can send WhatsApp messages using the send_whatsapp_message tool and set up auto-response triggers using create_trigger.";
490490
} else {
@@ -954,7 +954,7 @@ ${runningContext}`;
954954
const tgComposio = await getComposioContext(fullText);
955955
let tgSystemPrompt = "You are an AI assistant responding to a Telegram user. " +
956956
"Any files you create or modify will be AUTOMATICALLY sent back to the user on Telegram. " +
957-
"When asked to create documents (PDF, Word, PPT, spreadsheets, images, text files, etc.), " +
957+
"When asked to create documents (PDF, Word, PPT, spreadsheets, images, markdown files, text files, etc.), " +
958958
"write them to the workspace/ directory. The files will be delivered to the user immediately after you finish. " +
959959
"Keep text responses concise since they appear in a chat interface.";
960960
if (whatsappSock && whatsappConnected) {
@@ -1460,7 +1460,7 @@ ${runningContext}`;
14601460
const waComposio = await getComposioContext(text);
14611461
let waSystemPrompt = "You are an AI assistant responding via WhatsApp. " +
14621462
"Any files you create or modify will be AUTOMATICALLY sent back to the user on WhatsApp. " +
1463-
"When asked to create documents, write them to the workspace/ directory. " +
1463+
"When asked to create documents or markdown files, write them to the workspace/ directory. " +
14641464
"Keep text responses concise since they appear in a chat interface. " +
14651465
"You can send WhatsApp messages to other people using the send_whatsapp_message tool. " +
14661466
"If you don't know a contact's number, ask the user or use list_whatsapp_contacts to check saved contacts. " +

0 commit comments

Comments
 (0)