- App.tsx: Add AutoProjectBootstrap that listens for server welcome and auto-creates project + thread from server's cwd - Sidebar: Conditionalize drag region (Electron only), hide Browse button in browser - ChatView: Conditionalize drag region, adjust padding for browser - DiffPanel: Same drag region treatment - index.html: Update title to 'CodeThing' - env.ts: isElectron detection utility Co-authored-by: Theo Browne <[email protected]>
8 lines
327 B
TypeScript
8 lines
327 B
TypeScript
/**
|
|
* True when running inside the Electron preload bridge, false in a regular browser.
|
|
* The preload script sets window.nativeApi via contextBridge before any renderer
|
|
* code executes, so this is reliable at module load time.
|
|
*/
|
|
export const isElectron =
|
|
typeof window !== "undefined" && window.nativeApi !== undefined;
|