Placeholder text
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ const leadSource: ChatSource = {
|
||||
streamTopic: "lead.stream",
|
||||
empty: "",
|
||||
canSend: () => true,
|
||||
placeholder: (s) => (s === "running" ? "Message your lead; it reads this after its next tool call, or when its turn ends" : "Message your lead. Paste or drop images to attach them."),
|
||||
placeholder: "Message your lead. Paste or drop images to attach them.",
|
||||
send: async ({ text, images, model, firstModel, sessionId }) => {
|
||||
await post("/api/me/lead/messages", { body: { text, images, model: sessionId ? model : firstModel } });
|
||||
},
|
||||
|
||||
+3
-4
@@ -23,7 +23,7 @@ export type ChatSource = {
|
||||
streamTopic: Topic;
|
||||
empty: string;
|
||||
canSend: (sessionState: string) => boolean;
|
||||
placeholder: (sessionState: string) => string;
|
||||
placeholder: string;
|
||||
send: (m: { key: string; sessionId: string | undefined; text: string; images: string[] | undefined; model: string | undefined; firstModel: string }) => Promise<void>;
|
||||
};
|
||||
|
||||
@@ -92,8 +92,7 @@ const taskSource: ChatSource = {
|
||||
streamTopic: "stream",
|
||||
empty: "No task selected. Ask your lead, or pick one with ⌘K.",
|
||||
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.",
|
||||
placeholder: "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 } });
|
||||
@@ -724,7 +723,7 @@ function composeForm(
|
||||
vendor: string | undefined,
|
||||
showPending: (text: string, imgs: PendingImage[]) => () => void,
|
||||
): HTMLElement {
|
||||
const text = h("textarea", { placeholder: src.placeholder(sessionState), rows: 3 });
|
||||
const text = h("textarea", { placeholder: src.placeholder, rows: 3 });
|
||||
const clearDraft = keepDraft(text, `message:${key}`);
|
||||
const send = h("button", { type: "submit", disabled: !src.canSend(sessionState) }, "Send");
|
||||
const interrupt = h("button", { type: "button", class: "danger", disabled: sessionState !== "running" }, "Interrupt");
|
||||
|
||||
Reference in New Issue
Block a user