Files
plugins/packages/agent-office/page/index.html
T
Zhaoji Wang 845fcfea4e agent-office: draw the Settings and picker chevrons as SVG (#740)
agent-office: the Settings button's chevron is an inline SVG that turns
over while the menu is open, and the Language, Scene and Quality pickers
draw the same chevron (appearance: none) in light and dark. .btn is
inline-flex so the chevron sits on the label's centre line, and an empty
Today token count no longer leaves a gap. Adapted by frederick-wang from
QingJ01/magpie-agent-office#4. Also re-stamps the page's asset
fingerprints, which were stale on main for model.js, scene.js,
scene3d.js and app.js since 0.3.0.

Run at the reviewed head 625619bb, on mote:
- HOME=<scratch> bun test packages/agent-office: 182 pass, 0 fail
  (main 1ad712d9: 181 pass).
- bun packages/agent-office/scripts/stamp-page.mjs --check: 0
  (main: 1, "stamps are stale"); every ?v= checked against sha256 of
  its file.
- bun scripts/check.mjs agent-office: 0.
- Playwright 1.62.0, Chromium and WebKit, light and dark, 1200x760 @2x,
  page served from the PR's files with a stub bridge: no page errors;
  chevron centre 95.58px vs label 95.59px in both engines (main's
  glyph: +1.0px Chromium, +1.1px WebKit); open menu turns it 180deg;
  Today padding 16/16; every .btn still 36.3px tall. Screenshots looked
  at, light and dark.

Not tried: inside the real magpie window (WKWebView/WebView2/WebKitGTK).
The three pickers are still native <select> elements (restyled, not
replaced); that is filed separately.
2026-11-05 09:38:34 +08:00

117 lines
6.2 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Agent Office</title>
<link rel="stylesheet" href="style.css?v=f600355d91db">
<script src="_magpie/bridge.js"></script>
<script src="agents.js?v=d958111cd669"></script>
<script src="model.js?v=ba46364dfbb1"></script>
<script src="icons.js?v=e918b44d46c2"></script>
<script src="scene.js?v=097cc0a3eec6"></script>
<script src="three.min.js?v=5b5a0ae404b6"></script>
<script src="scene3d.js?v=b666062a087d"></script>
<script src="app.js?v=b681f2393c97" defer></script>
</head>
<body>
<main class="card" id="card">
<header class="top">
<h1><span class="eyes" aria-hidden="true"><i></i><i></i></span><span data-t="title">What are my agents doing</span><span class="live" id="live"><i></i><span data-t="live">live</span></span></h1>
<div class="counts" id="counts">
<span class="count need"><i></i><span data-t="needYou">Need you</span> <b id="nNeed">0</b></span>
<span class="count work"><i></i><span data-t="working">Working</span> <b id="nWork">0</b></span>
<span class="count done"><i></i><span data-t="doneN">Done</span> <b id="nDone">0</b></span>
</div>
</header>
<nav class="bar">
<div class="seg dark" role="tablist" id="modes">
<button type="button" role="tab" data-mode="office" data-t="office">Office</button>
<button type="button" role="tab" data-mode="list" data-t="list">List</button>
</div>
<div class="seg plain" role="tablist" id="dims">
<button type="button" role="tab" data-dim="2d">2D</button>
<button type="button" role="tab" data-dim="iso">ISO</button>
<button type="button" role="tab" data-dim="3d">3D</button>
</div>
<span class="note" id="note"></span>
<span class="grow"></span>
<div class="tools">
<div class="menu-wrap">
<button type="button" class="btn" id="todayBtn" aria-haspopup="true" aria-expanded="false"><span data-t="today">Today</span> <span class="today-tokens" id="todayTokens"></span></button>
<div class="menu today-panel" id="todayMenu" hidden></div>
</div>
<button type="button" class="btn" id="sideBtn" aria-pressed="true"><span data-t="panel">Panel</span></button>
<button type="button" class="btn" id="pip" data-t="pip">Picture in picture</button>
<div class="menu-wrap">
<button type="button" class="btn" id="settingsBtn" aria-haspopup="true" aria-expanded="false"><span data-t="settings">Settings</span><svg class="chev" viewBox="0 0 10 6" width="10" height="6" aria-hidden="true"><path d="M1.25 1.25L5 4.75L8.75 1.25" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></button>
<div class="menu wide" id="settings" hidden>
<label class="row"><input type="checkbox" id="optDemo"> <span data-t="demo">Sample agents</span></label>
<label class="row"><input type="checkbox" id="optDone"> <span data-t="showDone">Show finished agents</span></label>
<label class="row"><input type="checkbox" id="optText"> <span data-t="showText">Show prompts and replies</span></label>
<label class="row"><input type="checkbox" id="optSub"> <span data-t="showSub">Show subagents</span></label>
<label class="row"><input type="checkbox" id="optIdle"> <span data-t="showIdle">Show idle agents</span></label>
<div class="row col">
<span data-t="agents">Agents</span>
<div class="agent-filter" id="optAgents"></div>
</div>
<div class="row col">
<span data-t="language">Language</span>
<select class="lang-select" id="optLang"></select>
</div>
<div class="row col">
<span data-t="scene">Scene</span>
<select class="lang-select" id="optScene"></select>
</div>
<div class="row col">
<span data-t="quality">Quality</span>
<select class="lang-select" id="optQuality">
<option value="low" data-t="qLow">Low</option>
<option value="medium" data-t="qMedium">Medium</option>
<option value="high" data-t="qHigh">High</option>
</select>
</div>
<div class="row col">
<span data-t="hideAfter">Leave the office after</span>
<div class="seg small" id="optHide">
<button type="button" data-hide="1h" data-t="h1">1 hour</button>
<button type="button" data-hide="6h" data-t="h6">6 hours</button>
<button type="button" data-hide="24h" data-t="h24">24 hours</button>
<button type="button" data-hide="never" data-t="never">Never</button>
</div>
</div>
</div>
</div>
</div>
</nav>
<section class="stage" id="stage">
<canvas id="office" tabindex="0" aria-label="Agent office"></canvas>
<canvas id="office3d" tabindex="0" aria-label="3D Agent office" hidden></canvas>
<div class="tags" id="tags"></div>
<div class="empty" id="empty" hidden></div>
</section>
<section class="listview" id="listview" hidden>
<table>
<thead><tr><th data-t="agent">Agent</th><th data-t="task">Task</th><th data-t="status">Status</th><th data-t="project">Folder</th><th data-t="model">Model</th><th data-t="last">Last active</th></tr></thead>
<tbody id="rows"></tbody>
</table>
<p class="empty-list" id="emptyList" hidden></p>
</section>
<aside class="rail" id="rail" hidden>
<div class="rail-head"><span data-t="agents">Agents</span> <b id="railCount">0</b><span class="grow"></span><button type="button" class="px" id="railClose" aria-label="Close">✕</button></div>
<div class="rail-groups" id="railGroups"></div>
</aside>
<aside class="pop" id="pop" hidden></aside>
<footer>
<div class="legend" id="statusLegend"></div>
<div class="legend brands" id="brandLegend"></div>
</footer>
</main>
<div class="float" id="float" hidden>
<div class="floatbar" id="floatbar"><span class="fdots" aria-hidden="true"><i></i><i></i></span><span data-t="pip">Picture in picture</span><button type="button" class="fclose" id="floatClose" aria-label="Close">✕</button></div>
<div class="floatslot" id="floatslot"></div>
</div>
<div class="toasts" id="toasts" aria-live="polite"></div>
</body>
</html>