agentpeeps 0.0.0-stage → 0.1.0
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/.agents/plugins/marketplace.json +11 -0
- package/.claude-plugin/marketplace.json +12 -0
- package/.claude-plugin/plugin.json +9 -0
- package/.codex-plugin/plugin.json +39 -0
- package/LICENSE +21 -0
- package/README.md +251 -2
- package/avatars/free/capybaras/capybara-bee-animated.webp +0 -0
- package/avatars/free/capybaras/capybara-bee.webp +0 -0
- package/avatars/free/capybaras/capybara-duck-animated.webp +0 -0
- package/avatars/free/capybaras/capybara-duck.webp +0 -0
- package/avatars/free/capybaras/capybara-friends-animated.webp +0 -0
- package/avatars/free/capybaras/capybara-friends.webp +0 -0
- package/avatars/free/capybaras/capybara-glasses-animated.webp +0 -0
- package/avatars/free/capybaras/capybara-glasses.webp +0 -0
- package/avatars/free/capybaras/capybara-hair-rollers-animated.webp +0 -0
- package/avatars/free/capybaras/capybara-hair-rollers.webp +0 -0
- package/avatars/free/capybaras/capybara-harness-animated.webp +0 -0
- package/avatars/free/capybaras/capybara-harness.webp +0 -0
- package/avatars/free/capybaras/capybara-in-a-dress-animated.webp +0 -0
- package/avatars/free/capybaras/capybara-in-a-dress.webp +0 -0
- package/avatars/free/capybaras/capybara-rose-animated.webp +0 -0
- package/avatars/free/capybaras/capybara-rose.webp +0 -0
- package/avatars/free/cats/cat-big-eyes-animated.webp +0 -0
- package/avatars/free/cats/cat-big-eyes.webp +0 -0
- package/avatars/free/cats/cat-big-yawn-animated.webp +0 -0
- package/avatars/free/cats/cat-big-yawn.webp +0 -0
- package/avatars/free/cats/cat-curious-kitten-animated.webp +0 -0
- package/avatars/free/cats/cat-curious-kitten.webp +0 -0
- package/avatars/free/cats/cat-fluffy-round-animated.webp +0 -0
- package/avatars/free/cats/cat-fluffy-round.webp +0 -0
- package/avatars/free/cats/cat-french-fries-animated.webp +0 -0
- package/avatars/free/cats/cat-french-fries.webp +0 -0
- package/avatars/free/cats/cat-grumpy-animated.webp +0 -0
- package/avatars/free/cats/cat-grumpy.webp +0 -0
- package/avatars/free/cats/cat-in-a-banana-animated.webp +0 -0
- package/avatars/free/cats/cat-in-a-banana.webp +0 -0
- package/avatars/free/cats/cat-long-neck-animated.webp +0 -0
- package/avatars/free/cats/cat-long-neck.webp +0 -0
- package/avatars/free/cats/cat-lying-down-animated.webp +0 -0
- package/avatars/free/cats/cat-lying-down.webp +0 -0
- package/avatars/free/cats/cat-on-its-back-animated.webp +0 -0
- package/avatars/free/cats/cat-on-its-back.webp +0 -0
- package/avatars/free/cats/cat-open-mouth-animated.webp +0 -0
- package/avatars/free/cats/cat-open-mouth.webp +0 -0
- package/avatars/free/cats/cat-orange-costume-animated.webp +0 -0
- package/avatars/free/cats/cat-orange-costume.webp +0 -0
- package/avatars/free/cats/cat-orange-kitten-animated.webp +0 -0
- package/avatars/free/cats/cat-orange-kitten.webp +0 -0
- package/avatars/free/cats/cat-pizza-animated.webp +0 -0
- package/avatars/free/cats/cat-pizza.webp +0 -0
- package/avatars/free/cats/cat-pointy-ears-animated.webp +0 -0
- package/avatars/free/cats/cat-pointy-ears.webp +0 -0
- package/avatars/free/cats/cat-round-face-animated.webp +0 -0
- package/avatars/free/cats/cat-round-face.webp +0 -0
- package/avatars/free/cats/cat-round-profile-animated.webp +0 -0
- package/avatars/free/cats/cat-round-profile.webp +0 -0
- package/avatars/free/cats/cat-smirk-animated.webp +0 -0
- package/avatars/free/cats/cat-smirk.webp +0 -0
- package/avatars/free/cats/cat-squinting-animated.webp +0 -0
- package/avatars/free/cats/cat-squinting.webp +0 -0
- package/avatars/free/cats/cat-standing-kitten-animated.webp +0 -0
- package/avatars/free/cats/cat-standing-kitten.webp +0 -0
- package/avatars/free/cats/cat-standing-up-animated.webp +0 -0
- package/avatars/free/cats/cat-standing-up.webp +0 -0
- package/avatars/free/cats/cat-sunglasses-animated.webp +0 -0
- package/avatars/free/cats/cat-sunglasses.webp +0 -0
- package/avatars/free/cats/cat-tabby-animated.webp +0 -0
- package/avatars/free/cats/cat-tabby-pile-animated.webp +0 -0
- package/avatars/free/cats/cat-tabby-pile.webp +0 -0
- package/avatars/free/cats/cat-tabby-stare-animated.webp +0 -0
- package/avatars/free/cats/cat-tabby-stare.webp +0 -0
- package/avatars/free/cats/cat-tabby.webp +0 -0
- package/avatars/free/cats/cat-white-side-eye-animated.webp +0 -0
- package/avatars/free/cats/cat-white-side-eye.webp +0 -0
- package/avatars/free/color-blobs/blob-black-orb.webp +0 -0
- package/avatars/free/color-blobs/blob-blue-triangle.webp +0 -0
- package/avatars/free/color-blobs/blob-brown-clover.webp +0 -0
- package/avatars/free/color-blobs/blob-gray-pebble.webp +0 -0
- package/avatars/free/color-blobs/blob-green-capsule.webp +0 -0
- package/avatars/free/color-blobs/blob-orange-cloud.webp +0 -0
- package/avatars/free/costume-cats/banana-cat.webp +0 -0
- package/avatars/free/costume-cats/blanket-cat.webp +0 -0
- package/avatars/free/costume-cats/blueberry-cat.webp +0 -0
- package/avatars/free/costume-cats/fish-snack-cat.webp +0 -0
- package/avatars/free/costume-cats/frog-hood-cat.webp +0 -0
- package/avatars/free/costume-cats/headphone-cat.webp +0 -0
- package/avatars/free/costume-cats/shark-hood-cat.webp +0 -0
- package/avatars/free/critters/hamster-paws-animated.webp +0 -0
- package/avatars/free/critters/hamster-paws.webp +0 -0
- package/avatars/free/critters/pigeon-hop-animated.webp +0 -0
- package/avatars/free/critters/t-rex-guitar-animated.webp +0 -0
- package/avatars/free/critters/t-rex-guitar.webp +0 -0
- package/avatars/free/critters/teary-pink-blob.webp +0 -0
- package/avatars/free/flame-expressions/flame-angry.webp +0 -0
- package/avatars/free/flame-expressions/flame-confusion.webp +0 -0
- package/avatars/free/flame-expressions/flame-friendly.webp +0 -0
- package/avatars/free/flame-expressions/flame-gusto.webp +0 -0
- package/avatars/free/flame-expressions/flame-joy.webp +0 -0
- package/avatars/free/flame-expressions/flame-sly.webp +0 -0
- package/avatars/free/flame-expressions/flame-upset.webp +0 -0
- package/avatars/free/flame-expressions/flame-walk.webp +0 -0
- package/avatars/free/flame-expressions/flame-watching.webp +0 -0
- package/avatars/free/fruit-cats/cherry-cat.webp +0 -0
- package/avatars/free/fruit-cats/kiwi-cat.webp +0 -0
- package/avatars/free/fruit-cats/orange-cat.webp +0 -0
- package/avatars/free/fruit-cats/pineapple-cat.webp +0 -0
- package/avatars/free/fruit-cats/strawberry-cat.webp +0 -0
- package/avatars/free/fruit-cats/watermelon-cat.webp +0 -0
- package/avatars/free/gradient-icons/gradient-cat-skull.webp +0 -0
- package/avatars/free/gradient-icons/gradient-chef.webp +0 -0
- package/avatars/free/gradient-icons/gradient-eyed-shadow.webp +0 -0
- package/avatars/free/gradient-icons/gradient-flame.webp +0 -0
- package/avatars/free/gradient-icons/gradient-rabbit-shadow.webp +0 -0
- package/avatars/free/gradient-icons/gradient-sleepy-ghost.webp +0 -0
- package/avatars/free/manga-faces/manga-bangs-smile.webp +0 -0
- package/avatars/free/manga-faces/manga-bob-side-eye.webp +0 -0
- package/avatars/free/manga-faces/manga-closed-eyes-frown.webp +0 -0
- package/avatars/free/manga-faces/manga-glasses-headset.webp +0 -0
- package/avatars/free/manga-faces/manga-glasses-wink.webp +0 -0
- package/avatars/free/manga-faces/manga-short-hair-smile.webp +0 -0
- package/avatars/free/manga-faces/manga-side-part-wink.webp +0 -0
- package/avatars/free/manga-faces/manga-side-swept-smile.webp +0 -0
- package/avatars/free/manga-faces/manga-tousled-grin.webp +0 -0
- package/avatars/free/monster-icons/monster-amber-chick.webp +0 -0
- package/avatars/free/monster-icons/monster-aqua-frog.webp +0 -0
- package/avatars/free/monster-icons/monster-coral-alien.webp +0 -0
- package/avatars/free/monster-icons/monster-indigo-boar.webp +0 -0
- package/avatars/free/monster-icons/monster-lavender-bunny.webp +0 -0
- package/avatars/free/monster-icons/monster-navy-cyclops.webp +0 -0
- package/avatars/free/monster-icons/monster-orange-fish.webp +0 -0
- package/avatars/free/monster-icons/monster-pink-sleepy-cat.webp +0 -0
- package/avatars/free/monster-icons/monster-purple-octopus.webp +0 -0
- package/avatars/free/monster-icons/monster-red-stalk-eyes.webp +0 -0
- package/avatars/free/monster-icons/monster-rose-bat.webp +0 -0
- package/avatars/free/monster-icons/monster-teal-crocodile.webp +0 -0
- package/avatars/free/pixel-food/pixel-astronaut.webp +0 -0
- package/avatars/free/pixel-food/pixel-block-sprout.webp +0 -0
- package/avatars/free/pixel-food/pixel-blue-hair.webp +0 -0
- package/avatars/free/pixel-food/pixel-blue-horned.webp +0 -0
- package/avatars/free/pixel-food/pixel-cat-glasses.webp +0 -0
- package/avatars/free/pixel-food/pixel-cone-hat.webp +0 -0
- package/avatars/free/pixel-food/pixel-maroon-creature.webp +0 -0
- package/avatars/free/pixel-food/pixel-orange-creature.webp +0 -0
- package/avatars/free/pixel-food/pixel-orange-sprout.webp +0 -0
- package/avatars/free/pixel-food/pixel-red-hood.webp +0 -0
- package/avatars/free/pixel-food/pixel-watermelon.webp +0 -0
- package/avatars/free/pixel-food/pixel-white-bunny.webp +0 -0
- package/avatars/free/plush-blobs/plush-blue-alarmed.webp +0 -0
- package/avatars/free/plush-blobs/plush-green-surprised.webp +0 -0
- package/avatars/free/plush-blobs/plush-pink-smile.webp +0 -0
- package/avatars/free/plush-blobs/plush-red-angry.webp +0 -0
- package/avatars/free/plush-blobs/plush-yellow-frustrated.webp +0 -0
- package/avatars/free/retro-windows/retro-arrow-cursor.webp +0 -0
- package/avatars/free/retro-windows/retro-blank-window.webp +0 -0
- package/avatars/free/retro-windows/retro-cyan-notepad.webp +0 -0
- package/avatars/free/retro-windows/retro-desktop-computer.webp +0 -0
- package/avatars/free/retro-windows/retro-dialog-stack.webp +0 -0
- package/avatars/free/retro-windows/retro-eye-warning.webp +0 -0
- package/avatars/free/retro-windows/retro-gear-document.webp +0 -0
- package/avatars/free/retro-windows/retro-hand-cursor.webp +0 -0
- package/avatars/free/retro-windows/retro-heart-pet.webp +0 -0
- package/avatars/free/retro-windows/retro-music-cd.webp +0 -0
- package/avatars/free/retro-windows/retro-paint-palette.webp +0 -0
- package/avatars/free/retro-windows/retro-pen-notepad.webp +0 -0
- package/avatars/free/retro-windows/retro-pixel-tree.webp +0 -0
- package/avatars/free/retro-windows/retro-recycle-bin.webp +0 -0
- package/avatars/free/retro-windows/retro-warning-triangle.webp +0 -0
- package/avatars/free/retro-windows/retro-yellow-folder.webp +0 -0
- package/avatars/free/seals-and-sea-lions/otter-tongue-out-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/otter-tongue-out.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-curious-face-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-curious-face.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-gliding-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-gliding.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-green-hood-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-green-hood.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-mid-flip-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-mid-flip.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-nose-boop-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-nose-boop.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-on-a-rock-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-on-a-rock.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-raised-flipper-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-raised-flipper.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-sitting-profile-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/sea-lion-sitting-profile.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-big-whiskers-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-big-whiskers.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-blinking-pup-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-blinking-pup.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-blue-flipper-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-blue-flipper.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-bunny-ears-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-bunny-ears.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-heart-sunglasses-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-heart-sunglasses.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-looking-back-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-looking-back.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-side-eye-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-side-eye.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-smiling-pup-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-smiling-pup.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-upside-down-animated.webp +0 -0
- package/avatars/free/seals-and-sea-lions/seal-upside-down.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-bok-choy.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-broccoli.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-cabbage.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-eggplant.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-garlic.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-ginger.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-leek.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-potato.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-purple-tomato.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-scallion.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-squash.webp +0 -0
- package/avatars/free/veggie-doodles/veggie-tomato.webp +0 -0
- package/avatars/terminal.json +1 -0
- package/cli.js +529 -0
- package/hooks/claude.json +14 -0
- package/logo.png +0 -0
- package/logo.svg +8 -0
- package/overlay/agents/antigravity.svg +1 -0
- package/overlay/agents/claude.svg +1 -0
- package/overlay/agents/codex.svg +1 -0
- package/overlay/agents/copilot.svg +1 -0
- package/overlay/control.html +528 -0
- package/overlay/index.html +365 -0
- package/overlay/main.js +361 -0
- package/overlay/preload.js +21 -0
- package/package.json +50 -4
- package/skills/agent-presence/SKILL.md +33 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src file: data:; style-src 'unsafe-inline'; script-src 'unsafe-inline'">
|
|
6
|
+
<title>Agent Peeps · control room</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root { --bg: #0a0b0d; --panel: #111317; --panel2: #161a1f; --line: #1e2228; --line2: #2a3038; --text: #e7e9ec; --muted: #8a919b; --dim: #5d646e;
|
|
9
|
+
--accent: #8ab4ff; --ok: #3ddc97; --warn: #f5b84b; --bad: #ff6b6b;
|
|
10
|
+
--sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
|
|
11
|
+
--mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace; }
|
|
12
|
+
* { box-sizing: border-box; }
|
|
13
|
+
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 450 13px/1.45 var(--sans); }
|
|
14
|
+
body { display: grid; grid-template-columns: 228px 1fr; grid-template-rows: 40px 1fr; overflow: hidden; }
|
|
15
|
+
button, input { font: inherit; color: inherit; }
|
|
16
|
+
button { cursor: pointer; }
|
|
17
|
+
::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 3px solid var(--bg); }
|
|
18
|
+
kbd { font: 600 10.5px var(--mono); color: var(--muted); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--panel2); }
|
|
19
|
+
code { font: 500 12px var(--mono); color: var(--text); background: var(--panel2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
|
|
20
|
+
|
|
21
|
+
/* title bar (the window's own bar is hidden; buttons sit over the right edge on Windows/Linux) */
|
|
22
|
+
.brand, .top { -webkit-app-region: drag; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
|
|
23
|
+
.brand { gap: 9px; padding: 0 14px; background: var(--bg); border-right: 1px solid var(--line); font: 600 12.5px var(--mono); }
|
|
24
|
+
.mac .brand { padding-left: 82px; }
|
|
25
|
+
.brand img { width: 20px; height: 20px; border-radius: 5px; }
|
|
26
|
+
.brand span { color: var(--dim); font-weight: 500; }
|
|
27
|
+
.top { gap: 12px; padding: 0 150px 0 18px; font: 500 12px var(--mono); color: var(--muted); }
|
|
28
|
+
.mac .top { padding-right: 18px; }
|
|
29
|
+
.top b { color: var(--text); font-weight: 600; }
|
|
30
|
+
.top .live { margin-left: auto; display: flex; align-items: center; gap: 7px; }
|
|
31
|
+
.top .live i, .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); display: inline-block; }
|
|
32
|
+
.top .live.on i, .pulse.on { background: var(--ok); box-shadow: 0 0 0 0 rgba(61,220,151,.6); animation: ping 1.8s ease-out infinite; }
|
|
33
|
+
.top .vis { -webkit-app-region: no-drag; }
|
|
34
|
+
|
|
35
|
+
/* sidebar */
|
|
36
|
+
nav { grid-row: 2; overflow: auto; padding: 10px 8px 16px; border-right: 1px solid var(--line); background: var(--bg); }
|
|
37
|
+
nav h3 { margin: 16px 10px 6px; font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
|
|
38
|
+
nav button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px 10px; border-radius: 8px; text-align: left; color: var(--muted); }
|
|
39
|
+
nav button:hover { background: var(--panel); color: var(--text); }
|
|
40
|
+
nav button[aria-current="true"] { background: var(--panel2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
|
|
41
|
+
nav button svg { flex: none; width: 16px; height: 16px; }
|
|
42
|
+
nav button kbd { margin-left: auto; }
|
|
43
|
+
nav button .badge { margin-left: auto; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font: 700 10px/16px var(--mono); text-align: center; }
|
|
44
|
+
nav .th { position: relative; flex: none; width: 26px; height: 26px; display: grid; place-items: center; }
|
|
45
|
+
nav .th img { max-width: 26px; max-height: 26px; object-fit: contain; }
|
|
46
|
+
nav .th.unset img { opacity: .45; filter: grayscale(.4); }
|
|
47
|
+
nav .th .count { position: absolute; right: -5px; bottom: -4px; background: var(--accent); color: #0a0b0d; font: 700 9px/13px var(--mono); border-radius: 7px; padding: 0 4px; }
|
|
48
|
+
nav .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
49
|
+
.logo-chip { background: #fff; border-radius: 50%; padding: 4px; }
|
|
50
|
+
nav form { display: flex; gap: 4px; padding: 4px 6px; }
|
|
51
|
+
nav input { min-width: 0; flex: 1; border: 1px solid var(--line2); border-radius: 7px; padding: 5px 8px; background: var(--panel); font: 500 12px var(--mono); }
|
|
52
|
+
nav input:focus { outline: none; border-color: var(--accent); }
|
|
53
|
+
nav form button { width: auto; padding: 4px 9px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); }
|
|
54
|
+
|
|
55
|
+
main { grid-row: 2; overflow: auto; padding: 22px 26px 40px; }
|
|
56
|
+
h1 { font-size: 18px; font-weight: 650; margin: 0 0 3px; letter-spacing: -.01em; }
|
|
57
|
+
.sub { color: var(--muted); margin: 0 0 18px; }
|
|
58
|
+
h2 { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
|
|
59
|
+
h2 .use { text-transform: none; letter-spacing: 0; font: 600 11.5px var(--sans); color: var(--text); border: 1px solid var(--line2); background: var(--panel); border-radius: 7px; padding: 3px 9px; }
|
|
60
|
+
h2 .use[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
|
|
61
|
+
|
|
62
|
+
/* overview */
|
|
63
|
+
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
|
|
64
|
+
.stat { background: var(--panel); padding: 12px 14px; }
|
|
65
|
+
.stat b { display: block; font: 600 22px/1.1 var(--mono); letter-spacing: -.02em; }
|
|
66
|
+
.stat span { font: 500 11px var(--mono); color: var(--muted); }
|
|
67
|
+
.stat.alert b { color: var(--bad); }
|
|
68
|
+
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
|
|
69
|
+
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; transition: border-color .2s; }
|
|
70
|
+
.card.waiting { border-color: color-mix(in srgb, var(--bad) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 12%, transparent); }
|
|
71
|
+
.card.rest { opacity: .62; }
|
|
72
|
+
.card .hd { display: flex; gap: 12px; align-items: center; }
|
|
73
|
+
.av { position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center; }
|
|
74
|
+
.av > img { max-width: 46px; max-height: 46px; object-fit: contain; }
|
|
75
|
+
.av > img.logo-chip { width: 40px; height: 40px; padding: 8px; }
|
|
76
|
+
.av .mark { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; padding: 2.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--panel); }
|
|
77
|
+
.card .nm { font-weight: 650; }
|
|
78
|
+
.card .nm small { margin-left: 6px; font: 500 11px var(--mono); color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
|
|
79
|
+
.card .cwd { font: 500 11.5px var(--mono); color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
80
|
+
.state { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font: 500 12px var(--mono); overflow: hidden; white-space: nowrap; }
|
|
81
|
+
.state b { font-weight: 600; color: var(--sc, var(--text)); }
|
|
82
|
+
.state span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
|
|
83
|
+
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--sc, var(--dim)); }
|
|
84
|
+
.busy .dot { animation: blink 1.2s ease-in-out infinite; }
|
|
85
|
+
.helpers { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--agent); }
|
|
86
|
+
.helper { display: flex; align-items: center; gap: 7px; font: 500 11.5px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; }
|
|
87
|
+
.helper img { width: 18px; height: 18px; object-fit: contain; flex: none; }
|
|
88
|
+
.helper img.logo-chip { padding: 2px; }
|
|
89
|
+
.helper b { color: var(--text); font-weight: 600; }
|
|
90
|
+
.card .ft { display: flex; align-items: center; gap: 6px; margin-top: 12px; font: 500 11px var(--mono); color: var(--dim); }
|
|
91
|
+
.card .ft button { border: 1px solid var(--line2); background: none; color: var(--muted); border-radius: 6px; padding: 2px 8px; font: 500 11px var(--sans); }
|
|
92
|
+
.card .ft button:first-of-type { margin-left: auto; }
|
|
93
|
+
.card .ft button:hover { color: var(--text); border-color: var(--muted); }
|
|
94
|
+
.empty { display: flex; align-items: center; gap: 16px; padding: 22px; border: 1px dashed var(--line2); border-radius: 12px; color: var(--muted); }
|
|
95
|
+
.empty .pile { display: flex; } .empty .pile img { width: 40px; height: 40px; object-fit: contain; margin-right: -8px; }
|
|
96
|
+
.log { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font: 500 11.5px/1.5 var(--mono); max-height: 340px; overflow: auto; }
|
|
97
|
+
.log div { display: grid; grid-template-columns: 70px 18px 130px 92px 1fr; gap: 8px; align-items: center; padding: 5px 12px; border-top: 1px solid var(--line); white-space: nowrap; }
|
|
98
|
+
.log div:first-child { border-top: 0; }
|
|
99
|
+
.log div.new { animation: flash 1s ease-out; }
|
|
100
|
+
.log time { color: var(--dim); }
|
|
101
|
+
.log img { width: 14px; height: 14px; border-radius: 50%; background: #fff; padding: 1.5px; }
|
|
102
|
+
.log .who { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
|
|
103
|
+
.log .st { color: var(--sc, var(--muted)); }
|
|
104
|
+
.log .x { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
|
|
105
|
+
.s-thinking { --sc: #a78bfa; } .s-reading { --sc: #60a5fa; } .s-writing { --sc: #f5b84b; } .s-running { --sc: #3ddc97; } .s-delegating { --sc: #f472b6; }
|
|
106
|
+
.s-browsing { --sc: #38bdf8; } .s-working { --sc: #fbbf24; } .s-waiting { --sc: #ff6b6b; } .s-done { --sc: #22c55e; } .s-idle, .s-gone { --sc: #6b7280; }
|
|
107
|
+
|
|
108
|
+
/* settings */
|
|
109
|
+
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
|
|
110
|
+
.row { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 16px; padding: 13px 16px; border-top: 1px solid var(--line); }
|
|
111
|
+
.row:first-child { border-top: 0; }
|
|
112
|
+
.row > :last-child { justify-self: start; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
|
|
113
|
+
.row .t { font-weight: 550; }
|
|
114
|
+
.row .t small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
|
|
115
|
+
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line2); border-radius: 9px; padding: 2px; gap: 2px; }
|
|
116
|
+
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 7px; color: var(--muted); }
|
|
117
|
+
.seg button:hover { color: var(--text); }
|
|
118
|
+
.seg button[aria-pressed="true"] { background: var(--panel2); color: var(--text); box-shadow: 0 0 0 1px var(--line2); font-weight: 600; }
|
|
119
|
+
.sw { appearance: none; width: 34px; height: 20px; border-radius: 10px; background: var(--line2); position: relative; cursor: pointer; margin: 0; transition: background .15s; flex: none; }
|
|
120
|
+
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
|
|
121
|
+
.sw:checked { background: var(--accent); } .sw:checked::after { transform: translateX(14px); }
|
|
122
|
+
.ck { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
|
|
123
|
+
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
124
|
+
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line2); background: var(--bg); border-radius: 8px; padding: 4px 10px 4px 5px; color: var(--muted); }
|
|
125
|
+
.chip img { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: #fff; }
|
|
126
|
+
.chip[aria-pressed="true"] { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
|
|
127
|
+
.chip[aria-pressed="false"] img { filter: grayscale(1); opacity: .5; }
|
|
128
|
+
.btn { border: 1px solid var(--line2); background: var(--panel2); padding: 6px 12px; border-radius: 8px; color: var(--text); }
|
|
129
|
+
.btn:hover { border-color: var(--muted); }
|
|
130
|
+
input[type=range] { accent-color: var(--accent); width: 180px; }
|
|
131
|
+
.val { font: 500 12px var(--mono); color: var(--muted); min-width: 40px; }
|
|
132
|
+
.keyhint { font: 500 11px var(--mono); color: var(--dim); }
|
|
133
|
+
.note { color: var(--dim); font-size: 12px; margin-top: 16px; }
|
|
134
|
+
.row.apps > :last-child { flex-direction: column; align-items: flex-start; gap: 10px; }
|
|
135
|
+
.front { font: 500 12px var(--mono); color: var(--muted); } .front b { color: var(--text); } .front .yes { color: var(--ok); } .front .no { color: var(--warn); } .front.bad { color: var(--warn); }
|
|
136
|
+
.chip.app { padding: 4px 10px; font: 500 12px var(--mono); }
|
|
137
|
+
.chip.app.seen:not([aria-pressed="true"]) { border-style: dashed; }
|
|
138
|
+
.add { display: flex; gap: 6px; } .add input { width: 200px; border: 1px solid var(--line2); border-radius: 8px; padding: 5px 9px; background: var(--bg); font: 500 12px var(--mono); }
|
|
139
|
+
.add input:focus { outline: none; border-color: var(--accent); }
|
|
140
|
+
|
|
141
|
+
/* bubble preview: two desktops, the same bubble as the overlay */
|
|
142
|
+
.stage { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
|
|
143
|
+
.desk { position: relative; height: 170px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 16px 26px; }
|
|
144
|
+
.desk.dark { background: radial-gradient(120% 90% at 20% 0%, #26304a, #0d1018 70%); }
|
|
145
|
+
.desk.light { background: radial-gradient(120% 90% at 20% 0%, #fff, #dde3ec 75%); }
|
|
146
|
+
.desk > small { position: absolute; left: 12px; top: 10px; font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: #8892a6; }
|
|
147
|
+
.pv { position: relative; display: flex; flex-direction: column; align-items: flex-end; --bfs: 12px; font-size: var(--bfs); }
|
|
148
|
+
.pv.bs-small { --bfs: 11px; } .pv.bs-large { --bfs: 13.5px; }
|
|
149
|
+
.pv.th-l { --bb: rgba(255,255,255,.97); --bt: #0b0b0c; --bl: rgba(0,0,0,.14); --bsh: 0 0 2px #fff, 0 0 7px rgba(255,255,255,.95); }
|
|
150
|
+
.pv.th-d { --bb: rgba(17,18,22,.95); --bt: #f5f5f6; --bl: rgba(255,255,255,.16); --bsh: 0 1px 2px rgba(0,0,0,.9), 0 0 7px rgba(0,0,0,.65); }
|
|
151
|
+
.pv .bub { position: relative; margin-bottom: 9px; min-width: 150px; padding: 7px 10px 8px; border-radius: 11px; color: var(--bt); background: var(--bb); border: 1px solid var(--bl);
|
|
152
|
+
box-shadow: 0 6px 20px rgba(0,0,0,.18); white-space: nowrap; --bm: color-mix(in srgb, var(--bt) 62%, transparent); line-height: 1.35; }
|
|
153
|
+
.pv .bub::after { content: ""; position: absolute; bottom: -5px; right: 21px; width: 8px; height: 8px; background: var(--bb); border-right: 1px solid var(--bl); border-bottom: 1px solid var(--bl); transform: rotate(45deg); }
|
|
154
|
+
.pv.noborder .bub, .pv.noborder .bub::after { border-color: transparent; }
|
|
155
|
+
.pv.text .bub { background: none; border-color: transparent; box-shadow: none; padding: 0; text-shadow: var(--bsh); }
|
|
156
|
+
.pv.text .bub::after { display: none; }
|
|
157
|
+
.pv.off .bub { visibility: hidden; }
|
|
158
|
+
.pv .bub .h { display: flex; gap: 6px; align-items: baseline; } .pv .bub .h b { font-weight: 700; } .pv .bub .h span { color: var(--bm); font-size: .9em; }
|
|
159
|
+
.pv .bub .w { display: flex; align-items: center; gap: 6px; margin-top: 3px; } .pv .bub .w i { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }
|
|
160
|
+
.pv .bub .w code { all: unset; font: 500 .92em var(--mono); color: var(--bm); }
|
|
161
|
+
.pv .bub .s { margin-top: 5px; font: 500 .82em var(--mono); color: var(--bm); }
|
|
162
|
+
.pv.nostats .bub .s { display: none; }
|
|
163
|
+
.pv > img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
|
|
164
|
+
.swatches { display: flex; gap: 6px; align-items: center; }
|
|
165
|
+
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line2); padding: 0; background: var(--c); }
|
|
166
|
+
.swatch.auto { background: linear-gradient(135deg, #fff 50%, #0b0b0c 50%); }
|
|
167
|
+
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
|
|
168
|
+
input[type=color] { width: 28px; height: 26px; border: 1px solid var(--line2); border-radius: 7px; background: var(--panel2); padding: 2px; cursor: pointer; }
|
|
169
|
+
|
|
170
|
+
/* shortcuts */
|
|
171
|
+
.keys { display: grid; grid-template-columns: 1fr; }
|
|
172
|
+
.key { display: grid; grid-template-columns: 210px 1fr auto; gap: 14px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
|
|
173
|
+
.key:first-child { border-top: 0; }
|
|
174
|
+
.key .combo { display: flex; gap: 4px; }
|
|
175
|
+
.key .combo kbd { font-size: 11.5px; padding: 1px 7px; color: var(--text); }
|
|
176
|
+
.key .ok { font: 500 11px var(--mono); color: var(--ok); } .key .taken { font: 500 11px var(--mono); color: var(--warn); } .key .offk { font: 500 11px var(--mono); color: var(--dim); }
|
|
177
|
+
|
|
178
|
+
/* sticker picker */
|
|
179
|
+
.bar { position: sticky; top: -22px; margin: -22px -26px 0; padding: 22px 26px 14px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); z-index: 1; }
|
|
180
|
+
.chosen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 64px; }
|
|
181
|
+
.chosen .pick { position: relative; width: 60px; height: 60px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); display: grid; place-items: center; }
|
|
182
|
+
.chosen .pick img { width: 46px; height: 46px; object-fit: contain; }
|
|
183
|
+
.chosen .pick button { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); font-size: 11px; line-height: 18px; padding: 0; }
|
|
184
|
+
.chosen .pick.pack { width: auto; padding: 0 12px 0 6px; display: flex; gap: 8px; }
|
|
185
|
+
.chosen .pick.pack img { width: 40px; height: 40px; }
|
|
186
|
+
.chosen .pick.pack b { font-size: 12px; } .chosen .pick.pack small { display: block; color: var(--muted); font-size: 11px; }
|
|
187
|
+
.chosen .def { display: flex; align-items: center; gap: 12px; color: var(--muted); }
|
|
188
|
+
.chosen .def img { width: 44px; height: 44px; object-fit: contain; }
|
|
189
|
+
.chosen .def img.logo-chip { padding: 8px; }
|
|
190
|
+
.actions { display: flex; gap: 8px; margin-top: 12px; }
|
|
191
|
+
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
|
|
192
|
+
.tile { position: relative; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: transform .12s, border-color .12s; }
|
|
193
|
+
.tile:hover { border-color: var(--line2); transform: translateY(-2px); }
|
|
194
|
+
.tile[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); }
|
|
195
|
+
.tile[aria-pressed="true"]::after { content: attr(data-n); position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: var(--bg); font: 700 10px/16px var(--mono); }
|
|
196
|
+
.tile img { width: 54px; height: 54px; object-fit: contain; }
|
|
197
|
+
.tile span { font-size: 10.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
198
|
+
.mt { margin-top: 14px; }
|
|
199
|
+
|
|
200
|
+
@keyframes ping { to { box-shadow: 0 0 0 7px rgba(61,220,151,0); } }
|
|
201
|
+
@keyframes blink { 50% { opacity: .3; } }
|
|
202
|
+
@keyframes flash { from { background: color-mix(in srgb, var(--accent) 12%, transparent); } }
|
|
203
|
+
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
|
|
204
|
+
</style>
|
|
205
|
+
</head>
|
|
206
|
+
<body>
|
|
207
|
+
<div class="brand"><img src="../logo.png" alt=""> agentpeeps <span>control room</span></div>
|
|
208
|
+
<div class="top" id="top"></div>
|
|
209
|
+
<nav id="nav"></nav>
|
|
210
|
+
<main id="main"></main>
|
|
211
|
+
<script>
|
|
212
|
+
let d = null, tab = 'overview';
|
|
213
|
+
const extra = []; // model rules added here that have no stickers yet
|
|
214
|
+
const live = new Map(), log = []; // sessions seen in the event stream, newest events first
|
|
215
|
+
const TOOL = new Set(['reading', 'writing', 'running', 'delegating', 'browsing', 'working']);
|
|
216
|
+
const REST = new Set(['done', 'idle']);
|
|
217
|
+
const VERB = { thinking: 'thinking', reading: 'reading', writing: 'writing', running: 'running', delegating: 'handing off', browsing: 'browsing', working: 'working', waiting: 'needs you', done: 'done', idle: 'idle', gone: 'ended' };
|
|
218
|
+
const NAMES = { claude: 'Claude Code', codex: 'Codex', copilot: 'Copilot', antigravity: 'Antigravity' };
|
|
219
|
+
const STALE = 15 * 60e3;
|
|
220
|
+
const h = (tag, props = {}, ...kids) => { const el = Object.assign(document.createElement(tag), props); el.append(...kids.flat().filter(k => k != null && k !== false)); return el; };
|
|
221
|
+
const img = (src, cls) => h('img', { src, alt: '', className: cls || '', loading: 'lazy', decoding: 'async' });
|
|
222
|
+
const logo = a => NAMES[a] ? 'agents/' + a + '.svg' : null;
|
|
223
|
+
const hash = s => [...String(s)].reduce((x, c) => (x * 31 + c.charCodeAt(0)) >>> 0, 7);
|
|
224
|
+
const base = p => String(p).split(/[\\/]/).filter(Boolean).pop() || String(p);
|
|
225
|
+
const plural = (n, w) => n + ' ' + w + (n === 1 ? '' : 's');
|
|
226
|
+
const dur = ms => { const s = Math.max(0, Math.round(ms / 1000)); return s < 60 ? s + 's' : s < 3600 ? Math.floor(s / 60) + 'm ' + (s % 60) + 's' : Math.floor(s / 3600) + 'h ' + Math.floor(s / 60) % 60 + 'm'; };
|
|
227
|
+
const what = e => e.state === 'waiting' ? (e.detail && e.detail !== 'needs you' ? e.detail : '') : REST.has(e.state) ? '' : e.state === 'running' || e.state === 'browsing' || e.state === 'delegating' ? e.detail || (e.file ? base(e.file) : '') : e.file ? base(e.file) : e.detail || '';
|
|
228
|
+
const MODK = () => d && d.mac ? ['⌘', '⌥', '⇧'] : ['Ctrl', 'Alt', 'Shift'];
|
|
229
|
+
const ICONS = {
|
|
230
|
+
overview: '<path d="M3 12h4l3-8 4 16 3-8h4"/>',
|
|
231
|
+
display: '<rect x="3" y="4" width="18" height="12" rx="2"/><path d="M8 20h8M12 16v4"/>',
|
|
232
|
+
bubbles: '<path d="M4 5h16v11H9l-5 4z"/>',
|
|
233
|
+
shortcuts: '<rect x="2.5" y="6" width="19" height="12" rx="2"/><path d="M6 10h.01M10 10h.01M14 10h.01M18 10h.01M7 14h10"/>',
|
|
234
|
+
};
|
|
235
|
+
const svg = p => `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">${p}</svg>`;
|
|
236
|
+
const VIEWS = [['overview', 'Overview'], ['display', 'Display'], ['bubbles', 'Bubbles'], ['shortcuts', 'Shortcuts']];
|
|
237
|
+
|
|
238
|
+
/* ---------- live event stream ---------- */
|
|
239
|
+
function track(e) {
|
|
240
|
+
log.unshift(e); if (log.length > 120) log.pop();
|
|
241
|
+
const mk = e.agent + ':' + e.session;
|
|
242
|
+
if (e.state === 'gone') { if (e.sub) live.get(mk)?.subs.delete(e.sub); else live.delete(mk); return soon(); }
|
|
243
|
+
let m = live.get(mk);
|
|
244
|
+
if (!m) live.set(mk, m = { e, since: e.t, tools: 0, touched: new Set(), subs: new Map() });
|
|
245
|
+
let x = m;
|
|
246
|
+
if (e.sub) { x = m.subs.get(e.sub); if (!x) m.subs.set(e.sub, x = { e, since: e.t, tools: 0, touched: new Set() }); }
|
|
247
|
+
x.e = e; if (TOOL.has(e.state)) x.tools++; if (e.file) x.touched.add(e.file); if (e.model) x.model = e.model;
|
|
248
|
+
soon();
|
|
249
|
+
}
|
|
250
|
+
const sessions = () => [...live.values()].filter(m => Date.now() - m.e.t < STALE).sort((a, b) => (b.e.state === 'waiting') - (a.e.state === 'waiting') || b.e.t - a.e.t);
|
|
251
|
+
let queued = false;
|
|
252
|
+
// live redraws wait while a mouse button is down, so a redraw never swallows a click
|
|
253
|
+
let pressing = false, held = false;
|
|
254
|
+
addEventListener('pointerdown', () => { pressing = true; });
|
|
255
|
+
addEventListener('pointerup', () => { pressing = false; if (held) { held = false; setTimeout(soon, 50); } });
|
|
256
|
+
const soon = () => { if (queued) return; queued = true; requestAnimationFrame(() => { queued = false; if (!d) return; if (pressing) { held = true; return; } topbar(); if (tab === 'overview') render(); else nav(); }); };
|
|
257
|
+
|
|
258
|
+
/* ---------- stickers for a session, a helper or a target ---------- */
|
|
259
|
+
const pickUrl = (list, seed) => list && list.length ? list[hash(seed) % list.length] : null;
|
|
260
|
+
const stickerOf = m => pickUrl(byModel(m.model) || d.urls[m.e.agent], m.e.session);
|
|
261
|
+
const helperOf = (m, s) => pickUrl(d.urls[s.e.subType] || d.urls[m.e.agent + '-subagent'] || d.urls.subagent, m.e.session + s.e.sub);
|
|
262
|
+
function byModel(model) {
|
|
263
|
+
const low = String(model || '').toLowerCase();
|
|
264
|
+
const k = low && Object.keys(d.urls).filter(k => k.startsWith('model:') && low.includes(k.slice(6).toLowerCase())).sort((a, b) => b.length - a.length)[0];
|
|
265
|
+
return k ? d.urls[k] : null;
|
|
266
|
+
}
|
|
267
|
+
// placeholders come only from the free packs that ship with the app
|
|
268
|
+
const samples = () => d.library.filter(g => g.pack && !g.mine && /[\\/]avatars[\\/]free[\\/]/.test(g.items[0].file)).flatMap(g => g.items.filter(i => !/animated/i.test(i.name))).filter(i => /\.(webp|png)$/i.test(i.file));
|
|
269
|
+
function thumb(t) {
|
|
270
|
+
const urls = d.urls[t.key] || [];
|
|
271
|
+
if (urls.length) return h('span', { className: 'th' }, img(urls[0]), urls.length > 1 ? h('span', { className: 'count', textContent: urls.length }) : null);
|
|
272
|
+
if (t.agent) return h('span', { className: 'th' }, img(logo(t.agent), 'logo-chip'));
|
|
273
|
+
const s = samples(); return h('span', { className: 'th unset', title: 'Not set yet' }, s.length ? img(s[hash(t.key) % s.length].url) : null);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* ---------- chrome ---------- */
|
|
277
|
+
function topbar() {
|
|
278
|
+
const n = sessions().length, crumb = (VIEWS.find(v => v[0] === tab) || [, (d.targets.find(t => t.key === tab) || extra.find(t => t.key === tab) || {}).name || tab])[1];
|
|
279
|
+
const vis = h('label', { className: 'ck vis', title: MODK().join('+') + '+A' }, sw(d.settings.visible, on => ap.setVisible(on)), 'On screen');
|
|
280
|
+
document.getElementById('top').replaceChildren(h('span', {}, 'agentpeeps / ', h('b', { textContent: crumb.toLowerCase() })),
|
|
281
|
+
h('span', { className: 'live' + (n ? ' on' : '') }, h('i'), n ? plural(n, 'live session') : 'no live sessions'), vis);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function nav() {
|
|
285
|
+
const waiting = sessions().filter(m => m.e.state === 'waiting' || [...m.subs.values()].some(s => s.e.state === 'waiting')).length;
|
|
286
|
+
const items = VIEWS.map(([k, n], i) => {
|
|
287
|
+
const b = h('button', { onclick: () => go(k), innerHTML: svg(ICONS[k]) }, h('span', { className: 'n', textContent: n }),
|
|
288
|
+
k === 'overview' && waiting ? h('span', { className: 'badge', textContent: waiting }) : h('kbd', { textContent: i + 1 }));
|
|
289
|
+
b.setAttribute('aria-current', String(tab === k)); return b;
|
|
290
|
+
});
|
|
291
|
+
let group = '';
|
|
292
|
+
const targets = [...d.targets, ...extra.filter(x => !d.targets.some(t => t.key === x.key))];
|
|
293
|
+
if (!targets.some(t => t.group === 'Models')) targets.push({ group: 'Models', placeholder: true });
|
|
294
|
+
items.push(h('h3', { textContent: 'Stickers' }));
|
|
295
|
+
for (const t of targets) {
|
|
296
|
+
if (t.group !== group) items.push(h('h3', { textContent: group = t.group }));
|
|
297
|
+
if (t.placeholder) continue;
|
|
298
|
+
const b = h('button', { onclick: () => go(t.key) }, thumb(t), h('span', { className: 'n', textContent: t.name }));
|
|
299
|
+
b.setAttribute('aria-current', String(tab === t.key));
|
|
300
|
+
items.push(b);
|
|
301
|
+
}
|
|
302
|
+
items.push(h('form', { onsubmit: ev => { ev.preventDefault(); const v = ev.target.m.value.trim(); if (!v) return;
|
|
303
|
+
const key = 'model:' + v; if (!extra.some(x => x.key === key)) extra.push({ key, name: v, group: 'Models' }); go(key); } },
|
|
304
|
+
h('input', { name: 'm', placeholder: 'model, e.g. opus', title: 'Sessions whose model contains this text use these stickers ( / )' }), h('button', { textContent: 'Add' })));
|
|
305
|
+
const el = document.getElementById('nav'), y = el.scrollTop;
|
|
306
|
+
el.replaceChildren(...items); el.scrollTop = y;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* ---------- controls ---------- */
|
|
310
|
+
const set = patch => ap.setConfig(patch);
|
|
311
|
+
const setB = patch => ap.setConfig({ bubble: patch });
|
|
312
|
+
const sw = (on, change) => h('input', { type: 'checkbox', className: 'sw', checked: !!on, onchange: e => change(e.target.checked) });
|
|
313
|
+
const seg = (value, options, pick) => h('div', { className: 'seg' }, options.map(([v, text]) => {
|
|
314
|
+
const b = h('button', { textContent: text, onclick: () => pick(v) }); b.setAttribute('aria-pressed', String(value === v)); return b; }));
|
|
315
|
+
const row = (title, hint, ...control) => h('div', { className: 'row' }, h('div', { className: 't' }, title, hint ? h('small', { textContent: hint }) : null), h('div', {}, control));
|
|
316
|
+
const hk = k => h('span', { className: 'keyhint', textContent: MODK().join('+') + '+' + k });
|
|
317
|
+
|
|
318
|
+
/* ---------- overview ---------- */
|
|
319
|
+
function overview() {
|
|
320
|
+
const list = sessions(), now = Date.now();
|
|
321
|
+
const subsOf = m => [...m.subs.values()].filter(s => now - s.e.t < STALE);
|
|
322
|
+
const helpers = list.reduce((n, m) => n + subsOf(m).length, 0);
|
|
323
|
+
const waiting = list.filter(m => m.e.state === 'waiting' || subsOf(m).some(s => s.e.state === 'waiting')).length;
|
|
324
|
+
const tools = list.reduce((n, m) => n + m.tools + subsOf(m).reduce((k, s) => k + s.tools, 0), 0);
|
|
325
|
+
const files = new Set(list.flatMap(m => [...m.touched, ...subsOf(m).flatMap(s => [...s.touched])])).size;
|
|
326
|
+
const stat = (n, label, cls) => h('div', { className: 'stat ' + (cls || '') }, h('b', { textContent: n }), h('span', { textContent: label }));
|
|
327
|
+
const card = m => {
|
|
328
|
+
const e = m.e, url = stickerOf(m), subs = subsOf(m), off = d.settings.agents[e.agent] === false;
|
|
329
|
+
const c = h('div', { className: 'card' + (e.state === 'waiting' ? ' waiting' : '') + (REST.has(e.state) ? ' rest' : '') });
|
|
330
|
+
c.style.setProperty('--agent', d.colors[e.agent] || '#888');
|
|
331
|
+
c.append(...[
|
|
332
|
+
h('div', { className: 'hd' },
|
|
333
|
+
h('div', { className: 'av' }, url ? img(url) : img(logo(e.agent), 'logo-chip'), url && logo(e.agent) ? img(logo(e.agent), 'mark') : null),
|
|
334
|
+
h('div', { style: 'min-width:0' }, h('div', { className: 'nm' }, NAMES[e.agent] || e.agent, m.model ? h('small', { textContent: m.model }) : null),
|
|
335
|
+
h('div', { className: 'cwd', textContent: e.cwd ? base(e.cwd) : e.session, title: e.cwd || '' }))),
|
|
336
|
+
h('div', { className: 'state s-' + e.state + (TOOL.has(e.state) || e.state === 'waiting' ? ' busy' : '') }, h('i', { className: 'dot' }), h('b', { textContent: VERB[e.state] || e.state }), h('span', { textContent: what(e) })),
|
|
337
|
+
subs.length ? h('div', { className: 'helpers' }, subs.map(s => { const u = helperOf(m, s);
|
|
338
|
+
return h('div', { className: 'helper s-' + s.e.state }, u ? img(u) : img(logo(e.agent), 'logo-chip'), h('b', { textContent: s.e.subType || 'helper' }), h('span', { textContent: (VERB[s.e.state] || s.e.state) + ' ' + what(s.e) })); })) : null,
|
|
339
|
+
h('div', { className: 'ft' }, plural(m.tools, 'tool') + ' · ' + plural(m.touched.size, 'file') + ' · ' + dur(now - m.since),
|
|
340
|
+
h('button', { textContent: 'Sticker', onclick: () => go(e.agent) }),
|
|
341
|
+
h('button', { textContent: off ? 'Show' : 'Hide', onclick: () => set({ agents: { ...d.settings.agents, [e.agent]: off } }) }))].filter(Boolean));
|
|
342
|
+
return c;
|
|
343
|
+
};
|
|
344
|
+
const pile = samples().filter((_, i) => i % 37 === 3).slice(0, 4);
|
|
345
|
+
return [
|
|
346
|
+
h('h1', { textContent: 'Overview' }),
|
|
347
|
+
h('p', { className: 'sub', textContent: 'Every agent session on this machine, live from its hooks.' }),
|
|
348
|
+
h('div', { className: 'stats' }, stat(list.length, 'live sessions'), stat(helpers, 'helpers'), stat(waiting, 'need you', waiting ? 'alert' : ''), stat(tools, 'tool calls'), stat(files, 'files touched')),
|
|
349
|
+
h('h2', { textContent: 'Sessions' }),
|
|
350
|
+
list.length ? h('div', { className: 'cards' }, list.map(card))
|
|
351
|
+
: h('div', { className: 'empty' }, h('div', { className: 'pile' }, pile.map(i => img(i.url))), h('div', {}, 'No agent is running right now. Start Claude Code, Codex, Copilot or Antigravity and it shows up here.')),
|
|
352
|
+
h('h2', { textContent: 'Activity' }),
|
|
353
|
+
log.length ? h('div', { className: 'log' }, log.slice(0, 80).map((e, i) => h('div', { className: (i === 0 && now - e.t < 1500 ? 'new ' : '') + 's-' + e.state },
|
|
354
|
+
h('time', { textContent: new Date(e.t).toLocaleTimeString([], { hour12: false }) }), logo(e.agent) ? img(logo(e.agent)) : h('span'),
|
|
355
|
+
h('span', { className: 'who', textContent: (NAMES[e.agent] || e.agent) + (e.sub ? ' › ' + (e.subType || 'helper') : '') }),
|
|
356
|
+
h('span', { className: 'st', textContent: VERB[e.state] || e.state }), h('span', { className: 'x', textContent: what(e) || (e.cwd ? base(e.cwd) : '') }))))
|
|
357
|
+
: h('div', { className: 'empty' }, 'Nothing yet. Events appear here as agents read, write and run things.'),
|
|
358
|
+
];
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* ---------- display ---------- */
|
|
362
|
+
function display() {
|
|
363
|
+
const s = d.settings, opv = h('span', { className: 'val', textContent: s.opacity + '%' });
|
|
364
|
+
return [
|
|
365
|
+
h('h1', { textContent: 'Display' }),
|
|
366
|
+
h('p', { className: 'sub', textContent: 'How the stickers sit on your screen. Changes apply right away.' }),
|
|
367
|
+
h('div', { className: 'panel' },
|
|
368
|
+
row('Stickers on screen', 'Toggle from anywhere', sw(s.visible, on => ap.setVisible(on)), hk('A')),
|
|
369
|
+
row('Where to show', 'Over every window, or only while one of your coding apps is in front',
|
|
370
|
+
seg(s.scope, [['everywhere', 'Everywhere'], ['apps', 'Only over my apps']], v => set({ scope: v })), hk('F')),
|
|
371
|
+
s.scope === 'apps' ? myApps(s) : null,
|
|
372
|
+
row('Size', null, seg(s.size, [['small', 'Small'], ['medium', 'Medium'], ['large', 'Large']], v => set({ size: v })), hk('S')),
|
|
373
|
+
row('When to show an agent', null, seg(s.show, [['working', 'While it works'], ['alerts', 'Only when it needs me'], ['always', 'Always']], v => set({ show: v })), hk('W')),
|
|
374
|
+
row('Details', 'One short line under each sticker, or only in the bubble', seg(s.details, [['hover', 'In the bubble'], ['always', 'Always under it']], v => set({ details: v })), hk('D')),
|
|
375
|
+
row('Motion', 'Lively adds a pulse when an agent needs you and a bounce when it finishes', seg(s.motion, [['lively', 'Lively'], ['calm', 'Calm'], ['off', 'Off']], v => set({ motion: v })), hk('M')),
|
|
376
|
+
row('Status icon', 'The small reading / writing / done badge', sw(s.icon, on => set({ icon: on }))),
|
|
377
|
+
row('Resting opacity', 'Stickers fade to this until you hover them',
|
|
378
|
+
h('input', { type: 'range', min: 30, max: 100, step: 5, value: s.opacity, oninput: e => opv.textContent = e.target.value + '%', onchange: e => set({ opacity: +e.target.value }) }), opv)),
|
|
379
|
+
h('h2', { textContent: 'Helpers (subagents)' }),
|
|
380
|
+
h('div', { className: 'panel' },
|
|
381
|
+
row('Show helpers', 'A smaller sticker for each subagent', sw(s.agents.subagent !== false, on => set({ agents: { ...s.agents, subagent: on } }))),
|
|
382
|
+
row('Layout', 'How a helper shows which agent it belongs to', seg(s.helpers, [['line', 'Joining line'], ['pod', 'Dashed pod'], ['none', 'Side by side']], v => set({ helpers: v })), hk('L'))),
|
|
383
|
+
h('h2', { textContent: 'Agents' }),
|
|
384
|
+
h('div', { className: 'panel' },
|
|
385
|
+
row('Show stickers for', 'Right-click a sticker to hide that agent', h('div', { className: 'chips' }, d.agents.map(([k, n]) => {
|
|
386
|
+
const on = s.agents[k] !== false, b = h('button', { className: 'chip', onclick: () => set({ agents: { ...s.agents, [k]: !on } }) }, img(logo(k)), n);
|
|
387
|
+
b.setAttribute('aria-pressed', String(on)); return b; }))),
|
|
388
|
+
row('Start with agents', 'Open the stickers when an agent session starts', sw(s.autostart, on => set({ autostart: on }))),
|
|
389
|
+
row('Positions', 'Drag a sticker to move that agent', h('button', { className: 'btn', textContent: 'Reset positions', onclick: () => ap.resetPositions() }), hk('R'))),
|
|
390
|
+
h('p', { className: 'note', innerHTML: 'Saved in <code>~/.agent-presence/config.json</code>, shared with the CLI and the VS Code extension.' }),
|
|
391
|
+
];
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// the apps that count as "mine": your list plus whatever was in front lately; click to switch one on or off
|
|
395
|
+
function myApps(s) {
|
|
396
|
+
const f = d.front || {}, mine = new Set(s.apps.map(a => a.toLowerCase()));
|
|
397
|
+
const names = [...new Map([...f.seen, ...s.apps].map(n => [n.toLowerCase(), n])).values()];
|
|
398
|
+
const toggle = n => set({ apps: mine.has(n.toLowerCase()) ? s.apps.filter(a => a.toLowerCase() !== n.toLowerCase()) : [...s.apps, n] });
|
|
399
|
+
const now = f.failed ? h('span', { className: 'front bad', textContent: 'Can’t tell which app is in front on this system, so stickers show everywhere.' })
|
|
400
|
+
: f.name ? h('span', { className: 'front' }, 'In front now: ', h('b', { textContent: f.name }), h('span', { className: f.ok ? 'yes' : 'no', textContent: f.ok ? ' · stickers on' : ' · stickers hidden' }))
|
|
401
|
+
: h('span', { className: 'front', textContent: 'Switch to another app and its name shows up here.' });
|
|
402
|
+
return h('div', { className: 'row apps' }, h('div', { className: 't' }, 'My apps', h('small', { textContent: 'Recently in front first. Highlighted ones show the stickers.' })),
|
|
403
|
+
h('div', {}, now,
|
|
404
|
+
h('div', { className: 'chips' }, names.map(n => { const b = h('button', { className: 'chip app' + (f.seen.includes(n) ? ' seen' : ''), textContent: n, onclick: () => toggle(n) });
|
|
405
|
+
b.setAttribute('aria-pressed', String(mine.has(n.toLowerCase()))); return b; })),
|
|
406
|
+
h('form', { className: 'add', onsubmit: ev => { ev.preventDefault(); const v = ev.target.a.value.trim(); if (v && !mine.has(v.toLowerCase())) set({ apps: [...s.apps, v] }); } },
|
|
407
|
+
h('input', { name: 'a', placeholder: 'App or process name', title: 'As it shows above, e.g. Code or WindowsTerminal' }), h('button', { className: 'btn', textContent: 'Add' }))));
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/* ---------- bubbles ---------- */
|
|
411
|
+
function bubbles() {
|
|
412
|
+
const b = d.settings.bubble, custom = b.text !== 'auto';
|
|
413
|
+
const sample = (d.urls.claude || [])[0] ? { url: d.urls.claude[0] } : samples().find(i => /plush/.test(i.file));
|
|
414
|
+
const pv = theme => {
|
|
415
|
+
const t = b.theme === 'auto' ? theme : b.theme === 'dark' ? 'd' : 'l';
|
|
416
|
+
const el = h('div', { className: ['pv', 'th-' + t, 'bs-' + b.size, b.style === 'text' && 'text', !b.border && 'noborder', !b.on && 'off', !b.stats && 'nostats'].filter(Boolean).join(' ') },
|
|
417
|
+
h('div', { className: 'bub' }, h('div', { className: 'h' }, h('b', { textContent: 'Claude' }), h('span', { textContent: 'opus-5-5 · agent-peeps' })),
|
|
418
|
+
h('div', { className: 'w' }, h('i'), h('span', { textContent: 'writing' }), h('code', { textContent: 'src/auth.ts' })),
|
|
419
|
+
h('div', { className: 's', textContent: '14 tools · 5 files · 6m 12s' })),
|
|
420
|
+
sample ? img(sample.url) : null);
|
|
421
|
+
if (custom) el.style.setProperty('--bt', b.text);
|
|
422
|
+
return el;
|
|
423
|
+
};
|
|
424
|
+
const COLORS = ['#ffffff', '#0b0b0c', '#ffd166', '#7dd3fc', '#86efac', '#f9a8d4'];
|
|
425
|
+
const swatch = c => { const el = h('button', { className: 'swatch' + (c === 'auto' ? ' auto' : ''), title: c === 'auto' ? 'Auto: white on dark, black on light' : c, onclick: () => setB({ text: c }) });
|
|
426
|
+
if (c !== 'auto') el.style.setProperty('--c', c); el.setAttribute('aria-pressed', String(b.text === c)); return el; };
|
|
427
|
+
return [
|
|
428
|
+
h('h1', { textContent: 'Speech bubbles' }),
|
|
429
|
+
h('p', { className: 'sub', textContent: 'The card that shows what an agent is doing. Hover a sticker, click it to pin, or peek at all of them.' }),
|
|
430
|
+
h('div', { className: 'stage' }, h('div', { className: 'desk dark' }, h('small', { textContent: 'dark desktop' }), pv('d')), h('div', { className: 'desk light' }, h('small', { textContent: 'light desktop' }), pv('l'))),
|
|
431
|
+
h('div', { className: 'panel' },
|
|
432
|
+
row('Speech bubbles', 'Turn every bubble and detail line off', sw(b.on, on => setB({ on })), hk('B')),
|
|
433
|
+
row('Style', 'A card, or plain text with a soft shadow', seg(b.style, [['card', 'Card'], ['text', 'Text only']], v => setB({ style: v }))),
|
|
434
|
+
row('Border', 'A thin outline around the card', sw(b.border, on => setB({ border: on }))),
|
|
435
|
+
row('Theme', 'Auto follows your system: white text in dark mode, black in light', seg(b.theme, [['auto', 'Auto'], ['dark', 'Dark'], ['light', 'Light']], v => setB({ theme: v })), hk('T')),
|
|
436
|
+
row('Text color', null, h('div', { className: 'swatches' }, swatch('auto'), COLORS.map(swatch),
|
|
437
|
+
h('input', { type: 'color', value: custom ? b.text : '#8ab4ff', title: 'Any color', onchange: e => setB({ text: e.target.value }) }))),
|
|
438
|
+
row('Text size', null, seg(b.size, [['small', 'Small'], ['medium', 'Medium'], ['large', 'Large']], v => setB({ size: v }))),
|
|
439
|
+
row('Open when it needs you', 'The bubble pops open by itself when an agent waits on you', sw(b.auto, on => setB({ auto: on }))),
|
|
440
|
+
row('Stats line', 'Tool calls, files touched and time on task', sw(b.stats, on => setB({ stats: on })))),
|
|
441
|
+
h('p', { className: 'note', textContent: 'Click a sticker to pin its bubble open. ' + MODK().join('+') + '+P opens every bubble at once.' }),
|
|
442
|
+
];
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* ---------- shortcuts ---------- */
|
|
446
|
+
function shortcuts() {
|
|
447
|
+
const s = d.settings;
|
|
448
|
+
const combo = k => h('div', { className: 'combo' }, [...MODK(), k].map(x => h('kbd', { textContent: x })));
|
|
449
|
+
return [
|
|
450
|
+
h('h1', { textContent: 'Keyboard shortcuts' }),
|
|
451
|
+
h('p', { className: 'sub', textContent: 'Work from anywhere, without opening this window. A toast near the bottom of the screen confirms each one.' }),
|
|
452
|
+
h('div', { className: 'panel' }, row('Global shortcuts', 'Turn off if they clash with another app. Show / hide always works.', sw(s.shortcuts, on => set({ shortcuts: on })))),
|
|
453
|
+
h('h2', { textContent: 'Anywhere' }),
|
|
454
|
+
h('div', { className: 'panel keys' }, d.keys.map(k => h('div', { className: 'key' }, combo(k.k), h('span', { textContent: k.text }),
|
|
455
|
+
k.state === true ? h('span', { className: 'ok', textContent: 'ready' }) : k.state === false ? h('span', { className: 'taken', textContent: 'used by another app' }) : h('span', { className: 'offk', textContent: 'off' })))),
|
|
456
|
+
h('h2', { textContent: 'In this window' }),
|
|
457
|
+
h('div', { className: 'panel keys' }, [['1 – 4', 'Overview, Display, Bubbles, Shortcuts'], ['?', 'This page'], ['Esc', 'Back to Overview'], ['/', 'Add a model rule'], [d.mac ? '⌘ W' : 'Ctrl W', 'Close the window (it keeps running)']]
|
|
458
|
+
.map(([k, t]) => h('div', { className: 'key' }, h('div', { className: 'combo' }, k.split(' ').map(x => h('kbd', { textContent: x }))), h('span', { textContent: t }), h('span')))),
|
|
459
|
+
];
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/* ---------- sticker picker ---------- */
|
|
463
|
+
function stickers(t) {
|
|
464
|
+
const chosen = d.chosen[t.key] || [];
|
|
465
|
+
const pick = list => ap.setAvatars(t.key, list);
|
|
466
|
+
const packOf = v => String(v).startsWith('pack:') && d.library.find(g => g.pack === v.slice(5));
|
|
467
|
+
const urlOf = f => (d.library.flatMap(g => g.items).find(i => i.file === f) || {}).url || (d.urls[t.key] || [])[0];
|
|
468
|
+
const chip = f => { const g = packOf(f);
|
|
469
|
+
return g ? h('div', { className: 'pick pack', title: g.group + ' pack' }, img(g.items[0].url), h('div', {}, h('b', { textContent: g.group }), h('small', { textContent: g.items.length + ' stickers, whole pack' })), h('button', { textContent: '×', title: 'Remove', onclick: () => pick(chosen.filter(x => x !== f)) }))
|
|
470
|
+
: h('div', { className: 'pick', title: f }, img(urlOf(f)), h('button', { textContent: '×', title: 'Remove', onclick: () => pick(chosen.filter(x => x !== f)) })); };
|
|
471
|
+
const who = t.group === 'Agents' || t.group === 'Models' ? 'session' : 'helper';
|
|
472
|
+
const total = (d.urls[t.key] || []).length;
|
|
473
|
+
const def = t.agent ? h('div', { className: 'def' }, img(logo(t.agent), 'logo-chip'), `Default: the ${NAMES[t.agent]} logo`)
|
|
474
|
+
: h('div', { className: 'def' }, 'Default: ' + (t.group === 'Models' ? 'the agent’s own sticker' : 'its agent’s logo'));
|
|
475
|
+
const bar = h('div', { className: 'bar' },
|
|
476
|
+
h('h1', { textContent: t.name }),
|
|
477
|
+
h('p', { className: 'sub', textContent: (t.group === 'Models' ? `Sessions whose model contains “${t.name}”. ` : '') + (total > 1 ? `${total} stickers: each ${who} gets one of them.` : `Click stickers, or use a whole pack. With several, each ${who} gets its own.`) }),
|
|
478
|
+
h('div', { className: 'chosen' }, chosen.length ? chosen.map(chip) : def),
|
|
479
|
+
h('div', { className: 'actions' },
|
|
480
|
+
h('button', { className: 'btn', textContent: 'Add from my computer…', onclick: () => ap.browse(t.key) }),
|
|
481
|
+
chosen.length ? h('button', { className: 'btn', textContent: 'Use default', onclick: () => pick([]) }) : null,
|
|
482
|
+
h('button', { className: 'btn', textContent: 'Open my sticker folder', onclick: () => ap.openFolder() })));
|
|
483
|
+
const blocks = d.library.flatMap(g => { const id = g.pack && 'pack:' + g.pack, on = id && chosen.includes(id);
|
|
484
|
+
const use = id ? h('button', { className: 'use', textContent: on ? '✓ Using whole pack' : 'Use whole pack', onclick: () => pick(on ? chosen.filter(x => x !== id) : [...chosen, id]) }) : null;
|
|
485
|
+
if (use) use.setAttribute('aria-pressed', String(!!on));
|
|
486
|
+
return [h('h2', {}, g.group, use), h('div', { className: 'grid' }, g.items.map(i => {
|
|
487
|
+
const n = chosen.indexOf(i.file);
|
|
488
|
+
const b = h('button', { className: 'tile', title: i.name, onclick: () => pick(n >= 0 ? chosen.filter(f => f !== i.file) : [...chosen, i.file]) }, img(i.url), h('span', { textContent: i.name }));
|
|
489
|
+
b.setAttribute('aria-pressed', String(n >= 0)); b.dataset.n = n + 1;
|
|
490
|
+
return b;
|
|
491
|
+
}))]; });
|
|
492
|
+
return [bar, ...(blocks.length ? blocks : [h('p', { className: 'empty', innerHTML: 'No stickers yet. Put images in <code>~/.agent-presence/stickers</code> (subfolders become groups), or add them from your computer.' })])];
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
const PAGES = { overview, display, bubbles, shortcuts };
|
|
496
|
+
function render() {
|
|
497
|
+
nav(); topbar();
|
|
498
|
+
const t = d.targets.find(x => x.key === tab) || extra.find(x => x.key === tab);
|
|
499
|
+
if (!t && !PAGES[tab]) tab = 'overview';
|
|
500
|
+
const main = document.getElementById('main'), y = main.scrollTop;
|
|
501
|
+
main.replaceChildren(...(t ? stickers(t) : d.keys ? PAGES[tab]() : stale()));
|
|
502
|
+
main.scrollTop = y;
|
|
503
|
+
}
|
|
504
|
+
// Updated on disk while an older Agent Peeps keeps running: this page is new, the data it gets is old.
|
|
505
|
+
const stale = () => [h('h1', { textContent: 'Restart Agent Peeps to finish updating' }),
|
|
506
|
+
h('p', { className: 'sub', textContent: 'A newer version is installed, but the copy that is running started before it. Quit it (tray icon → Quit Agent Peeps, or the first command), then start it again:' }),
|
|
507
|
+
h('p', {}, h('code', { textContent: 'agentpeeps overlay --quit' })), h('p', {}, h('code', { textContent: 'agentpeeps overlay' })),
|
|
508
|
+
h('p', { className: 'note', textContent: 'Sticker choices on the left still work until then.' })];
|
|
509
|
+
function go(k) { tab = k; render(); document.getElementById('main').scrollTop = 0; }
|
|
510
|
+
|
|
511
|
+
addEventListener('keydown', ev => {
|
|
512
|
+
if (ev.target.closest && ev.target.closest('input') && ev.key !== 'Escape') return;
|
|
513
|
+
if ((ev.ctrlKey || ev.metaKey) && ev.key.toLowerCase() === 'w') { ev.preventDefault(); window.close(); return; }
|
|
514
|
+
if (ev.ctrlKey || ev.metaKey || ev.altKey) return;
|
|
515
|
+
const i = '1234'.indexOf(ev.key);
|
|
516
|
+
if (i >= 0) go(VIEWS[i][0]);
|
|
517
|
+
else if (ev.key === '?') go('shortcuts');
|
|
518
|
+
else if (ev.key === 'Escape') { document.activeElement.blur(); go('overview'); }
|
|
519
|
+
else if (ev.key === '/') { ev.preventDefault(); document.querySelector('nav input').focus(); }
|
|
520
|
+
});
|
|
521
|
+
setInterval(() => { if (tab === 'overview' && !document.hidden && live.size) soon(); }, 1000); // timers tick
|
|
522
|
+
|
|
523
|
+
ap.onRoom(data => { d = data; document.body.classList.toggle('mac', !!data.mac); if (data.tab) tab = data.tab === 'settings' ? 'display' : data.tab; render(); });
|
|
524
|
+
ap.onEvent(track);
|
|
525
|
+
ap.onFront(f => { if (!d) return; d.front = f; if (tab === 'display' && !document.activeElement.closest('form')) render(); });
|
|
526
|
+
</script>
|
|
527
|
+
</body>
|
|
528
|
+
</html>
|