feat(frontend): store lastUserEntry + stepMessages; record user input/choice
This commit is contained in:
@@ -6,6 +6,7 @@ import { postSteer, createSession } from "../api/sessions";
|
||||
import { getSettings, putSettings, type Settings } from "../api/settings";
|
||||
import { listWorkspaces } from "../api/workspaces";
|
||||
import { listModels } from "../api/models";
|
||||
import { useSessionStore } from "../store/sessionStore";
|
||||
|
||||
const THINKING_LEVELS = ["low", "medium", "high"] as const;
|
||||
|
||||
@@ -23,6 +24,7 @@ interface Props {
|
||||
export function SteerInput({ sessionId, onSessionCreated, onStop, inputRef }: Props) {
|
||||
const [text, setText] = useState("");
|
||||
const [busy, setBusy] = useState(false);
|
||||
const setLastUserEntry = useSessionStore((s) => s.setLastUserEntry);
|
||||
|
||||
async function submit() {
|
||||
const trimmed = text.trim();
|
||||
@@ -35,6 +37,7 @@ export function SteerInput({ sessionId, onSessionCreated, onStop, inputRef }: Pr
|
||||
const { id } = await createSession({ question: trimmed });
|
||||
onSessionCreated?.(id);
|
||||
}
|
||||
setLastUserEntry({ kind: "input", text: trimmed });
|
||||
setText("");
|
||||
} finally {
|
||||
setBusy(false);
|
||||
|
||||
Reference in New Issue
Block a user