mirror of
https://github.com/openai/codex.git
synced 2026-04-29 19:03:02 +03:00
feat: /diff command to view git diff (#426)
Adds `/diff` command to view git diff
This commit is contained in:
@@ -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
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user