diff --git a/web/src/components/WatchlistChat.tsx b/web/src/components/WatchlistChat.tsx
index af08ed1..c37c28f 100644
--- a/web/src/components/WatchlistChat.tsx
+++ b/web/src/components/WatchlistChat.tsx
@@ -36,7 +36,9 @@ export function WatchlistDrawer() {
{err()}
- {(t) => {t} del(t)}>× }
+ Ketik kode saham lalu Add — mis. BBCA, TLKM, BBRI.}>
+ {(t) => {t} del(t)}>× }
+
@@ -45,7 +47,7 @@ export function WatchlistDrawer() {
export function ChatSidebar() {
const [msg, setMsg] = createSignal("");
- const [log, setLog] = createSignal<{ q: string; a: string }[]>([]);
+ const [log, setLog] = createSignal<{ q: string; a: string; err?: boolean }[]>([]);
async function send() {
const q = msg().trim();
if (!q) return;
@@ -54,18 +56,25 @@ export function ChatSidebar() {
const r = await api.chat(q);
setLog((p) => [...p, { q, a: r.answer }].slice(-10));
} catch (e) {
- setLog((p) => [...p, { q, a: String(e) }].slice(-10));
+ setLog((p) => [...p, { q, a: String(e), err: true }].slice(-10));
}
}
return (
AI Chat
-
-
- {(m) => You: {m.q}
{m.a.slice(0, 500)}
}
-
-
+ Tanya soal watchlist-mu — sistem jawab dari data yang tersimpan (bukan karangan).}>
+
+
+ {(m) => (
+
+
You: {m.q}
+
{m.a.slice(0, 500)}
+
+ )}
+
+
+
Tanya AI
setMsg(e.currentTarget.value)} onKeyDown={(e: KeyboardEvent) => { if (e.key === "Enter") send(); }} />
@@ -74,4 +83,4 @@ export function ChatSidebar() {
);
-}
\ No newline at end of file
+}