Queue mid-turn messages for the next tool call; remove all tests
This commit is contained in:
+4
-3
@@ -89,8 +89,9 @@ const taskSource: ChatSource = {
|
||||
transcriptTopic: "transcript",
|
||||
streamTopic: "stream",
|
||||
empty: "No task selected. Ask your lead, or pick one with ⌘K.",
|
||||
canSend: (s) => s === "idle",
|
||||
placeholder: (s) => (s === "idle" ? "Message the agent. Paste or drop images to attach them." : "Wait for the turn to end, or interrupt it"),
|
||||
canSend: () => true,
|
||||
placeholder: (s) =>
|
||||
s === "running" ? "Message the agent; it reads this after its next tool call, or when its turn ends" : "Message the agent. Paste or drop images to attach them.",
|
||||
send: async ({ key, sessionId, text, images, model, firstModel }) => {
|
||||
if (sessionId) {
|
||||
await post("/api/sessions/{sessionId}/messages", { path: { sessionId }, body: { text, images, model } });
|
||||
@@ -344,7 +345,7 @@ export function mountChat(root: HTMLElement, src: ChatSource, makeHead: (rerende
|
||||
const el = h(
|
||||
"div",
|
||||
{ class: "msg user pending" },
|
||||
h("div", { class: "who" }, "sending…"),
|
||||
h("div", { class: "who" }, src.session()?.state === "running" ? "queued…" : "sending…"),
|
||||
imgs.length > 0 ? h("div", { class: "msg-images" }, ...imgs.map((img) => h("img", { src: img.url, alt: "attached image" }))) : null,
|
||||
text.trim() ? markdown(text, "text md") : null,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user