Commit Graph
196 Commits
Author SHA1 Message Date
dd3xp caefc54cae feat(desktop): add conductor to status panel; group system services above IM
list_panel_state now emits bridge → extras (conductor + scheduler) → IM,
giving conductor a friendly 指挥家 / Conductor label and grouping system
services together at the top of the panel.
2026-06-19 02:11:20 +08:00
dd3xp d77f4da3ce fix(desktop): add standard line-clamp alongside -webkit prefix in .fc-d
Silences vendorPrefix linter warning; future-proofs preset card description
clamp for browsers that drop the -webkit alias.
2026-06-18 22:56:01 +08:00
dd3xp 3954e6750c feat(desktop): replace 自主探索 preset with 自主行动 (reflect SOP trigger)
Old '自主探索' (auto-explore) was just a browse+summarize prompt, unrelated
to the framework's reflect/autonomous.py module. Teacher requested a real
trigger for autonomous mode — same behavior as the 30-min idle reflect cron
but user-initiated via preset click.

- BUILTIN_PRESETS: key 'explore' → 'autonomous', icon 'compass' → 'gridFour'
- i18n rename (zh + en):
    preset.explore.* → preset.autonomous.* ('自主行动' / 'Autonomous mode')
    presetPrompt.explore → presetPrompt.autonomous
- New prompt points at memory/autonomous_operation_sop.md so the agent
  reads the same SOP that reflect/autonomous.py uses. Mirror of the cron
  trigger '[AUTO]🤖 用户已经离开...' but framed as user-initiated.
- Side effect: users who had 'explore' hidden in localStorage will see the
  new '自主行动' card show up by default. Acceptable for a feature change.

Cache buster: app.js 189 → 190.
2026-06-18 16:36:15 +08:00
dd3xp 20696ae793 feat(desktop): chat status restored to topbar + send btn ink-green + findwork preset + pager arrow polish
UI cleanup wave:

Chat status indicator:
- Move .run-state ('服务在线' chip) back from sidebar foot to chat page-top
  (reverts the PR #15 38e1670 relocation only; other PR #15 changes kept)
- Restore .foot-ver version label block in sidebar foot
- Restore .page > .page-top .run-state grid positioning rule
- Drop all .foot-status CSS + i18n + breathing-dot selectors
- .run-state height switched to var(--shell-head-h) so it sits flush with
  the 28px topbar grid (no more 2px overshoot)

Send button:
- .send background var(--accent) → var(--ink-green) (#1f6f53), hover →
  var(--ink-green-hover) (#175a44). Two new CSS vars introduced in :root
  to avoid hardcoded colors per project convention.
- Stop-state (.send.is-stop) still uses var(--danger) — no change

New preset card ('找点事做'):
- Adds BUILTIN_PRESETS entry between review and mine using phosphor robot
  icon. Sends the same fixed prompt as stapp.py's autonomous-action button:
  按照自主行动的规划部分,充分分析我的情况,给我生成一批 TODO,务必让我感兴趣。
- New i18n keys: preset.findwork.t/d + presetPrompt.findwork (zh + en)

Token pager arrows:
- Replace Unicode '‹' '›' with phosphor caretLeft/caretRight SVGs (12×12,
  muted2 → txt-2 on hover), matching the sidebar .chev style
- Drop the font-size 20px + padding-bottom workaround that tried to
  visually center the Unicode characters
2026-06-18 16:27:39 +08:00
dd3xp 2669e856b2 fix(desktop): bump mykey config editor max length 20000 → 1000000
Real mykey.py configs with many providers + IM tokens + Langfuse + heavy
comments easily exceed 20000 chars. 1M ceiling effectively removes the
limit for any realistic config while still preventing accidental
multi-megabyte paste from misbehaving content.
2026-06-18 15:31:09 +08:00
dd3xp 9c7b47eb0d feat(desktop): drop trend chart + windowed pagination for token table
Trend chart removed from this release:
- index.html: drop the entire tok-chart-wrap block (toggle button + chart)
- app.js: drop renderTokChart() function, tokChartEl/tokChartToggle/tokChartWrap
  const+listener, all conditional display branches in tab switching and
  loadTokenPage, and the tok.chartToggle i18n key (zh + en)
- styles.css: drop .tok-chart-wrap, .tok-chart-toggle, .tok-chart rules

Token table paginator no longer dumps every page button:
- New renderTokPager() builds first / last / current ± 2 / ellipsis / prev /
  next, capped at ~9 DOM nodes regardless of total pages. 1000 pages and
  10 pages render the same shape, no more flex row overflow.
- Add .tok-pager-gap style for ellipsis spans, :disabled style for endpoint
  arrows, and flex-wrap:wrap fallback on .tok-pager.

Cache busters: styles.css 153→154, app.js 186→187.
2026-06-18 11:30:09 +08:00
China Nikocado Avocado 2e1d480829 Merge pull request #15 from dd3xp/feat/typography-alignment
feat: typography alignment, icon system, and status indicator copy
2026-06-18 11:12:53 +08:00
dd3xp 500fe92d95 feat(desktop): bridge auto-starts conductor on boot (--no-browser flag)
Conductor used to be a separately-launched service that opens its own UI
in the user's browser. With the desktop app, users access conductor via
the built-in 「指挥家」 page connecting to port 8900, so the standalone UI
window is redundant and confusing.

- conductor.py: gain a --no-browser flag that skips the webbrowser.open
  call. Default behavior (no flag) unchanged for backward compat with
  start_conductor.ps1 / GAConductor scheduled task / manual python runs.
- desktop_bridge.py discover_extra_services: also enumerate conductor.py
  alongside scheduler.py, with --no-browser baked into the spawn cmd.
  autostart_extras then picks it up automatically on bridge boot.
2026-06-18 11:02:33 +08:00
ethan su e5ef4878ce copy: update collab placeholder and preset card icons
- Collab placeholder zh: '请对指挥家描述你想完成的目标'
- Collab placeholder en: 'Describe the goal you want to accomplish'
- Preset cards now reference GA_ICON() for consistent icon rendering
2026-06-18 00:26:20 +08:00
ethan su 56b2138a57 style: add --divider token and refine panel borders
- Introduce --divider-base and --divider CSS custom properties
- Light themed: rgba(15,74,133,0.22) blended with accent
- Dark mode: #569cd6 base
- Right panel now has visible border-left: 1px solid var(--divider)
- Resize handle narrowed to 6px with -3px margin for better grab UX
- Add #cdb-model-chip .model-name to monospace selector
2026-06-18 00:26:10 +08:00
ethan su 86f68d6d38 ui: migrate inline SVGs to phosphor icon system
- Replace all inline <svg> in index.html with data-ga-icon attributes
- Add 7 new phosphor icons: crosshair, compass, gitFork, hexagon, fileText, star, liFork
- Preset cards in app.js now use GA_ICON() getter instead of raw SVG strings
- Bump cache-bust: phosphor-icons.js?v=2, app.js?v=186
2026-06-18 00:25:54 +08:00
ethan su 5e5d94793a copy: optimize connection status i18n strings
- Unify Chinese naming to 指挥家 (remove English 'Conductor' from user-facing copy)
- Remove hardcoded port 8900 from error messages
- Status labels: 就绪→服务在线, 运行中→处理中, 未连接→服务离线, 空闲→待命
- collab.offline: simplified to generic guidance (no tunnel mention)
- Add Chinese err.bridge: 服务未响应
2026-06-18 00:22:17 +08:00
ethan su b7b3f9ac4c refactor: relocate status indicator to sidebar footer
- Move .run-state button from page header to sidebar .foot-status
- Add .foot-status layout (flex, gap, version label inline)
- Remove old .foot-ver block (merged into .foot-status)
- Remove .page > .page-top .run-state positioning rule
- Extend .run-state animations to cover .foot-status context
2026-06-18 00:21:34 +08:00
ethan su 937028e6ed style: unify default font size to 13px
- --chat-font: 14px → 13px (bubble text baseline)
- --shell-head-h: 36px → 28px (tighter header)
- composer .input: 15px → 13px
- composer placeholder: 15px → 13px
- bubble h1: add font-weight:600, adjust padding
2026-06-18 00:19:44 +08:00
yanghang 6f444f3497 fix(desktop): UI polish, custom-task edit, input-limit fixes
- 自定义任务卡: 主图标改用户图标, 新增'编辑任务'(铅笔->预填弹窗->更新),
  标题/描述截断(…)+tooltip
- 字数上限告警重构: 每字段独立提示(消除串扰), 文案只提醒不提截断,
  2.5s自动消失, 超限尝试才触发, JS管控长度修复中文IME下不触发的问题
- Token统计: 重置按钮与日期框高度统一(30px)
- 会话项'更多'按钮: 放大并调深颜色, 解决几乎看不到
- 侧边栏选中态: 深色文字提对比 + text-shadow假加粗(不改字宽,避免抖动)
- 全局弱文字对比度: --muted/--muted2 浅色调深、深色调亮
2026-06-17 22:58:44 +08:00
dd3xp 2a17d93411 style(desktop): collab retry button uses .preset-restore look (white card bg)
Drop the var(--line-soft) gray background — too dim against the topbar.
Match .preset-restore button styling:
- background: var(--card) (clean white panel)
- border: var(--line)
- hover: bg var(--hover-2), color + border become var(--accent)

styles.css?v=152→153.
2026-06-17 21:29:41 +08:00
dd3xp a34d3df011 feat(desktop): collab offline UI — replace banner with topbar status + refresh icon
The previous collab page showed a wide banner with the long offline message
plus a "重试" chip button across the top, which looked clunky. Move both
into the existing page-top status bar:

- Drop .collab-offline and .collab-reconnect <div> banners entirely
  (HTML, CSS rules, and JS show/hide logic).
- Wrap .run-state and a new .collab-retry-btn in a .page-top-center flex
  container (grid-column:2 of the page-top grid).
- Topbar text replaces "未连接" with the new collab.offlineShort string
  ("无法连接 Conductor(8900)" / "Cannot reach Conductor (8900)") via
  collabStatus.set(longer, 'offline').
- The retry button is a 24×24 button styled like .new-conv (var(--line-soft)
  bg + 1px border + 4px radius, hover var(--hover-2)), holding a 14×14
  inline SVG refresh-cw icon. Hidden by default, shown only when offline
  AND no auto-reconnect is in progress.
- setConnUi simplified to just toggle the retry icon's [hidden] attribute.
- Existing click handler on #collab-retry preserved (id unchanged).
2026-06-17 21:13:26 +08:00
China Nikocado Avocado 988cde8645 Merge pull request #14 from dd3xp/feat/typography-alignment
feat: typography alignment with system font baseline
2026-06-17 20:43:00 +08:00
ethan su a9c0e20b75 feat: typography alignment with system font baseline
- Consolidate font stack: remove GA Lexend/Noto Sans, use system sans (SF Pro/Segoe UI)
- Reduce CSS font variables from 6 to 3 (--font-sans, --font-mono, --font-brand)
- Converge font-weights to match reference spec (700→600 headings, 600→500 labels)
- Add explicit font-family to pre/code blocks
- Compact nav-item: 28px height, 8px padding, 16px icons
- Remove 'token' from all UI copy, simplify to 'Usage'/'用量'
- Add cache-buster to fonts.css link
2026-06-17 18:31:16 +08:00
dd3xp 909a1ed285 feat(desktop): sidebar + token page UI polish
Sidebar:
- 快速接入官方模型 header restyled to match 配置 button (foot-row style:
  transparent bg, padding, hover state, lightning icon on left,
  caretRight chevron on right that rotates 90deg when expanded).
- Drop the "填好 API Key 即可使用" subtitle for single-line consistency.
- Drop the "展开/折叠" tooltip on the head.
- Bump both .pq-head and .foot-row padding to 14px so the buttons look
  substantial.
- Set .sidebar-foot margin-top:6px to match .provider-quickstart's internal
  gap:6px — uniform 6px rhythm between pq-head→DeepSeek→Qwen→配置.

Services page:
- Remove the "IM 消息通道与后台进程,集中查看、启停与日志" subtitle.
- Align .svc-tabs margin with .tok-tabs (margin:10px 0 0) so the title
  position and tab bar position match the Token usage page.

Token page (i18n):
- zh: "Conductor" → "指挥家" on tab label, total/current row labels,
  tooltip, and the new tok.condOffline string (replaces hard-coded text).
- en remains "Conductor" (English UI keeps the English name).

Token table column widths:
- Switch to table-layout:fixed. Number columns 80px each, cache-rate 85px.
- First column (session name) gets the rest of the width; overflow truncates
  with ellipsis. JS adds title="<full name>" so hover shows the complete
  session title as a tooltip. No more column-width jitter when switching
  Chat/指挥家 tabs.

Color tweaks (no hardcoded values):
- .pq-btn background var(--bg-base) → var(--field-bg) (lighter).
- .model-guide border var(--accent) → var(--line-base); background
  var(--accent-bg) → var(--field-bg) (lighter, neutral).
2026-06-17 08:19:59 +08:00
dd3xp 7ef8afa48d Merge remote-tracking branch 'desktop/main' into RoundSquisheen 2026-06-17 07:31:24 +08:00
dd3xp 6b202592b0 feat(desktop): fix trend chart text squish + remove color theme picker
Trend chart fix:
- SVG had preserveAspectRatio="none" which stretched the viewBox 600x260
  non-uniformly to the container (max-width 760 x height 280), making text
  ~15% wider than tall ("扁").
- Switch to preserveAspectRatio="xMidYMid meet" so text renders at correct
  aspect, and replace fixed container height with aspect-ratio:600/260 +
  min-height:280px so chart fills naturally without distortion.

Color theme cleanup (user-requested):
- Drop 8-color mac-style palette, keep only a single gray light theme.
- --accent now hard-coded gray (#8e8e93); removed --swatch-2..8 and all
  html[data-theme="N"] / .swatch[data-theme="N"] CSS rules.
- Remove the entire "颜色" (set.theme) block from settings page.
- applyTheme() stubbed: still callable for backward compat with stored
  ga_theme values, but always normalizes to theme '1'.
- Drop set.theme i18n entries (zh + en).

Cache busters: styles.css 136→137, app.js 181→182.
2026-06-17 07:30:33 +08:00
yanghang 1a78bc6237 Revert "Add desktop release test materials"
This reverts commit 82442ce9df.
2026-06-16 23:10:33 +08:00
yanghang 515d325db7 Add desktop release test materials 2026-06-16 23:08:27 +08:00
weaselkns 22385dd5c6 Merge pull request #13 from dd3xp/feat/official-api-quickstart
Feat/official api quickstart
2026-06-13 00:56:40 +08:00
weaselkkk b2cd622aed fix(desktop): 修复首次打开状态栏卡在「连接中」
启动引导是 async IIFE,首行 await loadSessions() 会让出事件循环;
此期间 WS 一连上 bridge 即推送 bridge-ready(desktop_bridge ws_handler),
onBridgeReady 已把 state.bridgeReady 置 true 并刷成「就绪」。但随后引导
无条件执行 chatStatus.setConnecting() 又覆盖回「连接中」,且此后 WS 已连、
不再触发 bridge-ready,状态便一直卡住,直到发消息触发 refreshStatusLabel
才恢复。

改为:若 await 期间 bridge 已就绪(state.bridgeReady=true)则按真实状态
渲染,否则才显示「连接中」,由 onBridgeReady 后续翻转。
2026-06-13 00:12:28 +08:00
weaselkkk 3e8f00ae08 style(desktop): 快速接入卡片改用中性白/浅灰配色,去除主题色调
- 外层卡片改为白色(--card)+ 中性描边(--line-base)
- 内层按钮改为浅灰(--bg-base),去除原 --line-soft 的主题绿色调
2026-06-12 23:27:22 +08:00
weaselkkk 790382017a feat(desktop): 快速接入卡片支持折叠,并改用 DeepSeek/Qwen 官方 logo
- 卡片头部新增向下箭头,可折叠/展开,状态记忆到 localStorage
- DeepSeek / 通义千问 图标替换为官方 logo(品牌色 + 浅色徽底)
- 添加模型弹窗指引横幅同步使用官方 logo
2026-06-12 23:20:07 +08:00
weaselkkk 7d600eaa59 feat(desktop): 侧边栏新增 DeepSeek/Qwen 官方 API 快速接入入口与指引
- 侧边栏空白区新增「快速接入」卡片,DeepSeek / 通义千问 一键按钮
- 点击后打开预填好 API 地址/协议/模型的添加模型表单,仅需粘贴 Key
- 表单顶部接入指引横幅:分步说明 + 获取 Key 链接 + 复制按钮
- 中英文双语文案,语言切换实时生效
2026-06-12 23:04:16 +08:00
yiqi-017andGenericAgent 64634a582d fix(desktop): onBridgeReady 无条件刷新状态条
有活跃会话时 refreshStatusLabel 未被调用,
导致状态条卡在「连接中」直到 hydrate 完成。

Co-authored-by: GenericAgent <292701730+GenericAgent@users.noreply.github.com>
2026-06-11 16:59:01 +08:00
yiqi-017andGenericAgent 22cc940795 fix(desktop): 切换会话后恢复「已运行 Xs」elapsed badge
切换到已hydrate的会话时,setActiveSession的else分支
漏调restoreElapsedBadges,导致DOM重建后badge丢失。

Co-authored-by: GenericAgent <292701730+GenericAgent@users.noreply.github.com>
2026-06-11 16:06:30 +08:00
yiqi-017 5ec31c3c89 fix: 修复两个侧边栏拖动延迟(拖拽时禁用transition) 2026-06-11 15:15:23 +08:00
dd3xp 31ea4f6456 fix(desktop): rebuild assistant bubble from final m on done to avoid frp tail loss
Post-merge ljq's "reuse draftEl, update in-place on done" optimization relied
on partial stream having delivered the complete content by the time the done
signal arrives. Over the frp tunnel (~80-300ms RTT), the bridge can flip to
idle before the last partial chunk reaches the browser, leaving the bubble
with truncated content from the partial accumulation.

Replace both turn_segs and no-turn_segs branches with a single in-place rebuild
that takes the final m as canonical source:
- assistantTurnSegs(m) handles both turn_segs and content fallback (same as
  the refresh path through msgNode)
- bubble.innerHTML = renderAssistantTurnsHtml(...) + postRenderEnhance for
  code highlighting and other post-render hooks
- sync r.draftSegs/draftTurn/streamTurn/twState so later cursor/badge/copy
  logic reads consistent state

Keeps ljq's no-flicker bubble reuse; same DOM element survives, only its
innerHTML gets replaced by the canonical full content. Local low-latency
behavior unchanged.
2026-06-11 05:44:16 +08:00
China Nikocado Avocado a6df0f8c0a Merge pull request #12 from dd3xp/ljq_turn_segs
合并ljq分支并适配流式渲染
2026-06-11 02:08:52 +08:00
lyx 0193f9129e 适配流式渲染 2026-06-08 22:51:47 +08:00
yiqi-017 e256e9b982 feat: turn_segs 结构化渲染,支持按轮独立渲染与模型切换 2026-06-08 18:42:38 +08:00
lyx 933850dde7 Merge remote-tracking branch 'origin/main' into feat/desktop-ui 2026-06-07 16:48:40 +08:00
lyx 887627a39d style(desktop): Conductor 分工进度抽屉更紧凑
去掉标题/统计区分割线,缩小计数徽标与任务卡片,统一圆角与上下留白。
2026-06-06 23:54:19 +08:00
dd3xp 6f41da834e Merge RoundSquisheen: sync to lsdefine b365945 2026-06-06 23:06:52 +08:00
dd3xp b1352f2de1 chore: sync framework to upstream lsdefine/GenericAgent @ b365945
上次同步点是 1eb8c4c (我们 fork 上为 8f89766),lsdefine 自那以来 102 个

commit,包括飞书 IM 插件、TUI v2 修、conductor OOP 重构、L4 scheduler

mkdir 修复、checklist 系统、computer_use SOP 等。

处理分桶:

  - 45 个 lsdefine-only 文件:整文件覆盖(safe,无我方改动)

  - 17 个 ours-only 文件:完全保留(桌面前端 + bridge + plan_state)

  - 4 个双方都动:逐个 3-way 合

      * .gitignore: 取并集(lsdefine 新增 + 我们 /BUG_*.md)

      * reflect/scheduler.py: 已字节对齐 lsdefine,无操作

      * frontends/conductor.py: lsdefine OOP 重构作 base,我们 6 处

          改动(CORS / add_chat files+images / cost_tracker / token-stats

          / WS running / WS receive files+images)原样塞进新结构

      * frontends/conductor.html: lsdefine 重组作 base,我们 40 行

          输入字数限制 + toast 原样塞进 keydown 监听之后

未触动 desktop_bridge.py(memory 规则约定 exclude bridge)。

已 grep 全文件无 <<<<<< / ======= / >>>>>> 冲突标记残留。

我们改动一行未漏,全部按原代码原文落实,没有自创新代码。
2026-06-06 23:05:59 +08:00
dd3xp 82d115158c Merge main into RoundSquisheen: catch up team's commits (llm_history persist, cache rate fix) 2026-06-06 22:48:14 +08:00
lyx 96c9496188 fix(desktop): 轮次标题单行显示,避免窄栏折行
fold-turn summary 与 turn-summary 加 nowrap,副标题过长 ellipsis。
2026-06-06 22:18:46 +08:00
lyx 3ca2cf6248 fix(desktop): 流式结束后 tool call 不再被 openIdx 误保持展开
rewriteDraftBubble 跨帧恢复 details 时跳过 fold-tool-live,仅保留用户手动展开的折叠。
2026-06-06 21:57:47 +08:00
lyx 7d0f0048cb fix(desktop): hydrate 用 limit=0 拉全量历史
避免与 bridge 尾部截断语义冲突导致超过 200 条会话缺开头消息;抽取 fetchSessionPoll 复用 poll 逻辑。
2026-06-06 20:07:55 +08:00
lyx 4f0762df00 fix(desktop): 会话 loading 与 hydrate 生命周期分离
切会话先清遮罩;hydrate 首拍拉历史后即关 loading,running 交后台 poll;10s 超时兜底。
2026-06-06 20:07:28 +08:00
lyx 66798b586f Merge branch 'main' into feat/desktop-ui
保留桌面 UI 分支的静态资源版本号(styles v127 / app v162)。
2026-06-06 19:18:44 +08:00
dd3xp f6b594dc71 fix(reflect/scheduler): switch to lsdefine's mkdir fix (drop my variant)
lsdefine/main b365945 had independently landed the same makedirs fix

I added in ac2779d, but at module top-level and creating DONE/ instead

of dirname(_LOG).

Functionally equivalent (both unblock fresh-deploy scheduler import), but

to keep this fork aligned with upstream we adopt lsdefine's version

verbatim. After future content-overlay syncs from upstream, no diff in

this file.
2026-06-06 17:39:42 +08:00
dd3xp ccc7a0d44b fix(reflect/scheduler): switch to lsdefine's mkdir fix (drop my variant)
lsdefine/main b365945 had independently landed the same makedirs fix

I added in ac2779d, but at module top-level and creating DONE/ instead

of dirname(_LOG).

Functionally equivalent (both unblock fresh-deploy scheduler import), but

to keep this fork aligned with upstream we adopt lsdefine's version

verbatim. After future content-overlay syncs from upstream, no diff in

this file.
2026-06-06 17:39:01 +08:00
yiqi-017 554586fa82 fix: 持久化 llm_history 修复重启后模型幻觉工具调用 2026-06-06 16:09:22 +08:00
yiqi-017 7173a05b06 [FIX]:估算价格改成缓存率 2026-06-06 12:00:41 +08:00