-
Notifications
You must be signed in to change notification settings - Fork 313
feat: implement 4 reliability improvements #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| import { useEffect } from "react"; | ||
|
|
||
| import { ChatPanel } from "./components/Chat"; | ||
| import { FileBrowser } from "./components/FileBrowser"; | ||
| import { OnboardingWizard } from "./components/Onboarding"; | ||
| import { SettingsPanel } from "./components/Settings"; | ||
| import { useOnboardingStore } from "./stores/onboardingStore"; | ||
| import { useSettingsStore } from "./stores/settingsStore"; | ||
|
|
||
| /** | ||
| * Root application component. | ||
| * | ||
| * Shows the OnboardingWizard on first run, then the main app layout. | ||
| */ | ||
| export function App(): React.JSX.Element { | ||
| const toggleSettings = useSettingsStore((s) => s.togglePanel); | ||
| const isSettingsOpen = useSettingsStore((s) => s.isOpen); | ||
| const startConfigWatch = useSettingsStore((s) => s.startConfigWatch); | ||
| const stopConfigWatch = useSettingsStore((s) => s.stopConfigWatch); | ||
| const configReloadNotification = useSettingsStore( | ||
| (s) => s.configReloadNotification, | ||
| ); | ||
| const clearConfigReloadNotification = useSettingsStore( | ||
| (s) => s.clearConfigReloadNotification, | ||
| ); | ||
| const isOnboardingComplete = useOnboardingStore((s) => s.isComplete); | ||
|
|
||
| // Start/stop config file watching based on settings panel state | ||
| useEffect(() => { | ||
| if (isSettingsOpen) { | ||
| startConfigWatch(); | ||
| } else { | ||
| stopConfigWatch(); | ||
| } | ||
| return () => stopConfigWatch(); | ||
| }, [isSettingsOpen, startConfigWatch, stopConfigWatch]); | ||
|
|
||
| if (!isOnboardingComplete) { | ||
| return <OnboardingWizard />; | ||
| } | ||
|
|
||
| return ( | ||
| <div className="app-container"> | ||
| {/* Config reload toast notification */} | ||
| {configReloadNotification && ( | ||
| <div | ||
| className="config-reload-toast" | ||
| onClick={clearConfigReloadNotification} | ||
| > | ||
| <span className="toast-icon">🔄</span> | ||
| <span className="toast-message">{configReloadNotification}</span> | ||
| <button className="toast-close" aria-label="Dismiss"> | ||
| × | ||
| </button> | ||
| </div> | ||
| )} | ||
|
|
||
| <header className="app-header"> | ||
| <div className="app-title-group"> | ||
| <div className="app-title-row"> | ||
| <h1>LocalCowork</h1> | ||
| <span className="app-badge">on-device</span> | ||
| </div> | ||
| <span className="app-subtitle"> | ||
| powered by LFM2-24B-A2B from Liquid AI | ||
| </span> | ||
| </div> | ||
| <div className="app-header-spacer" /> | ||
| <button | ||
| className="app-settings-btn" | ||
| onClick={toggleSettings} | ||
| type="button" | ||
| title="Settings" | ||
| aria-label="Open settings" | ||
| > | ||
| ⚙ | ||
| </button> | ||
| </header> | ||
|
|
||
| <main className="app-main"> | ||
| <FileBrowser /> | ||
| <ChatPanel /> | ||
| </main> | ||
|
|
||
| <footer className="app-footer"> | ||
| <span>v0.1.0 — Agent Core</span> | ||
| </footer> | ||
|
|
||
| <SettingsPanel /> | ||
| </div> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,118 @@ | ||||||||||
| /** | ||||||||||
| * MessageInput — text input area for sending messages. | ||||||||||
| * | ||||||||||
| * Supports Enter to send (Shift+Enter for newline) and disables | ||||||||||
| * input while the assistant is generating. Includes an InputToolbar | ||||||||||
| * below the textarea for folder context (Cowork-style "Work in a folder"). | ||||||||||
| * Implements debouncing to prevent duplicate sends. | ||||||||||
| */ | ||||||||||
|
|
||||||||||
| import { useCallback, useRef, useState } from "react"; | ||||||||||
|
|
||||||||||
| import { InputToolbar } from "./InputToolbar"; | ||||||||||
|
||||||||||
| import { InputToolbar } from "./InputToolbar"; | |
| function InputToolbar(): React.JSX.Element { | |
| return <div className="input-toolbar" />; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These imports point to modules that don't exist under
src/in this PR (e.g../components/Chat,./components/FileBrowser,./stores/onboardingStore). This will break the frontend build unless the missing modules are added or the imports are corrected to the actual locations.