mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Solves #510 This PR changes the `/bug` command to print the URL into the terminal (so it works in headless sessions) instead of trying to open a browser. --------- Co-authored-by: Thibault Sottiaux <tibo@openai.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
36a5a02d5c
commit
5e40d9d221
@@ -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 history
|
||||
setItems((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,
|
||||
{
|
||||
|
||||
@@ -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 diff
|
||||
|
||||
Reference in New Issue
Block a user