@co0ontty/wand 4.89.4 → 4.89.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/dist/ai-team-employee-binding.js +2 -1
- package/dist/archive-policy.d.ts +17 -0
- package/dist/archive-policy.js +8 -0
- package/dist/build-info.json +3 -3
- package/dist/fixed-employee-avatar.d.ts +6 -0
- package/dist/fixed-employee-avatar.js +4 -0
- package/dist/npm-update-utils.js +14 -12
- package/dist/plush-avatar.d.ts +2 -1
- package/dist/plush-avatar.js +4 -2
- package/dist/retention.js +8 -10
- package/dist/server-employee-routes.js +9 -3
- package/dist/server-session-routes.js +27 -23
- package/dist/server-task-routes.js +10 -0
- package/dist/server-update-routes.js +12 -3
- package/dist/server-workspace-routes.js +12 -0
- package/dist/server.js +4 -4
- package/dist/session-registry.js +7 -0
- package/dist/storage.js +12 -4
- package/dist/structured-session-manager.d.ts +5 -0
- package/dist/structured-session-manager.js +43 -9
- package/dist/task-archive-policy.d.ts +4 -0
- package/dist/task-archive-policy.js +16 -0
- package/dist/tui/commands.d.ts +1 -1
- package/dist/tui/commands.js +6 -3
- package/dist/web-ui/chat-message-meta.d.ts +3 -1
- package/dist/web-ui/chat-message-meta.js +21 -1
- package/dist/web-ui/content/ai-teams.js +13 -13
- package/dist/web-ui/content/licenses/codex-LICENSE.txt +21 -0
- package/dist/web-ui/content/plush-avatar.js +34 -34
- package/dist/web-ui/content/scripts.js +302 -398
- package/dist/web-ui/content/styles.css +1 -1
- package/dist/web-ui/content/tailwind.css +1 -1
- package/dist/web-ui/embedded-assets.js +4 -4
- package/dist/web-ui/markdown.js +3 -1
- package/dist/web-ui/provider-identity.d.ts +1 -1
- package/dist/web-ui/provider-identity.js +4 -3
- package/package.json +1 -1
- package/dist/commit-task-archive.d.ts +0 -8
- package/dist/commit-task-archive.js +0 -65
package/dist/web-ui/markdown.js
CHANGED
|
@@ -77,7 +77,9 @@ renderer.image = ({ href, text, title }) => {
|
|
|
77
77
|
if (!/^https?:\/\//i.test(href) && (!href.startsWith("/") || href.startsWith("//")))
|
|
78
78
|
return escapeHtml(text);
|
|
79
79
|
return '<img src="' + escapeHtml(href) + '" alt="' + escapeHtml(text) + '"' +
|
|
80
|
-
(title ? ' title="' + escapeHtml(title) + '"' : "") + ' loading="lazy" decoding="async"
|
|
80
|
+
(title ? ' title="' + escapeHtml(title) + '"' : "") + ' loading="lazy" decoding="async" role="button" tabindex="0"' +
|
|
81
|
+
' aria-label="查看' + escapeHtml(text || "图片") + '" onclick="event.stopPropagation();window.__openImageViewer?.(this);"' +
|
|
82
|
+
' onkeydown="if(event.key===\'Enter\'||event.key===\' \'){event.preventDefault();this.click();}">';
|
|
81
83
|
};
|
|
82
84
|
renderer.heading = function ({ depth, tokens }) {
|
|
83
85
|
const tag = "h" + Math.min(depth + 1, 6);
|
|
@@ -37,7 +37,7 @@ export declare function agentToolDisplayName(provider: unknown, engine?: AgentTo
|
|
|
37
37
|
export declare function isProviderId(value: unknown): value is ProviderId;
|
|
38
38
|
export declare const CLAUDE_BRAND_COLOR = "#D97757";
|
|
39
39
|
export declare const CLAUDE_LOGO_PATH = "m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z";
|
|
40
|
-
export declare const CODEX_LOGO_PATH = "
|
|
40
|
+
export declare const CODEX_LOGO_PATH = "M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z";
|
|
41
41
|
export declare const PI_LOGO_PATH = "M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z";
|
|
42
42
|
export declare const PI_LOGO_DOT_PATH = "M517.36 400H634.72V634.72H517.36Z";
|
|
43
43
|
export declare const GEMINI_LOGO_PATH = "M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81";
|
|
@@ -45,12 +45,13 @@ const PROVIDER_ID_SET = new Set(PROVIDER_IDS);
|
|
|
45
45
|
export function isProviderId(value) {
|
|
46
46
|
return typeof value === "string" && PROVIDER_ID_SET.has(value);
|
|
47
47
|
}
|
|
48
|
-
// Claude
|
|
48
|
+
// Claude paths match the existing Android BrandLogos source (simple-icons,
|
|
49
49
|
// CC0). Grok uses xAI's mark path already shipped by the Web new-session view.
|
|
50
50
|
// Claude keeps the official Anthropic orange instead of inheriting Wand accent.
|
|
51
51
|
export const CLAUDE_BRAND_COLOR = "#D97757";
|
|
52
52
|
export const CLAUDE_LOGO_PATH = "m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z";
|
|
53
|
-
|
|
53
|
+
// Codex cloud/prompt mark, LobeHub icons (MIT); license: content/licenses/codex-LICENSE.txt.
|
|
54
|
+
export const CODEX_LOGO_PATH = "M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z";
|
|
54
55
|
// Official Pi mark from https://pi.dev/logo-auto.svg. Keep it local so provider
|
|
55
56
|
// logos remain available when Wand is offline.
|
|
56
57
|
export const PI_LOGO_PATH = "M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z";
|
|
@@ -85,7 +86,7 @@ export function renderProviderLogoMarkup(value) {
|
|
|
85
86
|
return `<svg ${common} viewBox="0 0 24 24" fill="${CLAUDE_BRAND_COLOR}"><path d="${CLAUDE_LOGO_PATH}"/></svg>`;
|
|
86
87
|
}
|
|
87
88
|
if (provider === "codex") {
|
|
88
|
-
return `<svg ${common} viewBox="0 0 24 24" fill="currentColor"><path d="${CODEX_LOGO_PATH}"/></svg>`;
|
|
89
|
+
return `<svg ${common} viewBox="0 0 24 24" fill="currentColor"><path d="${CODEX_LOGO_PATH}" fill-rule="evenodd"/></svg>`;
|
|
89
90
|
}
|
|
90
91
|
return `<svg ${common} viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"/><circle cx="12" cy="12" r="3"/></svg>`;
|
|
91
92
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { WandStorage } from "./storage.js";
|
|
2
|
-
import type { SessionSnapshot } from "./types.js";
|
|
3
|
-
import type { SessionRegistry } from "./session-registry.js";
|
|
4
|
-
export declare function archiveCommitTasks(storage: WandStorage, session: SessionSnapshot, entryIds: readonly string[], options?: {
|
|
5
|
-
workspaceTaskId?: string | null;
|
|
6
|
-
}): string[];
|
|
7
|
-
/** Sweep standalone chats in this project, including those absent from commit prompts. */
|
|
8
|
-
export declare function archiveCommitStandaloneSessions(storage: WandStorage, sessions: Pick<SessionRegistry, "listSlim" | "setArchived">, session: SessionSnapshot, archivedSessionIds: string[]): void;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { projectCwdForSession, normalizeProjectCwd } from "./workspace-binding.js";
|
|
2
|
-
/**
|
|
3
|
-
* Close cards linked to this commit. The session's own task (or the task the client
|
|
4
|
-
* opened this chat from) leaves the active list even while it is still in progress —
|
|
5
|
-
* that is the row the user just asked to archive. Other cards only close when they are
|
|
6
|
-
* already done: a shared iteration can contain unrelated in-progress work, and selecting
|
|
7
|
-
* its prompts must not sweep those cards off the list.
|
|
8
|
-
*/
|
|
9
|
-
function cardIdForSession(storage, sessionId) {
|
|
10
|
-
const binding = storage.getSessionWorkspace(sessionId);
|
|
11
|
-
const card = binding?.workspaceTaskId
|
|
12
|
-
? storage.getWandTaskByWorkspaceTaskId(binding.workspaceTaskId)
|
|
13
|
-
: null;
|
|
14
|
-
return card?.id ?? storage.getWandTaskIdForSession(sessionId);
|
|
15
|
-
}
|
|
16
|
-
export function archiveCommitTasks(storage, session, entryIds, options = {}) {
|
|
17
|
-
const directory = projectCwdForSession(session);
|
|
18
|
-
const currentTaskId = cardIdForSession(storage, session.id);
|
|
19
|
-
const openedTaskId = options.workspaceTaskId
|
|
20
|
-
? storage.getWandTaskByWorkspaceTaskId(options.workspaceTaskId)?.id ?? null
|
|
21
|
-
: null;
|
|
22
|
-
// These two are the task the user is looking at. Archive them even if still todo/doing.
|
|
23
|
-
const inProgressAllowed = new Set();
|
|
24
|
-
if (currentTaskId)
|
|
25
|
-
inProgressAllowed.add(currentTaskId);
|
|
26
|
-
if (openedTaskId)
|
|
27
|
-
inProgressAllowed.add(openedTaskId);
|
|
28
|
-
const related = new Set(inProgressAllowed);
|
|
29
|
-
for (const entry of storage.listIterationPromptsByIds(entryIds)) {
|
|
30
|
-
const taskId = entry.taskId || (entry.sessionId ? cardIdForSession(storage, entry.sessionId) : null);
|
|
31
|
-
if (taskId)
|
|
32
|
-
related.add(taskId);
|
|
33
|
-
}
|
|
34
|
-
const eligible = [];
|
|
35
|
-
for (const id of related) {
|
|
36
|
-
const task = storage.getWandTask(id);
|
|
37
|
-
if (!task || task.status === "archived")
|
|
38
|
-
continue;
|
|
39
|
-
if (task.status !== "done" && !inProgressAllowed.has(id))
|
|
40
|
-
continue;
|
|
41
|
-
// Project directory constrains selected history; standalone cards qualify via this session.
|
|
42
|
-
const workspace = task.workspaceId ? storage.getWorkspace(task.workspaceId) : null;
|
|
43
|
-
const sameDirectory = !!workspace && workspace.kind !== "global"
|
|
44
|
-
&& !!directory && normalizeProjectCwd(workspace.cwd) === directory;
|
|
45
|
-
if (!sameDirectory && !(id === currentTaskId && (!workspace || workspace.kind === "global")))
|
|
46
|
-
continue;
|
|
47
|
-
eligible.push(id);
|
|
48
|
-
}
|
|
49
|
-
return storage.archiveWandTasks(eligible);
|
|
50
|
-
}
|
|
51
|
-
/** Sweep standalone chats in this project, including those absent from commit prompts. */
|
|
52
|
-
export function archiveCommitStandaloneSessions(storage, sessions, session, archivedSessionIds) {
|
|
53
|
-
const directory = projectCwdForSession(session);
|
|
54
|
-
if (!directory)
|
|
55
|
-
return;
|
|
56
|
-
for (const candidate of sessions.listSlim()) {
|
|
57
|
-
if (candidate.archived || projectCwdForSession(candidate) !== directory)
|
|
58
|
-
continue;
|
|
59
|
-
// A workspace task remains a task even if it has no corresponding board card.
|
|
60
|
-
if (candidate.workspaceTaskId || cardIdForSession(storage, candidate.id))
|
|
61
|
-
continue;
|
|
62
|
-
if (sessions.setArchived(candidate.id, true))
|
|
63
|
-
archivedSessionIds.push(candidate.id);
|
|
64
|
-
}
|
|
65
|
-
}
|