Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

17.8 KB
Raw Blame
<!-- AI生成 -->
 <!-- status: finalized -->
<!DOCTYPE html>
<html lang="zh-CN" data-theme="dark">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title>输入区 · 演示</title>
  <style>
    :root {
      color-scheme: dark;
      --gray-800: #212121;
      --gray-0: #f5f5f5;
      --gray-1000: #181818;
      --ds-bg-primary: #181818;
      --ds-bg-under: #000;
      --ds-bg-composer: color-mix(in oklab, var(--gray-800) 96%, transparent);
      --ds-text-primary: #fff;
      --ds-text-secondary: color-mix(in oklab, #fff 70%, transparent);
      --ds-text-muted: color-mix(in oklab, #fff 52%, transparent);
      --ds-text-faint: color-mix(in oklab, #fff 38%, transparent);
      --ds-tile: color-mix(in oklab, #fff 3.5%, transparent);
      --ds-tile-deep: color-mix(in oklab, #fff 8%, transparent);
      --ds-raised: #1f1f1f;
      --ds-bg-hover: color-mix(in oklab, #fff 6%, transparent);
      --ds-bg-active: color-mix(in oklab, #fff 10%, transparent);
      --ds-accent: #fff;
      --ds-purple: #c27aff;
      --ds-blue: #6cb2ff;
      --ds-error: #ff6764;
      --ds-success: #40c977;
      --ds-shadow-composer: 0 3px 7.5px #0000000a, 0 0 20px #0000000d;
      --radius-xs: 4px;
      --radius-sm: 6px;
      --radius-md: 10px;
      --radius-lg: 12px;
      --radius-lg-plus: 16px;
      --radius-2xl: 22px;
      --text-xs-plus: 11.5px;
      --leading-compact: 16px;
      --ui: #c27aff;
      --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
      --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
    }
    * { box-sizing: border-box; }
    html, body { margin: 0; height: 100%; }
    body {
      display: flex;
      flex-direction: column;
      font-family: var(--font);
      background: var(--ds-bg-under);
      color: var(--ds-text-primary);
      -webkit-font-smoothing: antialiased;
    }
    button { font: inherit; color: inherit; }

    .shell { display: flex; min-height: 0; flex: 1; flex-direction: column; background: var(--ds-bg-primary); }
    .topbar { padding: 14px 28px 12px; border-bottom: 1px solid color-mix(in oklab, #fff 6%, transparent); }
    .topbar h1 { margin: 0; font-size: 14px; font-weight: 560; }

    .thread { flex: 1; min-height: 0; overflow: auto; }
    .inner {
      width: min(800px, calc(100% - 48px));
      margin: 0 auto;
      padding: 24px 0 48px;
      display: flex;
      flex-direction: column;
    }

    .stage {
      display: flex; align-items: center; gap: 10px;
      margin: 34px 0 4px;
      color: var(--ds-text-faint);
      font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em;
    }
    .stage:first-of-type { margin-top: 10px; }
    .stage::after { content: ""; flex: 1; height: 1px; background: color-mix(in oklab, #fff 6%, transparent); }
    .stage .no {
      display: inline-grid; place-items: center;
      min-width: 18px; height: 18px; border-radius: 99px;
      background: var(--ds-tile-deep); color: var(--ds-text-secondary); font-size: 10.5px;
    }
    .stage .hint {
      color: var(--ds-text-muted);
      letter-spacing: 0;
      font-family: var(--font);
      font-size: 11.5px;
    }

    .message-row.user { display: flex; justify-content: flex-end; width: 100%; padding: 12px 0; }
    .message-col { display: flex; min-width: 0; width: min(max-content, 82%, 600px); max-width: min(82%, 600px); flex-direction: column; gap: 4px; align-items: flex-end; }
    .message-bubble {
      width: max-content; max-width: 100%;
      border-radius: var(--radius-lg-plus); border-bottom-right-radius: var(--radius-xs);
      background: color-mix(in oklab, #fff 8%, transparent);
      padding: 10px 15px; color: var(--ds-text-primary);
      font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: break-word;
    }
    .message-row.assistant { display: flex; width: 100%; padding: 6px 0 14px; }
    .assistant-col { width: min(100%, 720px); color: var(--ds-text-secondary); font-size: 15px; line-height: 1.6; }
    .assistant-col p { margin: 0; }

    .cshell {
      position: relative;
      width: 100%;
      margin: 8px 0 2px;
      border-radius: var(--radius-2xl);
      background: var(--ds-bg-composer);
      box-shadow: var(--ds-shadow-composer);
      padding: 10px 12px 8px;
      isolation: isolate;
    }
    .img-strip { display: flex; gap: 8px; padding: 2px 4px 8px; }
    .img-thumb {
      position: relative; width: 64px; height: 64px;
      border-radius: 8px; overflow: hidden;
      background: linear-gradient(135deg, #33424d, #1a2127);
      display: grid; place-items: center;
      color: var(--ds-text-faint); font-family: var(--mono); font-size: 9px; text-align: center;
    }
    .cinput-wrap { padding: 2px 6px 0; min-height: 44px; }
    .cinput {
      min-height: 3lh; max-height: 7lh;
      color: var(--ds-text-primary);
      font-size: 14px; line-height: 1.55;
      white-space: pre-wrap; overflow-wrap: break-word;
    }
    .cinput.is-empty { color: var(--ds-text-secondary); opacity: .72; }

    .ctoolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px; }
    .cleft, .cright { display: flex; align-items: center; gap: 4px; min-width: 0; }
    .cright { justify-content: flex-end; }

    .icon-btn {
      display: inline-flex; height: 28px; min-width: 28px;
      align-items: center; justify-content: center; gap: 6px;
      border: 0; border-radius: 99px; padding: 0 8px;
      background: transparent; color: var(--ds-text-secondary);
      font-size: 13px; cursor: default;
    }
    .icon-btn:hover { background: var(--ds-bg-hover); color: var(--ds-text-primary); }
    .icon-btn.active { background: var(--ds-bg-active); color: var(--ds-text-primary); }
    .icon-btn .face { display: inline-flex; align-items: center; gap: 6px; }
    .icon-btn.sq { padding: 0; }
    .icon-btn.plugin {
      color: var(--ui);
      background: color-mix(in oklab, var(--ui) 12%, transparent);
    }

    .send-btn {
      display: inline-flex; height: 28px; width: 28px; flex: 0 0 28px;
      align-items: center; justify-content: center;
      border: 0; border-radius: 99px;
      background: var(--gray-0); color: var(--gray-1000); cursor: default;
    }

    .ctx-trigger {
      display: inline-flex; height: 28px; align-items: center; gap: 6px;
      border: 0; border-radius: 99px; padding: 0 9px 0 7px;
      background: transparent; color: var(--ds-text-secondary); font-size: 12px;
      font-variant-numeric: tabular-nums; cursor: default;
    }
    .ctx-trigger:hover { background: var(--ds-bg-hover); color: var(--ds-text-primary); }
    .ctx-ring { display: inline-flex; flex: 0 0 auto; }

    .slot-box {
      position: relative;
      display: inline-flex;
      align-items: center;
      gap: 2px;
      min-height: 28px;
      min-width: 40px;
      margin: 0 3px;
      padding: 2px 5px;
      border: 1px dashed color-mix(in oklab, var(--ui) 55%, transparent);
      border-radius: 10px;
    }
    .slot-box .slot-name {
      position: absolute; top: -9px; left: 7px;
      padding: 0 5px;
      background: var(--ds-bg-primary);
      font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em;
      color: #e4c8ff;
      white-space: nowrap;
    }
    .slot-box.is-empty { min-width: 44px; min-height: 28px; opacity: .75; }

    .composer-chip {
      display: inline-flex; max-width: min(100%, 240px); height: 20px;
      align-items: center; gap: 4px; margin: 0 2px;
      border-radius: var(--radius-md); padding: 0 4px 0 6px;
      background: var(--ds-tile-deep); color: var(--ds-text-secondary);
      font-size: var(--text-xs-plus); line-height: var(--leading-compact);
      vertical-align: middle; white-space: nowrap; user-select: none;
    }
    .composer-chip .x {
      display: inline-flex; width: 14px; height: 14px; flex: 0 0 auto;
      align-items: center; justify-content: center;
      border-radius: 99px; color: var(--ds-text-muted);
    }
    .composer-chip.is-token {
      border: 1px dashed color-mix(in oklab, var(--ui) 50%, transparent);
      color: var(--ds-text-primary);
    }
    .composer-chip.is-token .tok {
      display: inline-grid; place-items: center;
      min-width: 13px; height: 13px; border-radius: 4px;
      background: color-mix(in oklab, var(--ui) 22%, transparent);
      color: #e4c8ff; font-family: var(--mono); font-size: 10px;
    }

    .plan-nav{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:10px 28px;background:#0c0c0c;border-bottom:1px solid color-mix(in oklab, #fff 8%, transparent);font-size:13px;flex:0 0 auto}
    .plan-nav a{color:var(--ds-text-muted);text-decoration:none;padding:3px 8px;border-radius:6px}
    .plan-nav a:hover{background:var(--ds-bg-hover);color:var(--ds-text-primary)}
    .plan-nav a[aria-current="page"]{background:var(--ds-tile-deep);color:var(--ds-text-primary);box-shadow:inset 0 0 0 1px color-mix(in oklab, #fff 14%, transparent)}
    .plan-nav .sep{color:var(--ds-text-faint);padding:0 2px}
    .plan-nav .spacer{flex:1}
    .plan-nav .here{color:var(--ds-text-primary);padding:3px 8px}
  </style>
</head>
<body>
<p data-aigc-mark="1" style="margin:0 0 8px;font-size:10px;line-height:1.3;color:#6b6560;font-weight:400;">AI生成</p>


<nav class="plan-nav">
  <a href="../../index.html">插件插槽目录</a>
  <span class="sep">/</span>
  <span class="here">输入区</span>
  <span class="spacer"></span>
  <a href="index.html">目录</a>
  <a href="requirements.html">需求</a>
  <a href="demo.html" aria-current="page">演示</a>
  <a href="data-flow.html">数据流</a>
</nav>

  <div class="shell">
    <header class="topbar">
      <h1>输入区 · 演示</h1>
    </header>

    <div class="thread">
      <div class="inner">

        <article class="message-row user">
          <div class="message-col">
            <div class="message-bubble">帮我把上周的销售数据整理一下。</div>
          </div>
        </article>

        <article class="message-row assistant">
          <div class="assistant-col">
            <p>好,我先看一下数据文件。</p>
          </div>
        </article>

        <div class="stage" id="s1"><span class="no">1</span>固定件与空槽<span class="hint">只有固定件</span></div>

        <div class="cshell">
          <div class="img-strip">
            <div class="img-thumb">screenshot<br />PNG</div>
          </div>
          <div class="cinput-wrap">
            <div class="cinput is-empty">问点什么…</div>
          </div>
          <div class="ctoolbar">
            <div class="cleft">
              <button class="icon-btn sq" type="button" aria-label="添加文件"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v14M5 12h14"/></svg></button>
              <button class="icon-btn" type="button"><span class="face"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="4" y="8" width="16" height="11" rx="2"/><path d="M12 8V4M8 4h8"/></svg><span>Agent</span></span></button>
              <button class="icon-btn" type="button"><span class="face"><span>询问</span><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg></span></button>
              <span class="slot-box is-empty"><span class="slot-name">左控件</span></span>
            </div>
            <div class="cright">
              <span class="slot-box is-empty"><span class="slot-name">右控件</span></span>
              <span class="ctx-trigger">
                <span class="ctx-ring"><svg width="14" height="14" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6" fill="none" stroke="rgba(255,255,255,.12)" stroke-width="2.4"/><circle cx="8" cy="8" r="6" fill="none" stroke="currentColor" stroke-width="2.4" stroke-dasharray="14.5 37.7" stroke-linecap="round" transform="rotate(-90 8 8)"/></svg></span>
                38%
              </span>
              <button class="icon-btn" type="button"><span class="face"><span>GLM-4.7</span><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg></span></button>
              <button class="send-btn" type="button" aria-label="发送"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><path d="M12 19V5"/><path d="M5 12l7-7 7 7"/></svg></button>
            </div>
          </div>
        </div>

        <div class="stage" id="s2"><span class="no">2</span>左控件 · 知识库<span class="hint">插件按钮</span></div>

        <div class="cshell">
          <div class="cinput-wrap">
            <div class="cinput">这份资料里的退货流程和时效是什么?</div>
          </div>
          <div class="ctoolbar">
            <div class="cleft">
              <button class="icon-btn sq" type="button" aria-label="添加文件"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v14M5 12h14"/></svg></button>
              <button class="icon-btn" type="button"><span class="face"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="4" y="8" width="16" height="11" rx="2"/><path d="M12 8V4M8 4h8"/></svg><span>Agent</span></span></button>
              <button class="icon-btn" type="button"><span class="face"><span>询问</span><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg></span></button>
              <span class="slot-box">
                <span class="slot-name">左控件</span>
                <button class="icon-btn plugin" type="button"><span class="face"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg><span>知识库</span></span></button>
              </span>
            </div>
            <div class="cright">
              <span class="slot-box is-empty"><span class="slot-name">右控件</span></span>
              <span class="ctx-trigger">
                <span class="ctx-ring"><svg width="14" height="14" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6" fill="none" stroke="rgba(255,255,255,.12)" stroke-width="2.4"/><circle cx="8" cy="8" r="6" fill="none" stroke="currentColor" stroke-width="2.4" stroke-dasharray="14.5 37.7" stroke-linecap="round" transform="rotate(-90 8 8)"/></svg></span>
                38%
              </span>
              <button class="icon-btn" type="button"><span class="face"><span>GLM-4.7</span><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg></span></button>
              <button class="send-btn" type="button" aria-label="发送"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><path d="M12 19V5"/><path d="M5 12l7-7 7 7"/></svg></button>
            </div>
          </div>
        </div>

        <div class="stage" id="s3"><span class="no">3</span>右控件 · 记号<span class="hint">选中后插入</span></div>

        <div class="cshell">
          <div class="cinput-wrap">
            <div class="cinput">对比一下<span class="composer-chip is-token"><span class="tok">#</span>数据1<span class="x"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M18 6L6 18M6 6l12 12"/></svg></span></span>和<span class="composer-chip is-token"><span class="tok">#</span>数据2<span class="x"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M18 6L6 18M6 6l12 12"/></svg></span></span>的销量</div>
          </div>
          <div class="ctoolbar">
            <div class="cleft">
              <button class="icon-btn sq" type="button" aria-label="添加文件"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 5v14M5 12h14"/></svg></button>
              <button class="icon-btn" type="button"><span class="face"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="4" y="8" width="16" height="11" rx="2"/><path d="M12 8V4M8 4h8"/></svg><span>Agent</span></span></button>
              <button class="icon-btn" type="button"><span class="face"><span>询问</span><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg></span></button>
              <span class="slot-box is-empty"><span class="slot-name">左控件</span></span>
            </div>
            <div class="cright">
              <span class="slot-box">
                <span class="slot-name">右控件</span>
                <button class="icon-btn plugin" type="button" aria-label="草稿统计">1,284</button>
              </span>
              <span class="ctx-trigger">
                <span class="ctx-ring"><svg width="14" height="14" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6" fill="none" stroke="rgba(255,255,255,.12)" stroke-width="2.4"/><circle cx="8" cy="8" r="6" fill="none" stroke="currentColor" stroke-width="2.4" stroke-dasharray="14.5 37.7" stroke-linecap="round" transform="rotate(-90 8 8)"/></svg></span>
                38%
              </span>
              <button class="icon-btn" type="button"><span class="face"><span>GLM-4.7</span><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg></span></button>
              <button class="send-btn" type="button" aria-label="发送"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><path d="M12 19V5"/><path d="M5 12l7-7 7 7"/></svg></button>
            </div>
          </div>
        </div>

      </div>
    </div>
  </div>
</body>
</html>