Skip to content

Commit 6051318

Browse files
committed
switch linux open browser command to xdg-open
1 parent f964db4 commit 6051318

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

npm-app/src/client.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,18 @@ import { identifyUser, trackEvent } from './utils/analytics'
8686
import { getRepoMetrics, gitCommandIsAvailable } from './utils/git'
8787

8888
import { getLoadedAgentNames } from './agents/load-agents'
89+
import { refreshSubagentDisplay } from './cli-handlers/subagent'
90+
import {
91+
clearSubagentStorage,
92+
getAllSubagentIds,
93+
markSubagentInactive,
94+
storeSubagentChunk,
95+
} from './subagent-storage'
8996
import { logger, loggerContext } from './utils/logger'
9097
import { Spinner } from './utils/spinner'
9198
import { toolRenderers } from './utils/tool-renderers'
9299
import { createXMLStreamParser } from './utils/xml-stream-parser'
93100
import { getScrapedContentBlocks, parseUrlsFromContent } from './web-scraper'
94-
import {
95-
storeSubagentChunk,
96-
markSubagentInactive,
97-
getAllSubagentIds,
98-
clearSubagentStorage,
99-
} from './subagent-storage'
100-
import { refreshSubagentDisplay } from './cli-handlers/subagent'
101101

102102
const LOW_BALANCE_THRESHOLD = 100
103103

@@ -555,7 +555,13 @@ export class Client {
555555
let shouldRequestLogin = true
556556
CLI.getInstance().rl.once('line', () => {
557557
if (shouldRequestLogin) {
558-
spawn(process.platform === 'win32' ? 'start' : 'open', [loginUrl])
558+
const openCommand =
559+
process.platform === 'win32'
560+
? 'start'
561+
: process.platform === 'linux'
562+
? 'xdg-open'
563+
: 'open'
564+
spawn(openCommand, [loginUrl])
559565
console.log(
560566
"Opened a browser window to log you in! If it doesn't open automatically, you can click this link:"
561567
)

0 commit comments

Comments
 (0)