File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1453,13 +1453,19 @@ export class CodexAcpAgent implements AcpAgent {
14531453 this . handler . setStream ( stream ) ;
14541454
14551455 try {
1456+ const isSlashCommand = / ^ \s * \/ \w + / . test ( prompt ) ;
1457+ const promptText = isSlashCommand
1458+ ? prompt
1459+ : `${ FILE_LINK_GUIDANCE } \n\n${ prompt } ` ;
14561460 const request : PromptRequest = {
14571461 sessionId : session . sessionId ,
14581462 prompt : [
14591463 {
14601464 type : "text" ,
1461- // Prepend guidance so file mentions become clickable links in CoCalc.
1462- text : `${ FILE_LINK_GUIDANCE } \n\n${ prompt } ` ,
1465+ // Prepend guidance so file mentions become clickable links in CoCalc,
1466+ // but leave slash-commands (e.g. /compact) untouched so Codex ACP
1467+ // can intercept them.
1468+ text : promptText ,
14631469 } ,
14641470 ] ,
14651471 } ;
You can’t perform that action at this time.
0 commit comments