Lightweight coding agent that runs in your terminal
Rust
feat(bug-report): print bug report URL in terminal instead of opening browser (#510) (#528)
nvp1595e40d9d22117
diff --git a/codex-cli/src/components/chat/terminal-chat-input.tsx b/codex-cli/src/components/chat/terminal-chat-input.tsxindex aad2e6b3c3..070f08f0ca 100644--- a/codex-cli/src/components/chat/terminal-chat-input.tsx+++ b/codex-cli/src/components/chat/terminal-chat-input.tsx@@ -470,15 +470,8 @@ export default function TerminalChatInput({setInput("");try {- // Dynamically import dependencies to avoid unnecessary bundle size- const [{ default: open }, os] = await Promise.all([- import("open"),- import("node:os"),- ]);-- // Lazy import CLI_VERSION to avoid circular deps+ const os = await import("node:os");const { CLI_VERSION } = await import("../../utils/session.js");-const { buildBugReportUrl } = await import("../../utils/bug-report.js");@@ -492,10 +485,6 @@ export default function TerminalChatInput({.join(" | "),});- // Open the URL in the user's default browser- await open(url, { wait: false });-- // Inform the user in the chat historysetItems((prev) => [...prev,{@@ -505,13 +494,13 @@ export default function TerminalChatInput({content: [{type: "input_text",- text: "π Opened browser to file a bug report. Please include any context that might help us fix the issue!",+ text: `π Bug report URL: ${url}`,},],},]);} catch (error) {- // If anything went wrong, notify the user+ // If anything went wrong, notify the user.setItems((prev) => [...prev,{diff --git a/codex-cli/src/components/help-overlay.tsx b/codex-cli/src/components/help-overlay.tsxindex 6eeffb9efb..d302f7551e 100644--- a/codex-cli/src/components/help-overlay.tsx+++ b/codex-cli/src/components/help-overlay.tsx@@ -53,7 +53,8 @@ export default function HelpOverlay({<Text color="cyan">/clearhistory</Text> β clear command history</Text><Text>- <Text color="cyan">/bug</Text> β file a bug report with session log+ <Text color="cyan">/bug</Text> β generate a prefilled GitHub issue URL+ with session log</Text><Text><Text color="cyan">/diff</Text> β view working tree git diffdiff --git a/codex-cli/src/utils/slash-commands.ts b/codex-cli/src/utils/slash-commands.tsindex b276c49135..4ccc3a9fc5 100644--- a/codex-cli/src/utils/slash-commands.ts+++ b/codex-cli/src/utils/slash-commands.ts@@ -23,7 +23,10 @@ export const SLASH_COMMANDS: Array<SlashCommand> = [{ command: "/help", description: "Show list of commands" },{ command: "/model", description: "Open model selection panel" },{ command: "/approval", description: "Open approval mode selection panel" },- { command: "/bug", description: "Generate a prefilled GitHub bug report" },+ {+ command: "/bug",+ description: "Generate a prefilled GitHub issue URL with session log",+ },{command: "/diff",description: