Placeholder text
This commit is contained in:
Vendored
+1
-1
@@ -14,7 +14,7 @@ const leadSource = {
|
||||
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 } });
|
||||
},
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"lead.js","sourceRoot":"","sources":["../src/lead.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,SAAS,EAA8B,MAAM,WAAW,CAAC;AAEjF,MAAM,UAAU,GAAe;IAC7B,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM;IACjB,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc;IAClC,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE;IACd,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS;IACvB,WAAW,EAAE,EAAE;IACf,aAAa,EAAE,CAAC,eAAe,CAAC;IAChC,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI;IACnB,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,kFAAkF,CAAC,CAAC,CAAC,yDAAyD,CAAC;IACtL,IAAI,EAAE,KAAK,EAAE,EAAE,I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AE,QAAQ,CAAC,CAAC;AAC/C,CAAC"}
|
||||
Vendored
+2
-2
@@ -32,7 +32,7 @@ const taskSource = {
|
||||
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 } });
|
||||
@@ -616,7 +616,7 @@ function modelSelect(key, current, vendor) {
|
||||
return select;
|
||||
}
|
||||
function composeForm(src, key, sessionId, sessionState, currentModel, vendor, showPending) {
|
||||
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");
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+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