Replace the docked right-aside AI chat with a floating, draggable, resizable, minimizable window per the GitmostAgent design. The "AI chat" entry points (page header menu, page-history item) now open the window instead of the aside tab. - Add ai-chat-window.tsx + ai-chat-window.module.css: fixed-position window with viewport-clamped drag, CSS resize, minimize (hides body via CSS so ChatThread/useChat stays mounted and streaming is not aborted), and geometry kept in state (survives close/reopen, re-clamped on open via useLayoutEffect, size tracked with a ResizeObserver). - Reuse ChatThread, ConversationList and the transcript components unchanged; move all orchestration (active chat, adopt-new-chat, openPage, queries) into the window. - Header shows a tokens-only badge: sum of persisted metadata.usage for the active chat (no cost/context-total data available), hidden at 0. - Add aiChatWindowOpenAtom; mount the window once in global-app-shell. - Remove the aside "ai-chat" tab handling and delete ai-chat-panel.tsx. - Type IAiChatMessageRow.metadata.usage; add "Minimize" and "Tokens used in this chat" i18n keys.
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist