Commit Graph

6 Commits

Author SHA1 Message Date
王性驊 3e22a4c00b 電腦版的通知也像那個 Bot 傳來的訊息:標題是 Bot 的名字,內容就是那句話(回答的第一行、「需要你允許:修改 Bot 自己:名稱 → 新名字」、問的問題、例行任務「…」暫停、目標達成/暫停),帶著那個 Bot 的頭像。以前標題是「○○ 完成了」「○○ 需要你允許」,圖示是 AnyBot 的貓。
- Linux(notify-send):通知左邊的圖示就是 Bot 的頭像(Jenny 的 jenny-Host 是這種)。
- Mac(AnyBot.app 的 NSUserNotification):頭像在右邊(contentImage);左邊固定是 App 的圖示,系統不讓換。NSImage 用 AnyClass::get("NSImage") 直接叫,不多加 AppKit 的套件。
- 頭像圖:avatar::rgba 用畫面上同一個 paint 畫——egui 把它切成三角形(邊緣已經柔化),一格一格填成 RGBA(預乘 alpha、over),再轉成一般 alpha 存 PNG;avatar::png_file 照形狀、顏色、大小存在資料夾的 avatars/,只畫一次。14 種形狀都畫過(測試會檢查身體的顏色、四角透明、兩隻眼睛、柔化的邊)。
- notify-send 的參數抽成 notify_send_args(可以測);banner_for 多一個 picture。

已驗證: cargo test 841 過(新:avatars_become_pictures_for_notifications——14 種形狀各畫 96px,身體是那個顏色、四角透明、有眼睛、有柔化的邊,另外存出來看過一張總表;a_bots_banner_wears_its_avatar——notify-send 是 -a AnyBot -i <頭像> 名字 內容,沒圖就沒 -i;Mac 上 NSImage 讀得到那張 PNG、讀不存在的檔回 None);clippy 維持 12。
未驗證: 真的跳出來的通知長怎樣——Mac 要 AnyBot.app 才用得到 NSUserNotification(scratch 跑的不是 .app,會改用 display notification、沒圖),使用者真的 App 不能跑;Linux 要 Jenny 的桌面(等她的 AnyBot 更新)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha2uBHmbnuWBhNzjbJm
2026-11-21 17:08:11 +08:00
王性驊 9c1c6d9c6b fix: 桌面——外殼設定即時生效、Bot 設定不破版(自訂顏色改點選色盤)、對話框不被撐寬
- 底色/對比/強調色/密度:每幀比對已套用的值,改了下一幀就換(以前淺色、深色主題要重開)
- Bot 設定:自訂顏色改成 12 色相 × 4 深淺 + 灰階的色盤加「色碼」欄(不用拖滑桿);
  形狀平均分列;預設色和「自訂」同一列;拿掉多的空隙
- 排版檢查多一條:對話框被內容撐得比標題列寬就失敗;修好它抓到的設定 › 電腦(瀏覽器設定檔改兩行)、
  例行任務(長標題換行、對話框標題截斷)、頁面(數字卡外框算進寬度)
- stats 漲跌規則(pages::stat_trend,認一般的 -,單獨 - 不算);長值一律縮字
- 圖表解析:列尾多的 | 不多出一欄;只有一行的圓餅用那一行的名字
- 問候看設定裡的時區;「你的瀏覽器」說明斷行不超寬;ANYBOT_SHOT_EVERY 不再卡住;簡體註解改繁體

已驗證: cargo test 514 全過、排版檢查 3 字型 × 2 資料 × 3 寬度、clippy 無新警告;
Bot 設定、設定 › 電腦深淺截圖目視
未驗證: 使用者機器上的實際視窗
2026-11-16 21:34:03 +08:00
daniel wang 674d3878d6 頭像:眼睛依形狀調整安全區(星星不再溢出)、新增月牙與南瓜、加幾何測試守住眼睛不出界 2026-11-14 01:32:42 +08:00
daniel wang c58f14e274 介面組件庫(ui_kit: section/card/field/switch/seg/pill/disc/empty/ghost)+全域圓角、muted 輸入底、細卷軸;Bot 頭像可自訂顏色(色相/飽和/明度,存 #hex) 2026-11-13 01:08:52 +08:00
王性驊 6a84abcaeb 外觀: the bot is the lead — its face over the input says what it is doing, its colour runs through the chat, requests dock above the input
- 思源黑體 (Noto Sans TC Regular, OFL, bundled) is the default font; 粉圓體 and the system font stay as choices
- the chat takes the bot's colour by default: the person's bubble, the send button, the chosen tile (a little of it)
- the bot's words sit on the page without a bubble; the person's bubble has its small corner toward them
- above the input: the bot's face, looking at the input when idle, up while it thinks, across at 「正在…」 while a
  step runs, at the person (yellow dot) when it needs them, smiling for 2 s when done, flat-eyed after an error
- 需要你允許 is a yellow card docked above the input instead of a pop-up over the window; Enter allows and Esc
  refuses while the input is empty, after the card has been up 0.6 s; yellow is the one colour for 「需要你」
- header: the name at the left, plain buttons without rings; icons drawn a little heavier (2.25)
- an empty chat: the face large, a line on what the bot is for, three things to start with
- screenshot hook ANYBOT_SHOT_CALM

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3QxSfoydRPM9mjj6d
2026-11-11 21:44:59 +08:00
王性驊 d7ee3f5db9 AnyBot: first commit of the working desktop app
Rust/egui rebuild of Grok Bot as of 2026-11-04: chat with streaming
providers (xAI, OpenAI, Claude, Gemini, OpenRouter, OpenCode Go, Ollama,
custom), tools and approvals, the bot's Docker computer, computer use on
macOS / Linux X11 / Wayland, AnyBot's browser with a full DevTools-based
toolset, the encrypted vault, pinned grid and sidebar sections, Markdown
with Mermaid diagrams, phone access through the relay, and the Linux
build and test scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha3oEtWeHh58zA7ErHa
2026-11-04 16:51:51 +08:00