MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getNativeMessagingHostsDirs

Function getNativeMessagingHostsDirs

src/utils/claudeInChrome/setup.ts:177–189  ·  view source on GitHub ↗

* Get native messaging hosts directories for all supported browsers * Returns an array of directories where the native host manifest should be installed

()

Source from the content-addressed store, hash-verified

175 * Returns an array of directories where the native host manifest should be installed
176 */
177function getNativeMessagingHostsDirs(): string[] {
178 const platform = getPlatform()
179
180 if (platform === 'windows') {
181 // Windows uses a single location with registry entries pointing to it
182 const home = homedir()
183 const appData = process.env.APPDATA || join(home, 'AppData', 'Local')
184 return [join(appData, 'Claude Code', 'ChromeNativeHost')]
185 }
186
187 // macOS and Linux: return all browser native messaging directories
188 return getAllNativeMessagingHostsDirs().map(({ path }) => path)
189}
190
191export async function installChromeNativeHostManifest(
192 manifestBinaryPath: string,

Callers 1

Calls 2

getPlatformFunction · 0.85

Tested by

no test coverage detected