feat(web): wire AI feature view against AIStore
- Add apps/web/src/features/ai/AI.tsx: session sidebar, messages/suggestions/notes tabs, full CRUD against @pubscript/ai AIStore - Route the /ai page to the new AI view; remove the static stub - Add @pubscript/ai workspace dependency to apps/web - Typecheck (7 packages) and tests (71 AI + 13 web) pass
This commit is contained in:
@@ -1,32 +1,5 @@
|
||||
import { Button, Input, toast } from "@pubscript/ui";
|
||||
import { AI as AIView } from "../features/ai/AI.js";
|
||||
|
||||
export function AI() {
|
||||
return (
|
||||
<div className="ps-content">
|
||||
<h1 style={{ margin: "0 0 16px", fontSize: 24 }}>AI Assistant</h1>
|
||||
<p className="ps-settings-desc" style={{ marginBottom: 20 }}>
|
||||
Local-first AI: prompts run against your configured provider. Nothing leaves your machine unless you allow it.
|
||||
</p>
|
||||
|
||||
<Input
|
||||
label="Prompt"
|
||||
placeholder="Summarize Mara's arc so far…"
|
||||
style={{ width: "100%", marginBottom: 12 }}
|
||||
/>
|
||||
<div style={{ display: "flex", gap: 10 }}>
|
||||
<Button variant="primary" onClick={() => toast.success("Prompt queued locally.")}>Run locally</Button>
|
||||
<Button variant="secondary">Refine character</Button>
|
||||
<Button variant="secondary">Outline next chapter</Button>
|
||||
</div>
|
||||
|
||||
<div style={{ marginTop: 24, padding: 16, background: "var(--ps-surface)", border: "1px solid var(--ps-border)", borderRadius: 8 }}>
|
||||
<h3 style={{ marginTop: 0, fontSize: 14 }}>Privacy</h3>
|
||||
<ul style={{ margin: 0, paddingLeft: 18, lineHeight: 1.8, fontSize: 14 }}>
|
||||
<li>Documents are never uploaded without explicit consent.</li>
|
||||
<li>Context is chunked to stay within the token budget.</li>
|
||||
<li>Session history is stored locally and deletable.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
return <AIView />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user