HAPI Chat for VS CodeA small, independent client for HAPI. Connections and folders live on the left. Full HAPI website chats open in the right sidebar and in independent windows beside each other. Open several instances, select saved hub profiles and sign in automatically. Chats follow your editor's light/dark theme. Proxy use is configurable. Optional integrated-browser tabs and minimal custom chat panels remain available.
Install and connectInstall 3ndetz.hapi-chat from the Visual Studio Marketplace in VS Code, or from Open VSX. You can also download a After installing an update, run Developer: Reload Window so that the current window loads the new sidebar contribution. If VS Code reports that the HAPI sidebar is unavailable, reload the window and open the chat again. Reloading keeps saved profiles and tokens.
Sidebar login is automatic from the saved profile. Hub keys stay in SecretStorage and the extension host. A private loopback adapter loads the hub's actual website and translates its temporary local login capability into normal hub authentication. Each open website instance has its own local origin, including duplicate views of the same chat. This keeps native event streams from exhausting the browser's per-origin HTTP connection limit and blocking Send, Edit or Cancel. The hub key never appears in website URLs or sidebar messages; navigation state saves only profile/session metadata. HTTP, streaming and WebSocket requests use the native hub unchanged. Integrated-browser mode uses its own normal website login. HAPI: Copy Login Token explicitly copies a saved key for that hub's login form; clipboard clears after one minute if unchanged. Browser login persistence follows Hub URLs may include a proxy prefix, for example Parallel chats and multiple hubsAdd as many named connections as you need. Use HAPI: Switch Connection to select the default for new/open chat commands. The sidebar lists all saved connections, so you can also open chats or start sessions directly under a particular hub. Profile edits are serialized so rapid saves cannot overwrite another connection. Each extension host keeps its acknowledged profile list; reload another main VS Code window to load profiles edited elsewhere. Auxiliary chat windows share the original host and update immediately. Names, hub URLs and safe navigation metadata are saved together by atomic replacement of The left sidebar lists sessions as hub → working folder → chats, keeping folders on different runner machines separate. The independent right chat header shows the current chat and profile. Opening another profile preserves other chats. Each website stays loaded independently. Native navigation updates the VS Code tab title from the selected session's HAPI metadata, including chats opened inside the site. The header configures Hub, Proxy and native Font size, and opens parallel windows or the external browser. Chat selection and agent actions belong to HAPI. Switching between the left configuration and an editor does not hide the right chat. Both containers can still be moved using VS Code's normal view controls. Sidebar navigation is restored from extension state. Each website instance's adapter reuses its saved local port when available, so HAPI can retain website preferences and drafts for that origin; if the port is occupied, a new local origin is used. Integrated-browser and Custom modes still support editor tabs and Split Editor. VS Code manages integrated-browser restoration; Custom restores panel tabs and composer drafts. Choose the chat interfaceRun HAPI: Change Chat Mode, or set HAPI Chat: Chat Mode in Settings:
The setting affects newly opened chats. Existing web/custom views remain usable. HAPI Chat: Web Location selects HAPI Chat: Sync Editor Theme defaults to enabled. Dark and dark high-contrast editors pass a dark browser scheme; light editors pass light. Existing sidebar websites update without reloading or losing drafts. HAPI's Settings → Display → Appearance mode should be System (its default). Choosing a fixed Light/Dark/OLED mode on the site intentionally overrides the browser scheme. Color palettes stay under HAPI's own settings. Embedded websites render at their native size without CSS scaling or transforms, keeping text crisp. Adjust text and display preferences in HAPI itself. ⚙ → Font controls HAPI's own font-size preference (80–120%, verified with HAPI 0.30.7). It updates the active website's local preference and HAPI renders the text itself, without reloading. Other website instances and ordinary hub browser tabs keep their settings. A changed value is preserved when the local origin is restored; new embedded websites default to native 80%, preserving subsequent choices, including 100%. The control is disabled if the hub does not expose the supported native font setting or its CSP blocks the bridge. HAPI's own Display settings remain available. Included in custom mode
The optional custom panel is a minimal client. Terminal, attachments, voice, model/permission-mode settings, rich Markdown/images, history fork/import and advanced queue controls use the full website in Web mode. Custom-mode new sessions inherit the runner's default agent settings; agent content is displayed as text. Only sessions registered with HAPI are controllable here. This extension does not take ownership of sessions running in OpenAI's separate Codex extension. A saved/imported chat can still have an active native writer elsewhere; resume errors from that writer must be resolved through the native workflow, not by forcing a second writer. Multiple chat windowsKeep connections and folders on the left and the primary website chat in its normal sidebar. Left-clicking a session keeps the existing opening behavior. Right-click a chat in HAPI Connections to choose:
The same destinations appear in each chat's ⚙ settings under Open in, Move to, Copy to and New. Open/Copy keeps the source chat open. Move closes the source view after the destination opens, keeping the same session, local website storage, preferences and saved draft. Moving to the main view when already there simply reveals it. New opens HAPI's new-session form in the selected location using the current hub and working directory. Opening another view does not fork the agent conversation. Every editor tab is an independent native VS Code webview, including copies of the same conversation. Drag tabs between groups and resize columns using VS Code's normal controls. HAPI: Open Chat Beside and the split icon remain available as shortcuts. ⚙ → New → New window or HAPI: New Chat Window opens a fresh HAPI new-session form in its own column. A folder's context menu carries its directory into that form. This is HAPI's real website, with the same native features and runner-side project rules. Each window has its own saved-profile selector and stays on its own hub when another window changes profile. Keys are read from SecretStorage automatically. Closing a window closes its website only; it does not stop an agent. Use VS Code's Move into New Window editor-tab action to detach a chat panel, or HAPI: Open in Integrated Browser for an independent browser tab. Website preferences and drafts belong to each instance's local origin. Duplicate instances sign in from the same saved profile but use independent browser storage. Panels restore their safe navigation metadata after a VS Code reload. A small adapter bridge observes the website's current session path so that opening beside, reloading and restoring follow chats created or selected inside the native website. It never reports tokens or conversation text. If a hub's own content-security policy blocks the bridge, use the session tree to open the desired chat; native website framing/security policies are respected. Embedded chats skip HAPI's one-time composer tips for scratchlists and rich mentions, so the “Got it” popovers do not repeat in each new window. The composer features remain available. Ordinary browser tabs keep HAPI's normal onboarding. ⚙ → Open in browser (or HAPI: Open in Browser) opens the current session in the operating system's default browser with automatic login. A separate temporary loopback adapter consumes a scoped capability and authenticates through the saved profile. The real hub key never enters the URL. Closing the chat view leaves this browser adapter running; keep VS Code open to use it. Editing/removing its profile or shutting down the extension stops the adapter. Browser display preferences are independent of the embedded chat. If the adapter or saved-profile authentication is unavailable, the button opens the original hub URL for normal browser login. Proxy settingsHAPI Chat: Use VS Code Proxy ( Disable the setting for direct HAPI connections even if VS Code or the environment specifies a proxy:
Each hub has its own saved Proxy mode, in addition to the global switch. Choose it when adding/editing a profile, right-click a hub and select HAPI: Connection Proxy, or use ⚙ → Proxy above the website. Global setting (default, including existing profiles) follows The global setting affects subsequent extension requests without an editor restart. Already established streams/sockets retain their route until reconnect. Reload the chat window to reconnect the embedded website. It does not change global VS Code settings, other extensions, the runner's network or optional external integrated-browser traffic. TLS verification stays enabled unless your explicit Credentials and compatibilityHub access keys use VS Code SecretStorage. Profile names/URLs and navigation metadata use global extension storage. Keys are never stored in settings, source files or tab state and never sent to sidebar/custom chat scripts. The sidebar's loopback adapter listens only on Editing a URL requires a new token and closes that profile's sidebar websites and custom panels. Removing a profile deletes its SecretStorage key and stops its loopback adapter. Other profiles remain usable. External integrated-browser tabs/logins are managed by VS Code/HAPI independently. API authentication refuses redirects; enter the final hub URL directly. TLS certificates must be trusted. In SSH/remote workspaces the extension and adapter run on the UI side, so the hub must be reachable from the client computer. Hub framing/CSP policies remain in force; use integrated-browser mode if your hub refuses embedded pages. The session list and custom panel use the native REST + SSE API, with no internal РусскийУстановка: скачайте VSIX из Releases, затем выберите Extensions: Install from VSIX… и перезагрузите окно VS Code. В HAPI Connections слева настройте профили и выберите чат в списке папок. Сам чат откроется отдельно в HAPI Chats справа, на всю высоту панели. Ключ хранится в SecretStorage, вход автоматический. Сверху одна строка высотой 26 пикселей. Нажатие на неё или ⚙ раскрывает профиль Hub, Proxy, штатный размер шрифта Font и кнопки открытия окон. Выбор чата и машины открывается левой стрелкой внутри самого HAPI. Его меню отвечает за остальные настройки чата. Сайт отображается в исходном размере, без масштабирования и размытия. Font в меню меняет штатный размер текста HAPI от 80% до 120% только в текущем окне. При первом открытии размер по умолчанию 80%. Последующий ручной выбор, включая 100%, сохраняется. Другие окна и обычный браузер сохраняют свои настройки. При переходе между сессиями название вкладки берётся из данных выбранного чата. Команда HAPI: Show Right Chat Panel показывает правую панель. Нужен VS Code 1.106 или новее. Чтобы видеть несколько чатов одновременно, нажмите ⚙ → Open a copy beside или выполните HAPI: Open Chat Beside. Каждый клик открывает отдельную область рядом, даже для того же чата. HAPI: New Chat Window открывает форму нового чата в своей области. У каждой области своя шапка Hub с сохранёнными профилями и автовходом. Вкладки можно перетаскивать и расставлять как на примере с Codex. Для отдельного окна выберите Move into New Window в меню вкладки VS Code. В каждом чате появился список ⚙ → Proxy: Global setting следует общей настройке, Use VS Code proxy включает прокси для этого хаба, Direct connection подключает этот хаб напрямую. Выбор хранится в профиле. Также он доступен при добавлении и редактировании подключения или через правую кнопку на хабе, HAPI: Connection Proxy. Токен повторно вводить не нужно. При смене режима переподключаются только чаты этого хаба. У вкладок веб и Custom чатов есть иконка HAPI Chat. Каждому открытому сайту выделен отдельный локальный адрес, чтобы постоянные соединения других чатов не блокировали отправку и кнопки очереди. Это действует и при нескольких окнах одного чата. В настройках HAPI Chat: Use VS Code Proxy по умолчанию включено использование HTTP(S) прокси VS Code. Выключите настройку, чтобы расширение подключалось напрямую. Она действует на список, вход и встроенный сайт, включая поток сообщений и WebSocket. Для переподключения уже открытого сайта перезагрузите окно чата. Глобальные настройки VS Code и других расширений не меняются. Список ниже сгруппирован как центр → рабочая папка → чаты. HAPI: Show Chat List открывает список. Кнопка + у папки открывает новый чат с этой рабочей папкой. Настройка HAPI Chat: Sync Editor Theme включена по умолчанию: сайт подхватывает светлую или тёмную тему VS Code. В самом HAPI оставьте Settings → Display → Appearance mode → System, чтобы ручной выбор темы не перекрывал синхронизацию. HAPI: Change Chat Mode переключает ⚙ → Open in browser открывает этот чат в обычном браузере с автоматическим входом через сохранённый профиль. Для этого VS Code должен оставаться открытым. Закрытие панели чата не закрывает соединение браузера. Если автоматический вход недоступен, открывается исходный адрес хаба с обычной формой входа. ⚙ → New chat window открывает новый чат в соседней колонке. Development
To release, commit/push the source and package a VSIX. Publish the already built VSIX with MIT licensed. Unaffiliated with the HAPI and VS Code projects. No upstream HAPI source is bundled. |

