feat: support Codex goal slash command

This commit is contained in:
weishu
2026-05-15 22:15:17 +08:00
parent a099ae9199
commit 089ddad476
24 changed files with 808 additions and 6 deletions
+21
View File
@@ -149,6 +149,27 @@ export async function runCodex(opts: {
model: currentModel,
modelReasoningEffort: currentModelReasoningEffort
});
if (slash.kind === 'goal') {
if (slash.message) {
session.sendAgentMessage({
type: 'message',
message: slash.message,
id: randomUUID()
});
}
const goalCommand = slash.action === 'set'
? `/goal ${slash.objective ?? ''}`
: slash.action === 'show'
? '/goal'
: `/goal ${slash.action}`;
messageQueue.pushIsolateAndClear(goalCommand, {
permissionMode: currentPermissionMode ?? 'default',
model: currentModel,
modelReasoningEffort: currentModelReasoningEffort,
collaborationMode: currentCollaborationMode
}, localId);
return;
}
if (slash.kind !== 'passthrough') {
applySlashUpdates(slash.updates);
if (slash.message) {