mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Show a spinner on a note that is sent and waiting for Plan2Code
AI Assisted
This commit is contained in:
1 parent
275f1cb320
commit
9f4ee75c0b
4 files changed
+21
-2
No files matched your search
@@ -678,7 +678,7 @@ export function renderAside() {
|
||||
const box = el("div", "msg" + (mine ? " you" : "") + (pending ? " pending" : ""));
|
||||
const who = el("div", "msg-who");
|
||||
who.appendChild(el("span", null, mine ? "You" : "Plan2Code"));
|
||||
if (pending) who.appendChild(el("span", null, "Sent, waiting for Plan2Code"));
|
||||
if (pending) who.appendChild(sentWaitingTag());
|
||||
else if (m.at) who.appendChild(el("span", null, shortTime(m.at)));
|
||||
box.appendChild(who);
|
||||
if (m.suggest === true) box.appendChild(suggestTag());
|
||||
@@ -693,7 +693,7 @@ export function renderAside() {
|
||||
const box = el("div", "msg you pending");
|
||||
const who = el("div", "msg-who");
|
||||
who.appendChild(el("span", null, "You"));
|
||||
who.appendChild(el("span", null, "Sent, waiting for Plan2Code"));
|
||||
who.appendChild(sentWaitingTag());
|
||||
box.appendChild(who);
|
||||
if (waiting.suggest === true) box.appendChild(suggestTag());
|
||||
if (waiting.text) box.appendChild(md(waiting.text, "md"));
|
||||
@@ -771,6 +771,21 @@ function suggestChip(item) {
|
||||
return chip;
|
||||
}
|
||||
|
||||
// The label on a note that is sent and not yet picked up, with the page's small
|
||||
// ring in front so it is plain Plan2Code is still on it. Like the Ask reply
|
||||
// line, no ring once the agent has gone quiet: a turning ring would pass a
|
||||
// dead session for a slow one.
|
||||
function sentWaitingTag() {
|
||||
const tag = el("span", "sent-wait");
|
||||
if (askState().send.state !== "offline" && !agentAdrift()) {
|
||||
const spin = el("span", "spinner tiny");
|
||||
spin.setAttribute("aria-hidden", "true");
|
||||
tag.appendChild(spin);
|
||||
}
|
||||
tag.appendChild(el("span", null, "Sent, waiting for Plan2Code"));
|
||||
return tag;
|
||||
}
|
||||
|
||||
function suggestTag() {
|
||||
return el("span", "pill suggest-tag", "Asked for suggestions");
|
||||
}
|
||||
|
||||
@@ -414,6 +414,8 @@ h1 {
|
||||
color: var(--ink-3); margin-bottom: 4px; display: flex; justify-content: space-between; gap: 8px;
|
||||
}
|
||||
|
||||
.msg-who .sent-wait { display: inline-flex; align-items: center; gap: 6px; }
|
||||
|
||||
.aside-empty { color: var(--ink-3); font-size: 13px; font-style: italic; }
|
||||
|
||||
/* The note box takes whatever height the panel has left, never under 160px.
|
||||
|
||||
Reference in new issue
Block a user