feat: add /plan command and allow gh commands in plan mode (#544)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-14 15:29:44 -08:00
committed by GitHub
parent 38b86b756e
commit 565010f4f7
4 changed files with 131 additions and 2 deletions

View File

@@ -4818,6 +4818,27 @@ export default function App({
return { submitted: true };
}
// Special handling for /plan command - enter plan mode
if (trimmed === "/plan") {
// Generate plan file path and enter plan mode
const planPath = generatePlanFilePath();
permissionMode.setPlanFilePath(planPath);
permissionMode.setMode("plan");
setUiPermissionMode("plan");
// Add status message to transcript
const statusId = uid("status");
buffersRef.current.byId.set(statusId, {
kind: "status",
id: statusId,
lines: [`Plan mode enabled. Plan file: ${planPath}`],
});
buffersRef.current.order.push(statusId);
refreshDerived();
return { submitted: true };
}
// Special handling for /init command - initialize agent memory
if (trimmed === "/init") {
// Check for pending approvals before sending