feat: /diff command to view git diff (#426)

Adds `/diff` command to view git diff
This commit is contained in:
Fouad Matin
2025-04-19 16:23:27 -07:00
committed by GitHub
parent 419f085cc4
commit b3b195351e
12 changed files with 232 additions and 7 deletions

View File

@@ -52,6 +52,7 @@ export default function TerminalChatInput({
openModelOverlay,
openApprovalOverlay,
openHelpOverlay,
openDiffOverlay,
interruptAgent,
active,
thinkingSeconds,
@@ -72,6 +73,7 @@ export default function TerminalChatInput({
openModelOverlay: () => void;
openApprovalOverlay: () => void;
openHelpOverlay: () => void;
openDiffOverlay: () => void;
interruptAgent: () => void;
active: boolean;
thinkingSeconds: number;
@@ -230,6 +232,12 @@ export default function TerminalChatInput({
return;
}
if (inputValue === "/diff") {
setInput("");
openDiffOverlay();
return;
}
if (inputValue.startsWith("/model")) {
setInput("");
openModelOverlay();
@@ -337,6 +345,7 @@ export default function TerminalChatInput({
openApprovalOverlay,
openModelOverlay,
openHelpOverlay,
openDiffOverlay,
history, // Add history to the dependency array
],
);