nandi/oripublic Fork 0
2434cc7fb724f02b34c0189dfd5fb30c1a8a68e3
Commits
Clone
git clone https://git.rickub.com/nandi/ori.git
git clone ssh://git@rickub.com/nandi/ori.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

forked from bots-garden/ori

App.tsx · 47 lines · 1.4 KBTypeScript Blame HistoryRaw
✨ Introduce new feature(s): ACP web client — Go backend (agent, bridge, httpserver, mockagent) + React SPA (Zed-like agent panel), tests, quality gate PASS 2434cc7 k33g yesterday1/**
2 * Root component: header with connection/session status, the conversation
3 * thread, and the composer. The WebSocket is injected so tests (and future
4 * embeddings) can supply a fake.
5 *
6 * @example
7 * <App socket={connectSocket({ url: wsUrl(), dispatch })} />
8 */
9
10import type { OriSocket } from "./ws";
11import { useChatState } from "./store";
12import { ChatThread } from "./components/ChatThread";
13import { PermissionPrompt } from "./components/PermissionPrompt";
14import { PlanView } from "./components/PlanView";
15import { PromptInput } from "./components/PromptInput";
16
17export function App({ socket }: { socket: OriSocket }) {
18 const state = useChatState();
19
20 return (
21 <div className="app">
22 <header className="topbar">
23 <h1 className="topbar-title">Ori</h1>
24 <span className={`status status-${state.connection}`}>
25 {state.connection}
26 {state.sessionId ? ` · ${state.sessionId}` : ""}
27 </span>
28 </header>
29 <ChatThread thread={state.thread} turnActive={state.turnActive} />
30 <PlanView entries={state.plan} />
31 {state.permissions.map((request) => (
32 <PermissionPrompt
33 key={request.requestId}
34 request={request}
35 onRespond={(requestId, optionId) =>
36 socket.send({ type: "permission_response", requestId, optionId })
37 }
38 />
39 ))}
40 <PromptInput
41 turnActive={state.turnActive}
42 onSend={(text) => socket.send({ type: "prompt", text })}
43 onCancel={() => socket.send({ type: "cancel" })}
44 />
45 </div>
46 );
47}