MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / revealFileCommandFor

Function revealFileCommandFor

packages/server/src/lib/fileLaunch.ts:39–51  ·  view source on GitHub ↗
(
  absolutePath: string,
  platform: NodeJS.Platform = process.platform,
)

Source from the content-addressed store, hash-verified

37}
38
39export function revealFileCommandFor(
40 absolutePath: string,
41 platform: NodeJS.Platform = process.platform,
42): LaunchCommand {
43 switch (platform) {
44 case 'darwin':
45 return { command: 'open', args: ['-R', absolutePath] };
46 case 'win32':
47 return { command: 'explorer.exe', args: [`/select,${absolutePath}`] };
48 default:
49 return { command: 'xdg-open', args: [path.dirname(absolutePath)] };
50 }
51}
52
53export type OpenInAppId =
54 | 'finder'

Callers 2

fileLaunch.test.tsFile · 0.90
handleRevealFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected