Author SHA1 Message Date
Liang Jiaqing eaa2e6f14b Route Hub model switches through desktop state notifications 2026-10-19 13:17:25 +08:00
Liang Jiaqing 84ec7d55af Reuse independent conductor and scheduler without owning their lifecycle 2026-10-19 10:54:38 +08:00
Liang Jiaqing 4e8029f20e Limit pending restoration to sessions reloaded from storage 2026-10-19 10:40:35 +08:00
Liang Jiaqing 4f5a928a6e Preserve replay step boundaries for GA and Hub clients 2026-10-19 10:34:29 +08:00
Liang Jiaqing e92ef58488 Restore desktop sessions lazily into GA; use disposable output projection 2026-10-19 10:18:15 +08:00
Liang Jiaqing e6ed9b3f4d Remove obsolete desktop deferred model binding tests 2026-10-19 09:42:48 +08:00
Liang Jiaqing 5b48e7b300 Connect desktop GA instances to Hub with shared submit and cancel paths 2026-10-18 15:44:36 +08:00
Liang Jiaqing 5205f4080f Simplify memory maintenance and remove legacy plan mode 2026-10-18 09:47:34 +08:00
Liang Jiaqing 9b3aff4358 Remove desktop global model default and preserve GA constructor selection 2026-10-18 09:15:16 +08:00
Liang Jiaqing a2eb5414c2 Store desktop session metadata only and replay MR or L4 history 2026-10-17 13:20:04 +08:00
Liang Jiaqing 2ba5529060 fix: synchronize live model reload and preserve config selection 2026-10-16 19:46:04 +08:00
Liang Jiaqing 7fb22a2f85 ci: remove main repository workflows; CI belongs to Desktop 2026-10-16 19:07:41 +08:00
Liang Jiaqing f7cadb6087 fix: infer shell commands when code_run type is empty 2026-10-16 14:04:14 +08:00
Liang Jiaqing 250a7c2790 ci: assemble GA source deployments from standalone desktop components 2026-10-16 13:43:12 +08:00
Liang Jiaqing 62bdce49f0 fix(bridge): remove desktop static file dependency 2026-10-16 11:55:59 +08:00
Liang Jiaqing 5a4b6fa7a4 chore(desktop): keep only private desktop placeholder 2026-10-16 11:38:19 +08:00
Liang Jiaqing a5979eac50 fix: track applied mykeys snapshot per agent 2026-10-16 09:30:02 +08:00
Liang Jiaqing 24f7d6a0dc refactor(conductor): manage model selection in agent memory only 2026-10-15 21:34:28 +08:00
Liang Jiaqing e4e610d6a1 docs: simplify mykey templates with quick-start configs first 2026-10-14 19:10:27 +08:00
Liang Jiaqing f7e4cc5a84 fix: retry malformed DSML endings when no tool was called 2026-10-14 19:10:26 +08:00
cuipengcx90and崔朋 67817ccf4c fix(ga): fold periodic global_memory re-injection like <history> (#832) (#834)
Co-authored-by: 崔朋 <peng.cui@smyze.cn>
2026-10-14 17:43:48 +08:00
Liang Jiaqing 8b7d4e0a82 stapp: drop index= on keyed LLM selectbox; session-state-only avoids streamlit default-value warning spam on every rerun 2026-10-13 11:19:50 +08:00
Liang Jiaqing e29587dfb8 stapp: keep sidebar LLM widget state in sync with external (hub/phone) channel switch; stale session_state silently rolled it back 2026-10-13 10:17:01 +08:00
Liang Jiaqing 6e0c54f6ec docs: refresh WeChat group 23 QR code 2026-10-11 13:55:25 +08:00
Liang Jiaqing f308ee7eb0 memory distill prompt rework; bump claude-cli UA 2.1.280; subagent hub note; memory_cleanup L3 audit principles 2026-09-30 17:52:52 +08:00
Liang Jiaqing 418c28a7bb stapp: fold long answers - last 50 steps individual, older grouped per 30 with lazy-load toggle + TOC 2026-09-30 17:52:52 +08:00
Liang Jiaqing a275570fc6 stapp: unbound starlette ws send queue (500-msg cap caused fake disconnect -> stuck RUNNING) 2026-09-30 17:52:52 +08:00
weijia 2538ad9c39 docs: refresh WeChat group 23 QR code (#817)
Replace the expired README community QR image while keeping the existing filename and 微信群 23 label.
2026-09-29 12:34:56 +08:00
Liang Jiaqing c91387136a reflect: support module-level LLM to select backend by name before each trigger 2026-09-29 09:28:08 +08:00
Liang Jiaqing 9dcbf5adf0 hub: persist token to temp/.hub_token; add intervene/keyinfo inject op + hub.call/peers helper 2026-09-29 09:28:08 +08:00
nianyucatfish e86ca723a9 fix(tui): polish rendering, history preview, and copy behavior (#816)
* fix(tui): repaint composer after macOS input

* feat(tui): add compact conversation history

* fix(tui): repaint messages after streaming and scroll

* fix(tui): polish history focus and scrollbar styling
2026-09-22 23:42:24 +08:00
Liang Jiaqing 9d1add7780 docs: update WeChat community QR code to group 23 2026-09-19 09:57:28 +08:00
Liang Jiaqing 1b6442fe4f prompt: constitution#3 dedupe (3-failure rule already in RULES); remember tool requires task success/checkpoint 2026-09-14 11:42:59 +08:00
Liang Jiaqing f07bfc57a2 abort(): register live socket at urllib3 request() so Force Stop wakes recv() even while waiting for response headers (was only after headers via active_response) 2026-09-14 11:39:06 +08:00
Liang Jiaqing 96be94586f docs: update verified default vision backend 2026-09-14 10:21:54 +08:00
Liang Jiaqing 86171aec3c hub_p2p: exponential backoff (1->60s) with jitter on reconnect failure; avoid thundering herd after relay restart 2026-09-11 10:18:38 +08:00
Liang Jiaqing 24aeead78c p2p_ws_client: fast-fail reconnect (ws ping 15/10s; Signal.expect aborts on closed/error instead of waiting full timeout) 2026-09-11 10:18:38 +08:00
Liang Jiaqing 0fd024bf8c llmcore: TTFT = first SSE event (count hidden thinking); default context_win 38000 / cut interval 8 2026-09-11 10:18:38 +08:00
Liang Jiaqing 4913a6162b hub: switch LLM channel (op llm / GET llms, POST llm) via agent.list_llms/next_llm only 2026-09-11 10:18:38 +08:00
nianyucatfish f6e5657fbe docs(ganet): cover macOS in the PC device-link setup SOP (#791)
GAnet 0.5.0 ships macOS sidecars, so the SOP no longer stops on non-Windows
desktops. The flow itself is unchanged; the edits are the platform facts GA
needs to follow it on a Mac:

- default component location moves to ~/.genericagent/components/GAnet on
  every platform; a checkout under the GA root's temp/ is wiped by the temp
  rewind mechanism
- launcher is ganet.cmd on Windows and ganet.sh on macOS; the bound Python
  shim is ga_python.cmd / ga_python.sh
- sidecar data lives in %LOCALAPPDATA%\GenericAgent\GAnet or
  ~/Library/Application Support/GenericAgent/GAnet; login autostart is the
  HKCU Run entry or a LaunchAgent; both are removed by remove_environment()
- release entries for macOS use platform "darwin", and verify_release checks
  Mach-O as well as PE
- on macOS, setup and upgrades request the screen-recording permission at the
  end and report it in screen_access; it is advisory and never blocks
- macOS needs no sudo; git/python placeholders without Xcode CLT must not be
  invoked
2026-09-03 14:37:00 +08:00
Liang Jiaqing 71cf559fab fix: str() session_id/tab_id; bump UA to 2.1.251; trim subagent.md 2026-09-02 08:20:29 +08:00
Liang Jiaqing 7fa5fa4ec0 fix: prevent WeChat polling from consuming chat input 2026-09-02 08:20:28 +08:00
YI QI LIMandabraxas914 efb3bc6ad1 feat(desktop): compiled React Desktop 2.0 v0.2.1 renderer update (#787)
* fix(desktop): expose explicit backup capabilities

* fix(desktop): align titlebar controls with native metrics

* release(desktop): prepare portable v0.2.1

* build(desktop): rebuild compiled dist from source 4a67226

Rebuild the compiled-only React Desktop 2.0 renderer from abraxas914/GenericAgent
main @4a67226, carrying the v0.2.1 iterations that PR #784 was closed to await:
live turn-timer persistence across session switch, Mixin image-to-path fallback,
folder drag-drop, per-turn duration, and image-thumbnail repair.

- dist/**: regenerated 98 manifest assets + entry HTML
- build-provenance.json: sourceCommit -> 4a67226, manifest sha256 recomputed
- verify-compiled-dist.mjs: expectedSourceCommit -> 4a67226
- dist/README.md: provenance source commit updated
- desktop_bridge.py, test_bridge_origin_security.py: synced to 4a67226
- core (agentmain.py, llmcore*, src/**, public/**) remains zero-diff vs upstream

---------

Co-authored-by: abraxas914 <abraxas345589144233@outlook.com>
2026-08-30 14:21:51 +08:00
nianyucatfish 7ad2162f30 docs(ganet): add PC device-link setup SOP (#786)
Adds the standalone Windows GAnet device-link setup and removal SOP.

Known review risks accepted by maintainer.
2026-08-28 22:18:18 +08:00
Liang Jiaqing 17d9f4d873 fix(wechatapp): avoid evaluating Win creationflags on Linux
_start_conductor built DETACHED_PROCESS/CREATE_NEW_PROCESS_GROUP before the
os.name=='nt' branch, causing AttributeError and crashing Conductor autostart
on Ubuntu. Keep those flags Windows-only; Linux uses start_new_session.
2026-08-27 21:44:07 +08:00
LJQ 8ea9533651 Merge pull request #779 from abraxas914/codex/react-desktop-v2-update-0827
feat(desktop): refresh compiled React Desktop 2.0 distribution
2026-08-25 18:29:05 +08:00
yiqi-017 bb4b2ca974 feat(desktop): refresh compiled React Desktop 2.0 distribution
Rebuild the compiled renderer from abraxas914/GenericAgent source
commit 9fe5d69b85cfad8778ace84b6f69bc75f9e0d392, refreshing:

- New-chat default model tag: the selected-model badge in Settings
  and the composer now read '新会话默认' / 'New chat default'.
- Model selectors display the configured profile name (备注名) so the
  same model served by different providers is distinguishable.
- desktop_bridge: syncing mixin llm_nos references when a profile is
  renamed, preventing orphan references in the mixin config.
- Release publisher sets GH_REPO so 'gh release create' resolves the
  target repository without checking out source, satisfying the
  publisher security contract while fixing the prerelease step.

Provenance and verifier updated to the new source commit and the
LF-normalized content manifest (98 generated assets).
2026-08-25 18:00:43 +08:00
Liang Jiaqing 3d62523d40 fix(abort): force-wake blocked stream recv via socket _real_close; interruptible retry backoff 2026-08-25 15:55:34 +08:00
Liang Jiaqing 13eef203f7 fix(stats): compute decode TPS at stream end 2026-08-25 11:36:25 +08:00
Liang Jiaqing 3327a6c88b fix stream recovery and runtime metrics 2026-08-25 10:16:19 +08:00
Liang Jiaqing 0c235a8068 perf: make history trimming linear 2026-08-24 13:09:31 +08:00
206 changed files with 2578 additions and 28769 deletions

No files matched your search

-168
View File
@@ -1,168 +0,0 @@
name: Desktop 2.0 Quality Gates
on:
push:
branches: [main]
paths:
- "agentmain.py"
- "llmcore.py"
- "llmcore/**"
- "frontends/conductor.py"
- "frontends/cost_tracker.py"
- "frontends/data_backup.py"
- "frontends/desktop_bridge.py"
- "frontends/desktop_settings.py"
- "frontends/ga_contract_probe.py"
- "frontends/tests/**"
- "frontends/desktop/**"
- ".gitattributes"
- ".github/workflows/desktop-ci.yml"
- ".github/workflows/desktop-release-package.yml"
pull_request:
branches: [main]
paths:
- "agentmain.py"
- "llmcore.py"
- "llmcore/**"
- "frontends/conductor.py"
- "frontends/cost_tracker.py"
- "frontends/data_backup.py"
- "frontends/desktop_bridge.py"
- "frontends/desktop_settings.py"
- "frontends/ga_contract_probe.py"
- "frontends/tests/**"
- "frontends/desktop/**"
- ".gitattributes"
- ".github/workflows/desktop-ci.yml"
- ".github/workflows/desktop-release-package.yml"
workflow_dispatch:
concurrency:
group: desktop-v2-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
PYTHONUNBUFFERED: "1"
CARGO_TERM_COLOR: always
jobs:
distribution-contract:
name: Compiled distribution contract
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 22
- name: Verify tracked React distribution and package metadata
working-directory: frontends/desktop
run: npm run test:dist
- name: Verify packaging helper syntax
run: |
bash -n frontends/desktop/packaging/scripts/macos/install_macos.sh
bash -n frontends/desktop/scripts/post-dmg.sh
python3 -m py_compile frontends/desktop/scripts/gen_ds_store.py
- name: Reject source and local-development leakage
run: |
test -z "$(git ls-files -- \
'frontends/desktop/src/**' \
'frontends/desktop/public/**' \
'frontends/desktop/vite.config.*' \
'frontends/desktop/tsconfig*.json' \
'.agents/**' '.codex/**' '.trellis/**')"
test -z "$(find frontends/desktop/dist -type f \
\( -name '*.map' -o -name '*.ts' -o -name '*.tsx' -o -name '*.jsx' \) -print)"
! git grep -nE '^(<<<<<<<|=======|>>>>>>>)' -- .github frontends
python-contracts:
name: Python ${{ matrix.python-version }}
needs: distribution-contract
runs-on: ubuntu-24.04
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: frontends/tests/requirements.txt
- name: Install Desktop test dependencies
run: python -m pip install -r frontends/tests/requirements.txt
- name: Run bridge, conductor, cost and backup contracts
run: >-
python -m pytest frontends/tests -q
--ignore=frontends/tests/test_release_qualification.py
- name: Run release qualification tooling contracts
if: matrix.python-version == '3.12'
run: python -m pytest frontends/tests/test_release_qualification.py -q
rust-contracts:
name: Rust ${{ matrix.feature.name }}
needs: distribution-contract
runs-on: ubuntu-24.04
timeout-minutes: 35
strategy:
fail-fast: false
matrix:
feature:
- name: production
args: ""
- name: e2e
args: "--features e2e"
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Install Tauri system dependencies
run: >-
sudo apt-get update && sudo apt-get install -y
libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable action snapshot
with:
toolchain: "1.95.0"
components: clippy, rustfmt
- uses: Swatinem/rust-cache@63fed3e2fecf6f7b51dc6f043341b79ef82a9ae7 # v2.9.2
with:
workspaces: frontends/desktop/src-tauri -> target
- name: Verify Rust formatting
run: cargo fmt --manifest-path frontends/desktop/src-tauri/Cargo.toml --check
- name: Lint Tauri shell
run: cargo clippy --manifest-path frontends/desktop/src-tauri/Cargo.toml --all-targets ${{ matrix.feature.args }} -- -D warnings
- name: Run Tauri shell contracts
run: cargo test --manifest-path frontends/desktop/src-tauri/Cargo.toml ${{ matrix.feature.args }}
linux-tauri-build:
name: Linux Tauri build smoke
needs: [distribution-contract, python-contracts, rust-contracts]
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Install Tauri system dependencies
run: >-
sudo apt-get update && sudo apt-get install -y
libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 22
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable action snapshot
with:
toolchain: "1.95.0"
- uses: Swatinem/rust-cache@63fed3e2fecf6f7b51dc6f043341b79ef82a9ae7 # v2.9.2
with:
workspaces: frontends/desktop/src-tauri -> target
- name: Install Tauri CLI only
working-directory: frontends/desktop
run: |
npm install --package-lock=false
node -e "const v=require('./node_modules/@tauri-apps/cli/package.json').version; if(v!=='2.11.4') throw new Error('unexpected Tauri CLI '+v)"
test ! -e package-lock.json
- name: Build tracked Desktop 2.0 distribution into the native shell
working-directory: frontends/desktop
run: npm run tauri build -- --no-bundle
@@ -1,880 +0,0 @@
name: Build Desktop Portable Packages
# Triggers:
# - workflow_dispatch -> build CI artifacts for testing (choose a target platform)
# - push tag desktop-portable-* -> build all three platforms and publish them
# together into ONE GitHub Release (tag = the pushed tag)
# Plain pushes to branches do NOT build (avoids 3 heavy Rust builds per commit).
"on":
push:
tags:
- "desktop-portable-*"
workflow_dispatch:
inputs:
target:
description: "Which platform(s) to build (artifacts only; release happens on tag push)"
required: false
default: "all"
type: choice
options:
- "all"
- "windows"
- "linux"
- "macos"
permissions:
contents: read
env:
NODE_VERSION: "22.23.2"
RUST_TOOLCHAIN: "1.95.0"
PBS_RELEASE: "20260814"
PBS_PYTHON_VERSION: "3.12.14"
MACOS_PACKAGING_PYTHON_VERSION: "3.12.10"
PYTHONDONTWRITEBYTECODE: "1"
jobs:
# ----------------------------------------------------------------------------
build-windows:
name: Windows portable
if: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/desktop-portable-')) || (github.event_name == 'workflow_dispatch' && (github.event.inputs.target == 'all' || github.event.inputs.target == 'windows')) }}
runs-on: windows-2025
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set up Rust
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable action snapshot
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Cache Rust build
uses: Swatinem/rust-cache@63fed3e2fecf6f7b51dc6f043341b79ef82a9ae7 # v2.9.2
with:
workspaces: frontends/desktop/src-tauri -> target
- name: Install desktop dependencies
working-directory: frontends/desktop
run: |
npm install --package-lock=false
node -e "const v=require('./node_modules/@tauri-apps/cli/package.json').version; if(v!=='2.11.4') throw new Error('unexpected Tauri CLI '+v)"
test ! -e package-lock.json
- name: Verify tracked compiled renderer bytes
working-directory: frontends/desktop
run: npm run test:dist
- name: Build Windows desktop exe
working-directory: frontends/desktop
run: npm run tauri build -- --bundles nsis
- name: Assemble self-contained portable bundle
shell: bash
run: |
set -euo pipefail
purge_runtime_bytecode() {
local runtime_root="$1"
find "$runtime_root" -type d -name '__pycache__' -prune -exec rm -rf {} +
find "$runtime_root" -type f \( -name '*.pyc' -o -name '*.pyo' \) -delete
if find "$runtime_root" -type d -name '__pycache__' -print -quit | grep -q .; then
echo "Python bytecode cache directory remains in packaged runtime: $runtime_root" >&2
return 1
fi
if find "$runtime_root" -type f \( -name '*.pyc' -o -name '*.pyo' \) -print -quit | grep -q .; then
echo "Python bytecode remains in packaged runtime: $runtime_root" >&2
return 1
fi
}
EXE_SRC="$(find frontends/desktop/src-tauri/target/release -maxdepth 1 -type f -name 'ga-desktop.exe' | head -n 1)"
[[ -n "$EXE_SRC" ]] || { echo "ga-desktop.exe not found" >&2; exit 1; }
PKG="artifacts/windows/GenericAgent-Desktop-Windows-Portable"
RUNTIME="$PKG/runtime"
mkdir -p "$RUNTIME"
# exe at the top level, named GenericAgent (typical portable form)
cp "$EXE_SRC" "$PKG/GenericAgent.exe"
cp frontends/desktop/packaging/scripts/windows/install_windows.ps1 "$RUNTIME/install_windows.ps1"
cp frontends/desktop/packaging/scripts/merge_desktop_settings.py "$RUNTIME/merge_desktop_settings.py"
# Uninstaller: double-click entry at top level, worker script under runtime/.
cp frontends/desktop/packaging/scripts/windows/uninstall.bat "$PKG/uninstall.bat"
cp frontends/desktop/packaging/scripts/windows/uninstall_windows.ps1 "$RUNTIME/uninstall_windows.ps1"
# Fixed python-build-standalone Windows x86_64 archive.
PBS_URL="https://github.com/astral-sh/python-build-standalone/releases/download/${PBS_RELEASE}/cpython-${PBS_PYTHON_VERSION}%2B${PBS_RELEASE}-x86_64-pc-windows-msvc-install_only.tar.gz"
PBS_SHA256="7330282b47cd43a66b702d39078d2e5a88e580cee351d82f95045f21f5ee042a"
command -v cygpath >/dev/null 2>&1 || { echo "cygpath not found on Windows runner" >&2; exit 1; }
RUNNER_TEMP_POSIX="$(cygpath -u "$RUNNER_TEMP")"
[[ "$RUNNER_TEMP_POSIX" == /* ]] || { echo "cygpath did not return an absolute POSIX path" >&2; exit 1; }
PBS_ARCHIVE="${RUNNER_TEMP_POSIX}/pbs-windows-x86_64.tar.gz"
echo "Python build-standalone: $PBS_URL"
curl --proto '=https' --tlsv1.2 --fail --location --retry 3 --output "$PBS_ARCHIVE" "$PBS_URL"
printf '%s %s\n' "$PBS_SHA256" "$PBS_ARCHIVE" | sha256sum --check --strict -
tar -xzf "$PBS_ARCHIVE" -C "$RUNTIME" # extracts a 'python/' dir (python.exe at top)
PY="$RUNTIME/python/python.exe"
PYTHONDONTWRITEBYTECODE=1 "$PY" -c 'import platform, sys; assert sys.version_info[:3] == (3, 12, 14); assert platform.machine().lower() in ("amd64", "x86_64"); print(sys.version)'
# App-local UCRT: python-build-standalone links the Universal CRT dynamically
# and does NOT bundle it. Win10/11 ship UCRT in-box, but stripped/older images
# may not -> python.exe fails to load (missing api-ms-win-crt-*.dll). Copy the
# redistributable UCRT DLLs next to python.exe (Microsoft-supported app-local
# deployment). Pure SDK source, no System32 fallback, hard-fail if absent so we
# never ship a bundle from an unexpected source.
UCRT_SRC="$(ls -d "/c/Program Files (x86)/Windows Kits/10/Redist/"*/ucrt/DLLs/x64 2>/dev/null | sort -V | tail -1)"
[[ -n "$UCRT_SRC" ]] || { echo "Windows SDK UCRT redist dir not found on runner" >&2; exit 1; }
echo "UCRT source: $UCRT_SRC"
cp "$UCRT_SRC"/api-ms-win-crt-*.dll "$RUNTIME/python/"
cp "$UCRT_SRC"/ucrtbase.dll "$RUNTIME/python/"
test -f "$RUNTIME/python/api-ms-win-crt-runtime-l1-1-0.dll" \
|| { echo "UCRT DLLs missing after copy" >&2; exit 1; }
# Offline binary-only wheels. requirements.txt pins direct and transitive versions.
mkdir -p "$RUNTIME/wheels"
cp frontends/desktop/packaging/python-runtime-requirements.txt "$RUNTIME/wheels/requirements.txt"
PYTHONDONTWRITEBYTECODE=1 "$PY" -m pip download --only-binary=:all: --dest "$RUNTIME/wheels" \
--requirement "$RUNTIME/wheels/requirements.txt"
# Runtime source (project root minus heavy/dev/build dirs)
mkdir -p "$RUNTIME/app"
tar \
--exclude='./.git' --exclude='./.github' \
--exclude='./frontends/tests' \
--exclude='./frontends/desktop/src-tauri' \
--exclude='./frontends/desktop/src' \
--exclude='./frontends/desktop/public' \
--exclude='./frontends/desktop/scripts' \
--exclude='./frontends/desktop/release_qualification' \
--exclude='./frontends/desktop/tests' \
--exclude='./frontends/desktop/testing' \
--exclude='./frontends/desktop/spec' \
--exclude='./frontends/desktop/node_modules' \
--exclude='./frontends/desktop/dist' \
--exclude='./frontends/desktop/DESIGN.md' \
--exclude='./frontends/desktop/package.json' \
--exclude='./frontends/desktop/package-lock.json' \
--exclude='./frontends/desktop/.npmrc' \
--exclude='./frontends/desktop/index.html' \
--exclude='./frontends/desktop/loading.html' \
--exclude='./frontends/desktop/setup.html' \
--exclude='./frontends/desktop/tsconfig*.json' \
--exclude='./frontends/desktop/vite.config.ts' \
--exclude='./frontends/desktop/packaging' --exclude='./docs' \
--exclude='./assets/demo' --exclude='./assets/images' \
--exclude='./assets/GenericAgent_Technical_Report.pdf' \
--exclude='./artifacts' \
--exclude='*/node_modules' --exclude='*/target' \
--exclude='*/.venv' --exclude='./.venv' \
--exclude='*/__pycache__' --exclude='*.pyc' \
-cf - . | tar -xf - -C "$RUNTIME/app"
test -f "$RUNTIME/app/agentmain.py"
test -f "$RUNTIME/app/frontends/desktop_bridge.py"
test -f "$RUNTIME/app/frontends/desktop/static/index.html"
test ! -e "$RUNTIME/app/frontends/desktop/dist"
test ! -e "$RUNTIME/app/frontends/desktop/src"
test ! -e "$RUNTIME/app/frontends/desktop/public"
test ! -e "$RUNTIME/app/frontends/desktop/package-lock.json"
test ! -e "$RUNTIME/app/frontends/desktop/node_modules"
# Drop python debug symbols (.pdb) to slim the package (~80MB)
find "$RUNTIME/python" -name '*.pdb' -delete 2>/dev/null || true
purge_runtime_bytecode "$RUNTIME"
cat > "$PKG/readme.txt" <<'EOF'
================ 中文 ================
GenericAgent Desktop — Windows 便携版(自包含)
无需安装 Python、无需联网装依赖、无需源码仓库——全部已内置。
前置条件
- Windows 10/11 x64
- Microsoft Edge WebView2 运行时(Win11 一般自带;缺失时首次运行会提示安装)
使用
1. 解压到任意目录(路径建议不含特殊字符)。
2. 双击 GenericAgent.exe。
3. 首次启动会离线校验并补齐随包 Python 运行时依赖,界面显示进度,完成后进入主界面。
4. 之后启动直接秒进。
说明
- 想真正对话,仍需在程序里配置模型 / API Key。
- 如果 Windows Defender 防火墙拦截 `127.0.0.1` / `localhost` 回环连接,程序可能无法启动或连接本机服务。请允许 `GenericAgent.exe` 和 `runtime\python\python.exe` 通过防火墙,然后重启桌面端。
- 本便携版尚未使用 Windows 代码签名证书;SmartScreen 可能显示警告。运行前请用随包发布的 SHA256SUMS-windows.txt 核对 ZIP。
- 可整体移动本文件夹;重启后会自动刷新路径。若需强制重新准备,请删除 runtime\.prepared 后重启。
- runtime\ 是内置运行环境与源码,正常使用无需改动。
================ English ================
GenericAgent Desktop — Windows Portable (self-contained)
No Python install, no internet for dependencies, no source checkout — everything is bundled.
Requirements
- Windows 10/11 x64
- Microsoft Edge WebView2 runtime (usually preinstalled on Win11; you are prompted if missing)
Usage
1. Extract anywhere (a path without special characters is recommended).
2. Double-click GenericAgent.exe.
3. The first launch verifies and completes the bundled Python runtime offline with a
progress UI, then opens the main window.
4. Subsequent launches start instantly.
Notes
- To actually chat, configure a model / API key inside the app.
- If Windows Defender Firewall blocks the `127.0.0.1` / `localhost` loopback connection, the app may fail to start or reach its local service. Allow `GenericAgent.exe` and `runtime\python\python.exe` through the firewall, then restart the desktop app.
- This portable build is not Windows code-signed, so SmartScreen may warn. Verify the ZIP against the published SHA256SUMS-windows.txt before running it.
- You may move the whole folder; relaunching refreshes its saved paths. To force a new
preparation pass, delete runtime\.prepared and relaunch.
- runtime\ holds the bundled runtime and source; no need to touch it.
EOF
sed -i 's/^ //' "$PKG/readme.txt"
echo "Package tree (top levels):"
find "$PKG" -maxdepth 2 -printf '%y %p\n' | sort | head -40
- name: Zip portable package
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path artifacts/windows/out | Out-Null
Compress-Archive -Path artifacts/windows/GenericAgent-Desktop-Windows-Portable `
-DestinationPath artifacts/windows/out/GenericAgent-Desktop-Windows-Portable.zip -Force
$h = Get-FileHash artifacts/windows/out/GenericAgent-Desktop-Windows-Portable.zip -Algorithm SHA256
"{0} GenericAgent-Desktop-Windows-Portable.zip" -f $h.Hash.ToLowerInvariant() |
Set-Content -Encoding ASCII artifacts/windows/out/SHA256SUMS-windows.txt
Get-ChildItem artifacts/windows/out | Format-Table Name, Length
- name: Upload workflow artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: GenericAgent-Desktop-Windows-Portable-${{ github.run_number }}
path: |
artifacts/windows/out/GenericAgent-Desktop-Windows-Portable.zip
artifacts/windows/out/SHA256SUMS-windows.txt
if-no-files-found: error
# ----------------------------------------------------------------------------
build-linux:
name: Linux portable
if: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/desktop-portable-')) || (github.event_name == 'workflow_dispatch' && (github.event.inputs.target == 'all' || github.event.inputs.target == 'linux')) }}
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set up Rust
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable action snapshot
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Cache Rust build
uses: Swatinem/rust-cache@63fed3e2fecf6f7b51dc6f043341b79ef82a9ae7 # v2.9.2
with:
# Keep registry/git downloads, but never restore binaries built on a newer glibc image.
prefix-key: "v1-rust-release-ubuntu-22.04-glibc-2.35"
workspaces: frontends/desktop/src-tauri -> target
cache-targets: "false"
cache-bin: "false"
- name: Install Tauri Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf \
binutils \
file \
xvfb
- name: Install desktop dependencies
working-directory: frontends/desktop
run: |
npm install --package-lock=false
node -e "const v=require('./node_modules/@tauri-apps/cli/package.json').version; if(v!=='2.11.4') throw new Error('unexpected Tauri CLI '+v)"
test ! -e package-lock.json
- name: Verify tracked compiled renderer bytes
working-directory: frontends/desktop
run: npm run test:dist
- name: Build Linux AppImage
working-directory: frontends/desktop
run: npm run tauri build -- --bundles appimage
- name: Assemble self-contained portable bundle
shell: bash
run: |
set -euo pipefail
purge_runtime_bytecode() {
local runtime_root="$1"
find "$runtime_root" -type d -name '__pycache__' -prune -exec rm -rf {} +
find "$runtime_root" -type f \( -name '*.pyc' -o -name '*.pyo' \) -delete
if find "$runtime_root" -type d -name '__pycache__' -print -quit | grep -q .; then
echo "Python bytecode cache directory remains in packaged runtime: $runtime_root" >&2
return 1
fi
if find "$runtime_root" -type f \( -name '*.pyc' -o -name '*.pyo' \) -print -quit | grep -q .; then
echo "Python bytecode remains in packaged runtime: $runtime_root" >&2
return 1
fi
}
APPIMAGE_SRC="$(find frontends/desktop/src-tauri/target/release/bundle/appimage -maxdepth 1 -type f -name '*.AppImage' | head -n 1)"
[[ -n "$APPIMAGE_SRC" ]] || { echo "No AppImage found" >&2; exit 1; }
PKG="artifacts/linux/GenericAgent-Desktop-Linux-Portable"
RUNTIME="$PKG/runtime"
mkdir -p "$RUNTIME"
# Stable internal name so the generated .desktop Exec= never changes on upgrades.
cp "$APPIMAGE_SRC" "$PKG/GenericAgent.AppImage"
chmod +x "$PKG/GenericAgent.AppImage"
# Icon for the generated .desktop launcher (Icon= needs a real image file on Linux).
cp frontends/desktop/src-tauri/icons/icon.png "$PKG/GenericAgent.png"
cp frontends/desktop/packaging/scripts/linux/install_linux.sh "$RUNTIME/install_linux.sh"
cp frontends/desktop/packaging/scripts/merge_desktop_settings.py "$RUNTIME/merge_desktop_settings.py"
chmod +x "$RUNTIME/install_linux.sh"
# Uninstaller: top-level entry next to the AppImage.
cp frontends/desktop/packaging/scripts/linux/uninstall.sh "$PKG/uninstall.sh"
chmod +x "$PKG/uninstall.sh"
# Fixed python-build-standalone Linux x86_64 archive.
PBS_URL="https://github.com/astral-sh/python-build-standalone/releases/download/${PBS_RELEASE}/cpython-${PBS_PYTHON_VERSION}%2B${PBS_RELEASE}-x86_64-unknown-linux-gnu-install_only.tar.gz"
PBS_SHA256="3297691ae34f75fed81ac424e040145fccb0bafe8e581cd5cadbddfa1c0766c0"
PBS_ARCHIVE="${RUNNER_TEMP}/pbs-linux-x86_64.tar.gz"
echo "Python build-standalone: $PBS_URL"
curl --proto '=https' --tlsv1.2 --fail --location --retry 3 --output "$PBS_ARCHIVE" "$PBS_URL"
printf '%s %s\n' "$PBS_SHA256" "$PBS_ARCHIVE" | sha256sum --check --strict -
tar -xzf "$PBS_ARCHIVE" -C "$RUNTIME" # extracts a 'python/' dir
PY="$RUNTIME/python/bin/python3"
PYTHONDONTWRITEBYTECODE=1 "$PY" -c 'import platform, sys; assert sys.version_info[:3] == (3, 12, 14); assert platform.machine() == "x86_64"; print(sys.version)'
# Offline binary-only wheels. requirements.txt pins direct and transitive versions.
mkdir -p "$RUNTIME/wheels"
cp frontends/desktop/packaging/python-runtime-requirements.txt "$RUNTIME/wheels/requirements.txt"
PYTHONDONTWRITEBYTECODE=1 "$PY" -m pip download --only-binary=:all: --dest "$RUNTIME/wheels" \
--requirement "$RUNTIME/wheels/requirements.txt"
# Runtime source (project root minus heavy/dev/build dirs)
mkdir -p "$RUNTIME/app"
tar \
--exclude='./.git' --exclude='./.github' \
--exclude='./frontends/tests' \
--exclude='./frontends/desktop/src-tauri' \
--exclude='./frontends/desktop/src' \
--exclude='./frontends/desktop/public' \
--exclude='./frontends/desktop/scripts' \
--exclude='./frontends/desktop/release_qualification' \
--exclude='./frontends/desktop/tests' \
--exclude='./frontends/desktop/testing' \
--exclude='./frontends/desktop/spec' \
--exclude='./frontends/desktop/node_modules' \
--exclude='./frontends/desktop/dist' \
--exclude='./frontends/desktop/DESIGN.md' \
--exclude='./frontends/desktop/package.json' \
--exclude='./frontends/desktop/package-lock.json' \
--exclude='./frontends/desktop/.npmrc' \
--exclude='./frontends/desktop/index.html' \
--exclude='./frontends/desktop/loading.html' \
--exclude='./frontends/desktop/setup.html' \
--exclude='./frontends/desktop/tsconfig*.json' \
--exclude='./frontends/desktop/vite.config.ts' \
--exclude='./frontends/desktop/packaging' --exclude='./docs' \
--exclude='./assets/demo' --exclude='./assets/images' \
--exclude='./assets/GenericAgent_Technical_Report.pdf' \
--exclude='./artifacts' \
--exclude='*/node_modules' --exclude='*/target' \
--exclude='*/.venv' --exclude='./.venv' \
--exclude='*/__pycache__' --exclude='*.pyc' \
-cf - . | tar -xf - -C "$RUNTIME/app"
test -f "$RUNTIME/app/agentmain.py"
test -f "$RUNTIME/app/frontends/desktop_bridge.py"
test -f "$RUNTIME/app/frontends/desktop/static/index.html"
test ! -e "$RUNTIME/app/frontends/desktop/dist"
test ! -e "$RUNTIME/app/frontends/desktop/src"
test ! -e "$RUNTIME/app/frontends/desktop/public"
test ! -e "$RUNTIME/app/frontends/desktop/package-lock.json"
test ! -e "$RUNTIME/app/frontends/desktop/node_modules"
purge_runtime_bytecode "$RUNTIME"
cat > "$PKG/readme.txt" <<'EOF'
================ 中文 ================
GenericAgent Desktop — Linux 便携版(自包含)
无需安装 Python、无需联网装依赖、无需源码仓库——全部已内置。
前置条件
- Linux x86_64,glibc 2.35 或更高版本(如 Ubuntu 22.04、Debian 12)
- 桌面环境 + FUSE(运行 AppImage 所需;多数发行版自带)
使用
1. 解压到任意目录(路径建议不含特殊字符)。
2. 给 AppImage 执行权限并运行:
chmod +x GenericAgent.AppImage
./GenericAgent.AppImage
3. 首次启动会离线校验并补齐随包 Python 运行时依赖,界面显示进度,完成后进入主界面。
4. 之后启动直接秒进。
说明
- 想真正对话,仍需在程序里配置模型 / API Key。
- 可整体移动本文件夹;重启后会自动刷新路径。若需强制重新准备,请删除 runtime/.prepared 后重启。
- runtime/ 是内置运行环境与源码,正常使用无需改动。
================ English ================
GenericAgent Desktop — Linux Portable (self-contained)
No Python install, no internet for dependencies, no source checkout — everything is bundled.
Requirements
- Linux x86_64 with glibc 2.35 or newer (for example Ubuntu 22.04 or Debian 12)
- A desktop environment + FUSE (required to run the AppImage; preinstalled on most distros)
Usage
1. Extract anywhere (a path without special characters is recommended).
2. Make the AppImage executable and run it:
chmod +x GenericAgent.AppImage
./GenericAgent.AppImage
3. The first launch verifies and completes the bundled Python runtime offline with a
progress UI, then opens the main window.
4. Subsequent launches start instantly.
Notes
- To actually chat, configure a model / API key inside the app.
- You may move the whole folder; relaunching refreshes its saved paths. To force a new
preparation pass, delete runtime/.prepared and relaunch.
- runtime/ holds the bundled runtime and source; no need to touch it.
EOF
sed -i 's/^ //' "$PKG/readme.txt"
mkdir -p artifacts/linux/out
tar -C artifacts/linux -czf artifacts/linux/out/GenericAgent-Desktop-Linux-Portable.tar.gz GenericAgent-Desktop-Linux-Portable
( cd artifacts/linux/out && sha256sum GenericAgent-Desktop-Linux-Portable.tar.gz > SHA256SUMS-linux.txt )
tar -tzf artifacts/linux/out/GenericAgent-Desktop-Linux-Portable.tar.gz > /tmp/pkglist.txt
echo "Package contents (first 40 of $(wc -l < /tmp/pkglist.txt) entries):"
head -40 /tmp/pkglist.txt
ls -lh artifacts/linux/out
# Exercise the exact archived candidate on the oldest supported builder.
SMOKE_ROOT="${RUNNER_TEMP}/ga-linux-package-smoke"
mkdir -p "$SMOKE_ROOT"
tar -xzf artifacts/linux/out/GenericAgent-Desktop-Linux-Portable.tar.gz -C "$SMOKE_ROOT"
SMOKE_PACKAGE="$SMOKE_ROOT/GenericAgent-Desktop-Linux-Portable"
APPIMAGE_ABS="$(realpath "$SMOKE_PACKAGE/GenericAgent.AppImage")"
APPIMAGE_SCAN="$SMOKE_ROOT/appimage-scan"
mkdir -p "$APPIMAGE_SCAN"
(cd "$APPIMAGE_SCAN" && "$APPIMAGE_ABS" --appimage-extract >/dev/null)
MAX_GLIBC=""
ELF_COUNT=0
while IFS= read -r -d '' candidate; do
file -b "$candidate" | grep -q '^ELF' || continue
ELF_COUNT=$((ELF_COUNT + 1))
candidate_max="$(readelf --version-info "$candidate" 2>/dev/null \
| sed -n 's/.*Name: GLIBC_\([0-9][0-9.]*\).*/\1/p' \
| sort -V | tail -n 1)"
[[ -n "$candidate_max" ]] || continue
if [[ -z "$MAX_GLIBC" \
|| "$(printf '%s\n%s\n' "$MAX_GLIBC" "$candidate_max" | sort -V | tail -n 1)" == "$candidate_max" ]]; then
MAX_GLIBC="$candidate_max"
fi
done < <(find "$SMOKE_PACKAGE" "$APPIMAGE_SCAN/squashfs-root" -type f -print0)
[[ "$ELF_COUNT" -gt 0 && -n "$MAX_GLIBC" ]] \
|| { echo "No GLIBC symbol versions found in final Linux package ELFs" >&2; exit 1; }
[[ "$(printf '%s\n%s\n' "$MAX_GLIBC" '2.35' | sort -V | tail -n 1)" == "2.35" ]] \
|| { echo "Final package requires GLIBC_$MAX_GLIBC; maximum allowed is GLIBC_2.35" >&2; exit 1; }
echo "Scanned $ELF_COUNT final package ELFs; maximum symbol is GLIBC_$MAX_GLIBC"
APPIMAGE_EXTRACT_AND_RUN=1 WEBKIT_DISABLE_COMPOSITING_MODE=1 \
xvfb-run -a "$SMOKE_PACKAGE/GenericAgent.AppImage" >"$SMOKE_ROOT/app.log" 2>&1 &
SMOKE_PID=$!
cleanup_smoke() {
kill "$SMOKE_PID" 2>/dev/null || true
wait "$SMOKE_PID" 2>/dev/null || true
}
trap cleanup_smoke EXIT
IDENTITY=""
for _ in $(seq 1 120); do
IDENTITY="$(curl --fail --silent --max-time 1 http://127.0.0.1:14168/services/identity || true)"
[[ -n "$IDENTITY" ]] && break
sleep 1
done
[[ -n "$IDENTITY" ]] || { cat "$SMOKE_ROOT/app.log" >&2; exit 1; }
EXPECTED_APP_DIR="$SMOKE_PACKAGE/runtime/app/frontends" \
IDENTITY="$IDENTITY" python3 - <<'PY'
import json, os, pathlib
identity = json.loads(os.environ["IDENTITY"])
actual = pathlib.Path(identity["app_dir"]).resolve()
expected = pathlib.Path(os.environ["EXPECTED_APP_DIR"]).resolve()
assert actual == expected, (actual, expected)
PY
curl --fail --silent --max-time 3 -X POST http://127.0.0.1:14168/services/bridge/exit >/dev/null
cleanup_smoke
trap - EXIT
- name: Upload workflow artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: GenericAgent-Desktop-Linux-Portable-${{ github.run_number }}
path: |
artifacts/linux/out/GenericAgent-Desktop-Linux-Portable.tar.gz
artifacts/linux/out/SHA256SUMS-linux.txt
if-no-files-found: error
# ----------------------------------------------------------------------------
build-macos:
name: macOS arm64 DMG
if: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/desktop-portable-')) || (github.event_name == 'workflow_dispatch' && (github.event.inputs.target == 'all' || github.event.inputs.target == 'macos')) }}
runs-on: macos-15
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set up Rust
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable action snapshot
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Cache Rust build
uses: Swatinem/rust-cache@63fed3e2fecf6f7b51dc6f043341b79ef82a9ae7 # v2.9.2
with:
workspaces: frontends/desktop/src-tauri -> target
- name: Install desktop dependencies
working-directory: frontends/desktop
run: |
npm install --package-lock=false
node -e "const v=require('./node_modules/@tauri-apps/cli/package.json').version; if(v!=='2.11.4') throw new Error('unexpected Tauri CLI '+v)"
test ! -e package-lock.json
- name: Set up Python DMG tooling runtime
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ env.MACOS_PACKAGING_PYTHON_VERSION }}
- name: Install Python packaging tools
run: >-
python3 -m pip install --require-hashes --only-binary=:all:
--requirement frontends/desktop/packaging/dmg-build-requirements.txt
- name: Assert macOS runner architecture
run: test "$(uname -m)" = arm64
- name: Verify tracked compiled renderer bytes
working-directory: frontends/desktop
run: npm run test:dist
- name: Build macOS .app
working-directory: frontends/desktop
run: npm run tauri build -- --bundles app
- name: Assemble self-contained DMG app
shell: bash
run: |
set -euo pipefail
purge_runtime_bytecode() {
local runtime_root="$1"
find "$runtime_root" -type d -name '__pycache__' -prune -exec rm -rf {} +
find "$runtime_root" -type f \( -name '*.pyc' -o -name '*.pyo' \) -delete
if find "$runtime_root" -type d -name '__pycache__' -print -quit | grep -q .; then
echo "Python bytecode cache directory remains in packaged runtime: $runtime_root" >&2
return 1
fi
if find "$runtime_root" -type f \( -name '*.pyc' -o -name '*.pyo' \) -print -quit | grep -q .; then
echo "Python bytecode remains in packaged runtime: $runtime_root" >&2
return 1
fi
}
APP_SRC="$(find frontends/desktop/src-tauri/target/release/bundle/macos -maxdepth 1 -name '*.app' -type d | head -n 1)"
[[ -n "$APP_SRC" ]] || { echo "No .app found" >&2; exit 1; }
# Build one runtime tree and embed it only in the final DMG application.
RUNTIME_SRC="artifacts/macos/runtime-src"
mkdir -p "$RUNTIME_SRC"
cp frontends/desktop/packaging/scripts/macos/install_macos.sh "$RUNTIME_SRC/install_macos.sh"
cp frontends/desktop/packaging/scripts/merge_desktop_settings.py "$RUNTIME_SRC/merge_desktop_settings.py"
chmod +x "$RUNTIME_SRC/install_macos.sh"
# Fixed python-build-standalone macOS arm64 archive.
PBS_URL="https://github.com/astral-sh/python-build-standalone/releases/download/${PBS_RELEASE}/cpython-${PBS_PYTHON_VERSION}%2B${PBS_RELEASE}-aarch64-apple-darwin-install_only.tar.gz"
PBS_SHA256="4572133a5542f306b9bdb155da5800f9e38950cd0a98d469b832ce256fe299ea"
PBS_ARCHIVE="${RUNNER_TEMP}/pbs-macos-aarch64.tar.gz"
echo "Python build-standalone: $PBS_URL"
curl --proto '=https' --tlsv1.2 --fail --location --retry 3 --output "$PBS_ARCHIVE" "$PBS_URL"
printf '%s %s\n' "$PBS_SHA256" "$PBS_ARCHIVE" | shasum -a 256 --check -
tar -xzf "$PBS_ARCHIVE" -C "$RUNTIME_SRC" # extracts a 'python/' dir
PY="$RUNTIME_SRC/python/bin/python3"
PYTHONDONTWRITEBYTECODE=1 "$PY" -c 'import platform, sys; assert sys.version_info[:3] == (3, 12, 14); assert platform.machine() == "arm64"; print(sys.version)'
# Offline binary-only wheels. requirements.txt pins direct and transitive versions.
mkdir -p "$RUNTIME_SRC/wheels"
cp frontends/desktop/packaging/python-runtime-requirements.txt "$RUNTIME_SRC/wheels/requirements.txt"
PYTHONDONTWRITEBYTECODE=1 "$PY" -m pip download --only-binary=:all: --dest "$RUNTIME_SRC/wheels" \
--requirement "$RUNTIME_SRC/wheels/requirements.txt"
# macOS applications must be immutable at first launch. Install from the downloaded
# wheelhouse before the runtime enters the signed .app, then carry a durable marker.
# The binary-only offline repair path needs neither setuptools nor wheel. Remove any
# copies shipped in the base interpreter; bytecode writes are disabled at runtime too.
PYTHONDONTWRITEBYTECODE=1 "$PY" -m pip install --no-compile --no-index --find-links "$RUNTIME_SRC/wheels" \
--requirement "$RUNTIME_SRC/wheels/requirements.txt"
PYTHONDONTWRITEBYTECODE=1 "$PY" -m pip uninstall --yes setuptools wheel
PYTHONDONTWRITEBYTECODE=1 "$PY" -m pip check
PYTHONDONTWRITEBYTECODE=1 "$PY" -c 'import aiohttp, fastapi, importlib.util, pydantic, uvicorn, websockets; assert all(importlib.util.find_spec(name) is None for name in ("setuptools", "wheel", "pkg_resources"))'
purge_runtime_bytecode "$RUNTIME_SRC"
printf 'ok\n' > "$RUNTIME_SRC/.prepared"
test -s "$RUNTIME_SRC/.prepared"
# Runtime source (project root minus heavy/dev/build dirs) — bsdtar exclude syntax.
mkdir -p "$RUNTIME_SRC/app"
tar \
--exclude='.git' --exclude='.github' \
--exclude='frontends/tests' \
--exclude='frontends/desktop/src-tauri' \
--exclude='frontends/desktop/src' \
--exclude='frontends/desktop/public' \
--exclude='frontends/desktop/scripts' \
--exclude='frontends/desktop/release_qualification' \
--exclude='frontends/desktop/tests' \
--exclude='frontends/desktop/testing' \
--exclude='frontends/desktop/spec' \
--exclude='frontends/desktop/node_modules' \
--exclude='frontends/desktop/dist' \
--exclude='frontends/desktop/DESIGN.md' \
--exclude='frontends/desktop/package.json' \
--exclude='frontends/desktop/package-lock.json' \
--exclude='frontends/desktop/.npmrc' \
--exclude='frontends/desktop/index.html' \
--exclude='frontends/desktop/loading.html' \
--exclude='frontends/desktop/setup.html' \
--exclude='frontends/desktop/tsconfig*.json' \
--exclude='frontends/desktop/vite.config.ts' \
--exclude='frontends/desktop/packaging' --exclude='docs' \
--exclude='assets/demo' --exclude='assets/images' \
--exclude='assets/GenericAgent_Technical_Report.pdf' \
--exclude='artifacts' \
--exclude='*/node_modules' --exclude='*/target' \
--exclude='*/.venv' --exclude='.venv' \
--exclude='*/__pycache__' --exclude='*.pyc' \
-cf - . | tar -xf - -C "$RUNTIME_SRC/app"
test -f "$RUNTIME_SRC/app/agentmain.py"
test -f "$RUNTIME_SRC/app/frontends/desktop_bridge.py"
test -f "$RUNTIME_SRC/app/frontends/desktop/static/index.html"
test ! -e "$RUNTIME_SRC/app/frontends/desktop/dist"
test ! -e "$RUNTIME_SRC/app/frontends/desktop/src"
test ! -e "$RUNTIME_SRC/app/frontends/desktop/public"
test ! -e "$RUNTIME_SRC/app/frontends/desktop/package-lock.json"
test ! -e "$RUNTIME_SRC/app/frontends/desktop/node_modules"
DMG_STAGE="artifacts/macos/dmg-stage"
DMG_APP="$DMG_STAGE/GenericAgent.app"
mkdir -p "$DMG_STAGE"
# Standard DMG: GenericAgent.app + Applications alias. The post-build
# repackager below writes the curated two-icon Finder layout.
ditto "$APP_SRC" "$DMG_APP"
mkdir -p "$DMG_APP/Contents/Resources"
ditto "$RUNTIME_SRC" "$DMG_APP/Contents/Resources/runtime"
test -s "$DMG_APP/Contents/Resources/runtime/.prepared"
DMG_RUNTIME="$DMG_APP/Contents/Resources/runtime"
PYTHONDONTWRITEBYTECODE=1 "$DMG_RUNTIME/python/bin/python3" \
-c 'import aiohttp, fastapi, pydantic, uvicorn, websockets'
purge_runtime_bytecode "$DMG_RUNTIME"
# Ad-hoc signing only: this is not Developer ID signing or notarization.
codesign --force --deep --sign - "$DMG_APP"
codesign --verify --deep --strict "$DMG_APP"
ln -s /Applications "$DMG_STAGE/Applications"
mkdir -p artifacts/macos/out
hdiutil create \
-volname "GenericAgent Desktop" \
-srcfolder "$DMG_STAGE" \
-ov \
-format UDZO \
"artifacts/macos/out/GenericAgent-Desktop-macOS-aarch64.dmg"
# Restore the intentionally minimal Finder presentation: only the app
# and Applications shortcut, with the established window/icon layout.
bash frontends/desktop/scripts/post-dmg.sh "artifacts/macos/out/GenericAgent-Desktop-macOS-aarch64.dmg"
(
cd artifacts/macos/out
shasum -a 256 "GenericAgent-Desktop-macOS-aarch64.dmg" \
> "GenericAgent-Desktop-macOS-aarch64.dmg.sha256"
)
echo "DMG stage tree:"
find "$DMG_STAGE" -maxdepth 2 -print | sort
- name: Upload workflow artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: GenericAgent-Desktop-macOS-aarch64-DMG-${{ github.run_number }}
path: |
artifacts/macos/out/GenericAgent-Desktop-macOS-aarch64.dmg
artifacts/macos/out/GenericAgent-Desktop-macOS-aarch64.dmg.sha256
if-no-files-found: error
# ----------------------------------------------------------------------------
publish-release:
name: Publish one atomic prerelease
needs: [build-windows, build-linux, build-macos]
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/desktop-portable-') && needs.build-windows.result == 'success' && needs.build-linux.result == 'success' && needs.build-macos.result == 'success' }}
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Download Windows candidate
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: GenericAgent-Desktop-Windows-Portable-${{ github.run_number }}
path: ${{ runner.temp }}/release-assets
- name: Download Linux candidate
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: GenericAgent-Desktop-Linux-Portable-${{ github.run_number }}
path: ${{ runner.temp }}/release-assets
- name: Download macOS arm64 candidate
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: GenericAgent-Desktop-macOS-aarch64-DMG-${{ github.run_number }}
path: ${{ runner.temp }}/release-assets
- name: Validate six assets and publish prerelease
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ github.ref_name }}
TARGET_SHA: ${{ github.sha }}
shell: bash
run: |
set -euo pipefail
ASSET_DIR="${RUNNER_TEMP}/release-assets"
EXPECTED=(
GenericAgent-Desktop-Linux-Portable.tar.gz
GenericAgent-Desktop-Windows-Portable.zip
GenericAgent-Desktop-macOS-aarch64.dmg
GenericAgent-Desktop-macOS-aarch64.dmg.sha256
SHA256SUMS-linux.txt
SHA256SUMS-windows.txt
)
if find "$ASSET_DIR" -mindepth 1 -maxdepth 1 ! -type f -print -quit | grep -q .; then
echo "Release staging contains a non-regular entry" >&2
find "$ASSET_DIR" -mindepth 1 -maxdepth 1 -print >&2
exit 1
fi
mapfile -t ACTUAL < <(find "$ASSET_DIR" -mindepth 1 -maxdepth 1 -type f -printf '%f\n' | LC_ALL=C sort)
if ! diff -u <(printf '%s\n' "${EXPECTED[@]}") <(printf '%s\n' "${ACTUAL[@]}"); then
echo "Release staging must contain exactly the six expected files" >&2
exit 1
fi
for filename in "${EXPECTED[@]}"; do
test -s "$ASSET_DIR/$filename" || { echo "Missing or empty release asset: $filename" >&2; exit 1; }
done
verify_checksum_manifest() {
local manifest="$1"
local payload="$2"
local normalized="${RUNNER_TEMP}/${manifest}.normalized"
tr -d '\r' < "$ASSET_DIR/$manifest" > "$normalized"
awk -v expected="$payload" '
NF == 2 && $1 ~ /^[0-9a-fA-F]{64}$/ && $2 == expected { valid += 1 }
END { exit !(NR == 1 && valid == 1) }
' "$normalized"
(cd "$ASSET_DIR" && sha256sum --check --strict "$normalized")
}
verify_checksum_manifest SHA256SUMS-windows.txt GenericAgent-Desktop-Windows-Portable.zip
verify_checksum_manifest SHA256SUMS-linux.txt GenericAgent-Desktop-Linux-Portable.tar.gz
verify_checksum_manifest GenericAgent-Desktop-macOS-aarch64.dmg.sha256 GenericAgent-Desktop-macOS-aarch64.dmg
[[ "$TAG_NAME" =~ ^desktop-portable-[A-Za-z0-9._-]+$ ]] \
|| { echo "Invalid release tag: $TAG_NAME" >&2; exit 1; }
[[ "$TARGET_SHA" =~ ^[0-9a-f]{40}$ ]] \
|| { echo "Invalid release target SHA" >&2; exit 1; }
TITLE="GenericAgent Desktop ${TAG_NAME}"
NOTES_FILE="${RUNNER_TEMP}/ga-release-notes.md"
cat > "$NOTES_FILE" <<'EOF'
GenericAgent Desktop 桌面版 / Desktop
三个平台产物来自同一提交,并在公开发布前统一验证。All three platform artifacts come from one commit and are validated before publication.
## 安装方法 / Installation
- Windows x64:下载 `GenericAgent-Desktop-Windows-Portable.zip`,解压后双击 `GenericAgent.exe`。卸载时运行 `uninstall.bat`,再删除解压目录。
Windows x64: extract `GenericAgent-Desktop-Windows-Portable.zip`, then launch `GenericAgent.exe`. Run `uninstall.bat` before deleting the extracted directory.
- Linux x86_64:下载并解压 `GenericAgent-Desktop-Linux-Portable.tar.gz`,执行 `chmod +x GenericAgent.AppImage` 后运行它。卸载时运行 `uninstall.sh`,再删除解压目录。
Linux x86_64: extract `GenericAgent-Desktop-Linux-Portable.tar.gz`, run `chmod +x GenericAgent.AppImage`, then launch it. Run `uninstall.sh` before deleting the extracted directory.
- macOS Apple silicon (arm64):打开 `GenericAgent-Desktop-macOS-aarch64.dmg`,把 `GenericAgent.app` 拖入 Applications。
macOS Apple silicon (arm64): open `GenericAgent-Desktop-macOS-aarch64.dmg` and drag `GenericAgent.app` to Applications.
## 签名状态 / Signing status
Windows 便携版尚未使用代码签名证书,SmartScreen 可能显示警告;运行前请核对 `SHA256SUMS-windows.txt`。
The Windows portable build is not code-signed, so SmartScreen may warn; verify `SHA256SUMS-windows.txt` before running it.
macOS 应用仅使用 ad-hoc 签名,未使用 Apple Developer ID,也未 notarize。首次打开可能需要右键选择“打开”或在“隐私与安全性”中允许。
The macOS app is ad-hoc signed only. It is neither Developer ID signed nor notarized; first launch may require Open from the context menu or approval in Privacy & Security.
SHA-256 清单与各产物一同发布。SHA-256 manifests are included with the artifacts.
EOF
sed -i 's/^ //' "$NOTES_FILE"
if gh release view "$TAG_NAME" >/dev/null 2>&1; then
echo "A release already exists for $TAG_NAME; refusing to overwrite it" >&2
exit 1
fi
ASSETS=()
for filename in "${EXPECTED[@]}"; do
ASSETS+=("$ASSET_DIR/$filename")
done
# Keep the release invisible while all assets upload; only the final edit publishes it.
gh release create "$TAG_NAME" "${ASSETS[@]}" \
--target "$TARGET_SHA" \
--title "$TITLE" \
--notes-file "$NOTES_FILE" \
--draft \
--prerelease
mapfile -t REMOTE_ASSETS < <(gh release view "$TAG_NAME" --json assets --jq '.assets[].name' | LC_ALL=C sort)
diff -u <(printf '%s\n' "${EXPECTED[@]}") <(printf '%s\n' "${REMOTE_ASSETS[@]}")
test "$(gh release view "$TAG_NAME" --json isDraft --jq '.isDraft')" = true
test "$(gh release view "$TAG_NAME" --json isPrerelease --jq '.isPrerelease')" = true
gh release edit "$TAG_NAME" --draft=false --prerelease
test "$(gh release view "$TAG_NAME" --json isDraft --jq '.isDraft')" = false
test "$(gh release view "$TAG_NAME" --json isPrerelease --jq '.isPrerelease')" = true
+3
View File
@@ -156,3 +156,6 @@ frontends/conductor_im_plugins/*
# Beta 渠道:订阅门户插件(仅 beta 分发携带,不入库)
plugins/subscription_portal.py
# Local-only model reload regression tests
/frontends/tests/test_mykeys_reload.py
+1 -1
View File
@@ -774,7 +774,7 @@ GA Web 工具运行在**真实、持久化的 Chrome/Chromium 会话**中,而
<div align="center">
<table>
<tr>
<td align="center"><strong>微信群 22</strong><br/><img src="assets/images/wechat_group22.jpg" alt="微信群 22 二维码" width="240"/></td>
<td align="center"><strong>微信群 23</strong><br/><img src="assets/images/wechat_group22.jpg" alt="微信群 23 二维码" width="240"/></td>
</tr>
</table>
</div>
+1 -1
View File
@@ -186,7 +186,7 @@ class TMWebDriver:
if session.ws_client == client: session.mark_disconnected()
def execute_js(self, code, timeout=15, session_id=None) -> Any:
if session_id is None: session_id = self.default_session_id
if session_id is None: session_id = str(self.default_session_id)
if self.is_remote:
safe_print('remote_execute_js')
response = self._remote_cmd({"cmd": "execute_js", "sessionId": session_id,
+94 -66
View File
@@ -6,7 +6,7 @@ if sys.stderr is None: sys.stderr = open(os.devnull, "w")
elif hasattr(sys.stderr, 'reconfigure'): sys.stderr.reconfigure(errors='replace')
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from llmcore import reload_mykeys, ToolClient, MixinSession, NativeToolClient, NativeClaudeSession, NativeOAISession, resolve_client
from llmcore import mykeys_store, ToolClient, MixinSession, NativeToolClient, NativeClaudeSession, NativeOAISession, resolve_client
from agent_loop import agent_runner_loop
try:
from plugins.hooks import discover_and_load; discover_and_load()
@@ -46,6 +46,7 @@ class GenericAgent:
def __init__(self):
os.makedirs(os.path.join(script_dir, 'temp'), exist_ok=True)
self.lock = threading.Lock()
self._model_lock = threading.RLock()
self.task_dir = None
self.history = []; self.handler = None; self.all_outputs = []
self.task_queue = queue.Queue()
@@ -64,44 +65,57 @@ class GenericAgent:
self.intervene = self.extrakeyinfo = None
def load_llm_sessions(self):
mykeys, changed = reload_mykeys()
if not changed and hasattr(self, 'llmclients'): return
try: oldhistory, oldname = self.llmclient.backend.history, self.llmclient.backend.name
except: oldhistory = oldname = None
llm_sessions = []
for k, cfg in mykeys.items():
if not any(x in k for x in ['api', 'config', 'cookie']): continue
try:
if 'mixin' in k: llm_sessions += [{'mixin_cfg': cfg}]
elif c := resolve_client(k): llm_sessions += [c]
except: pass
for i, s in enumerate(llm_sessions):
if isinstance(s, dict) and 'mixin_cfg' in s:
with self._model_lock:
if self.is_running: return
mykeys, updated_at = mykeys_store.snapshot()
if hasattr(self, 'llmclients') and getattr(self, '_mykeys_updated_at', None) == updated_at: return
try: oldhistory = self.llmclient.backend.history
except: oldhistory = None
try: oldkey = self._llm_config_keys[self.llm_no]
except (AttributeError, IndexError): oldkey = None
llm_sessions, config_keys = [], []
for k, cfg in mykeys.items():
if not any(x in k for x in ['api', 'config', 'cookie']): continue
try:
mixin = MixinSession(llm_sessions, s['mixin_cfg'])
if isinstance(mixin._sessions[0], (NativeClaudeSession, NativeOAISession)): llm_sessions[i] = NativeToolClient(mixin)
else: llm_sessions[i] = ToolClient(mixin)
except Exception as e: print(f'\n\n\n[ERROR] Failed to init MixinSession with cfg {s["mixin_cfg"]}: {e}!!!\n\n')
self.llmclients = llm_sessions
if not self.llmclients: return
names = [c.backend.name if not isinstance(c, dict) else f'BADMIXIN_{i}' for i, c in enumerate(self.llmclients)]
if oldname in names: self.llm_no = names.index(oldname)
self.llmclient = self.llmclients[self.llm_no%len(self.llmclients)]
if oldhistory: self.llmclient.backend.history = oldhistory
if 'mixin' in k: llm_sessions += [{'mixin_cfg': cfg}]
elif c := resolve_client(k, cfg): llm_sessions += [c]
else: continue
config_keys.append(k)
except: pass
for i, s in enumerate(llm_sessions):
if isinstance(s, dict) and 'mixin_cfg' in s:
try:
mixin = MixinSession(llm_sessions, s['mixin_cfg'])
if isinstance(mixin._sessions[0], (NativeClaudeSession, NativeOAISession)): llm_sessions[i] = NativeToolClient(mixin)
else: llm_sessions[i] = ToolClient(mixin)
except Exception as e: print(f'\n\n\n[ERROR] Failed to init MixinSession with cfg {s["mixin_cfg"]}: {e}!!!\n\n')
self.llmclients, self._llm_config_keys = llm_sessions, config_keys
if not self.llmclients:
self.llmclient = None
self._mykeys_updated_at = updated_at
return
if oldkey in config_keys: self.llm_no = config_keys.index(oldkey)
self.llm_no %= len(self.llmclients)
self.llmclient = self.llmclients[self.llm_no]
if oldhistory: self.llmclient.backend.history = oldhistory
self._mykeys_updated_at = updated_at
def next_llm(self, n=-1):
self.load_llm_sessions()
if not self.llmclients: return
self.llm_no = ((self.llm_no + 1) if n < 0 else n) % len(self.llmclients)
lastc = self.llmclient
self.llmclient = self.llmclients[self.llm_no]
try: self.llmclient.backend.history = lastc.backend.history
except: raise Exception('[ERROR] BAD Mixin config: Check your mykey.py')
self.llmclient.last_tools = ''
load_tool_schema()
with self._model_lock:
if self.is_running: return
self.load_llm_sessions()
if not self.llmclients: return
self.llm_no = ((self.llm_no + 1) if n < 0 else n) % len(self.llmclients)
lastc = self.llmclient
self.llmclient = self.llmclients[self.llm_no]
try: self.llmclient.backend.history = lastc.backend.history
except: raise Exception('[ERROR] BAD Mixin config: Check your mykey.py')
self.llmclient.last_tools = ''
load_tool_schema()
def list_llms(self):
self.load_llm_sessions()
return [(i, self.get_llm_name(b), i == self.llm_no) for i, b in enumerate(self.llmclients)]
with self._model_lock:
self.load_llm_sessions()
return [(i, self.get_llm_name(b), i == self.llm_no) for i, b in enumerate(self.llmclients)]
def get_llm_name(self, b=None, model=False):
b = self.llmclient if b is None else b
if isinstance(b, dict): return 'BADCONFIG_MIXIN'
@@ -116,6 +130,15 @@ class GenericAgent:
if self.handler is not None: self.handler.code_stop_signal.append(1)
for sess in getattr(self.llmclient.backend, '_sessions', [self.llmclient.backend]):
sess.should_stop = lambda: self.stop_sig # live read; cleared by run()'s finally
try: # wake a recv() blocked in another thread (waiting headers OR reading stream). Verified on Windows:
# shutdown()/close() do NOT wake it (makefile refcount defers closesocket); _real_close() does
import socket as _socket
sock = sys.modules['llmcore']._INFLIGHT[sess._tid] # socket registered at urllib3 request() time, before headers
try: sock.shutdown(_socket.SHUT_RDWR) # for non-Windows semantics
except OSError: pass
try: sock._real_close() # CPython internal; bypasses refcount -> actual closesocket
except AttributeError: sock.close()
except Exception: pass
try: sess.active_response.close()
except Exception: pass
@@ -145,36 +168,37 @@ class GenericAgent:
task = self.task_queue.get()
if isinstance(task, str): break
raw_query, source, display_queue = task["query"], task["source"], task["output"]
raw_query = self._handle_slash_cmd(raw_query, display_queue)
if raw_query is None:
self.task_queue.task_done(); continue
self.is_running = True; self._current_queue = display_queue
if len(raw_query) > 2000:
task_file = os.path.join(script_dir, 'temp', f'user_prompt_{os.getpid()}_{time.time_ns()}.md')
with open(task_file, 'w', encoding='utf-8') as f: f.write(raw_query)
raw_query = f'Long user prompt saved to {task_file}. Read and execute.'
self.all_outputs.append({"input": raw_query, "outputs": []})
if len(self.all_outputs) > 10000: self.all_outputs = self.all_outputs[-5000:]
rquery = smart_format(raw_query.replace('\n', ' '), max_str_len=200)
self.history.append(f"[USER]: {rquery}")
sys_prompt = get_system_prompt() + '\n'.join(self.extra_sys_prompts) + getattr(self.llmclient.backend, 'extra_sys_prompt', '')
if self.peer_hint: sys_prompt += f"\n[Peer] 用户提及其他会话/后台任务状态时: temp/model_responses/ (只找近期修改的文件尾部)\n"
handler = GenericAgentHandler(self, self.history, os.path.join(script_dir, 'temp'))
if getattr(self, 'no_print', False): handler.print = lambda *a, **k: None
if self.handler and 'key_info' in self.handler.working:
ki = re.sub(r'\n\[SYSTEM\] 此为.*?工作记忆[。\n]*', '', self.handler.working['key_info']) # 去旧
handler.working['key_info'] = ki
handler.working['passed_sessions'] = ps = self.handler.working.get('passed_sessions', 0) + 1
if ps > 0: handler.working['key_info'] += f'\n[SYSTEM] 此为 {ps} 个对话前设置的key_info,若已在新任务,先更新或清除工作记忆。\n'
self.handler = handler # although new handler, the **full** history is in llmclient, so it is full history!
self.llmclient.log_path = self.log_path
if self.force_non_stream:
self.llmclient.backend.stream = False
self.llmclient.backend.read_timeout = max(self.llmclient.backend.read_timeout, 1200)
gen = agent_runner_loop(self.llmclient, sys_prompt, raw_query, handler, TOOLS_SCHEMA,
max_turns=180, verbose=self.verbose, yield_info=True)
full_resp = ""; last_pos = 0; curr_turn = 0; turn_resps = []
try:
full_resp = ""; last_pos = 0; curr_turn = 0; turn_resps = self.all_outputs[-1]["outputs"]
with self._model_lock:
self.load_llm_sessions()
self.is_running = True; self._current_queue = display_queue
raw_query = self._handle_slash_cmd(raw_query, display_queue)
if raw_query is None: continue
if len(raw_query) > 2000:
task_file = os.path.join(script_dir, 'temp', f'user_prompt_{os.getpid()}_{time.time_ns()}.md')
with open(task_file, 'w', encoding='utf-8') as f: f.write(raw_query)
raw_query = f'Long user prompt saved to {task_file}. Read and execute.'
self.all_outputs.append({"input": raw_query, "outputs": turn_resps})
if len(self.all_outputs) > 10000: self.all_outputs = self.all_outputs[-5000:]
rquery = smart_format(raw_query.replace('\n', ' '), max_str_len=200)
self.history.append(f"[USER]: {rquery}")
sys_prompt = get_system_prompt() + '\n'.join(self.extra_sys_prompts) + getattr(self.llmclient.backend, 'extra_sys_prompt', '')
if self.peer_hint: sys_prompt += f"\n[Peer] 用户提及其他会话/后台任务状态时: temp/model_responses/ (只找近期修改的文件尾部)\n"
handler = GenericAgentHandler(self, self.history, os.path.join(script_dir, 'temp'))
if getattr(self, 'no_print', False): handler.print = lambda *a, **k: None
if self.handler and 'key_info' in self.handler.working:
ki = re.sub(r'\n\[SYSTEM\] 此为.*?工作记忆[。\n]*', '', self.handler.working['key_info']) # 去旧
handler.working['key_info'] = ki
handler.working['passed_sessions'] = ps = self.handler.working.get('passed_sessions', 0) + 1
if ps > 0: handler.working['key_info'] += f'\n[SYSTEM] 此为 {ps} 个对话前设置的key_info,若已在新任务,先更新或清除工作记忆。\n'
self.handler = handler # although new handler, the **full** history is in llmclient, so it is full history!
self.llmclient.log_path = self.log_path
if self.force_non_stream:
self.llmclient.backend.stream = False
self.llmclient.backend.read_timeout = max(self.llmclient.backend.read_timeout, 1200)
gen = agent_runner_loop(self.llmclient, sys_prompt, raw_query, handler, TOOLS_SCHEMA,
max_turns=180, verbose=self.verbose, yield_info=True)
for chunk in gen:
if consume_file(self.task_dir, '_stop'): self.abort()
if self.stop_sig: break
@@ -195,9 +219,12 @@ class GenericAgent:
display_queue.put({'done': full_resp + f'\n```\n{format_error(e)}\n```', 'source': source, 'turn': curr_turn, 'outputs': turn_resps.copy()})
finally:
if self.stop_sig: print('User aborted the task.')
self.is_running = self.stop_sig = False # keep _current_queue: its final 'done' may still be unclaimed (refreshed UI salvages it); next task overwrites it
self.task_queue.task_done()
if self.handler is not None: self.handler.code_stop_signal.append(1)
with self._model_lock:
self.is_running = self.stop_sig = False # keep _current_queue for final output retrieval
try: self.load_llm_sessions()
except Exception as e: print(f'[ERROR] Failed to reload models: {e}')
self.task_queue.task_done()
GeneraticAgent = GenericAgent
@@ -296,6 +323,7 @@ if __name__ == '__main__':
if task and task == '/exit': break
if task:
print(f'[Reflect] triggered: {task[:80]}')
if (_ln := getattr(mod, 'LLM', None)): agent.next_llm(next((i for i, b in enumerate(agent.llmclients) if not isinstance(b, dict) and b.backend.name == _ln), agent.llm_no))
dq = agent.put_task(task, source='reflect')
try:
while 'done' not in (item := dq.get(timeout=2200)): pass
Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 112 KiB

+1 -1
View File
@@ -4,6 +4,6 @@ L1 Insight是极简索引,L2/L3变更时同步L1,索引必须极简。写记
[CONSTITUTION]
1. 改自身源码先请示;./内可自主实验,允许装包和portable工具
2. 决策前查记忆,有SOP/utils必用;多次失败回看SOP;未查证不断言
3. 分步执行,控制粒度,限制失败半径;3次失败请求干预
3. 分步执行,控制粒度,限制失败半径
4. 密钥文件仅引用,不读取/移动
5. 写任何记忆前读META-SOP核验,memory下文件只能patch修改(除非新建)
+1 -1
View File
@@ -4,6 +4,6 @@ L1 Insight is a minimal index; sync L1 when L2/L3 changes; keep index minimal. R
[CONSTITUTION]
1. Ask before modifying own source code; free to experiment within ./; installing packages and portable tools allowed
2. Check memory before decisions; always use existing SOPs/utils; revisit SOPs on repeated failures; never assert without evidence
3. Execute step by step, control granularity, limit blast radius; request intervention after 3 failures
3. Execute step by step, control granularity, limit blast radius
4. Key/secret files: reference only, never read or move
5. Read META-SOP to verify before writing any memory; files under memory/ must be patched only (unless creating new)
+1 -1
View File
@@ -1,7 +1,7 @@
# Role: 物理级全能执行者
你拥有文件读写、脚本执行、用户浏览器JS注入、系统级干预的物理操作权限。禁止推诿"无法操作"——不空想,用工具探测。
## 行动原则
调用工具前先推演:当前阶段、上步结果是否符合预期、下步策略,必须在回复文本中用<summary>输出极简总结。
调用工具前先推演:当前阶段、上步结果是否符合预期、下步策略,必须在回复文本头部用小于30词<summary>输出极简总结。
- 探测优先:失败时先充分获取信息(日志/状态/上下文),关键信息存入工作记忆,再决定重试或换方案。不可逆操作先询问用户。
- 失败升级:1次→读错误理解原因,2次→探测环境状态,3次→深度分析后换方案或问用户。禁止无新信息的重复操作。
- 行动也是认识:边推进边用现实反馈校正方向,内部解释与计划只作暂时假说。根据任务选择高级sop调用
+2 -1
View File
@@ -2,6 +2,7 @@
You have full physical access: file I/O, script execution, browser JS injection, and system-level intervention. Never deflect with "can't do it" — don't speculate, use tools to probe.
Summarize and reply in user's language or follow user's prompt.
## Action Principles
Before each tool call, reason: current phase, whether the last result met expectations, and next strategy and <summary> in reply text of each turn.
Before each tool call, reason: current phase, whether the last result met expectations, and next strategy in reply text of each turn.
<summary> (<30 tokens) before reply text.
- Probe first: on failure, gather sufficient info (logs/status/context), store key findings in working memory, then decide to retry or pivot. Ask the user before irreversible operations.
- Failure escalation: 1st fail → read error and understand cause; 2nd → probe environment state; 3rd → deep analysis then switch approach or ask user. Never repeat an action without new information.
+2 -2
View File
@@ -83,7 +83,7 @@ uv venv && uv pip install -e ".[ui]"
进入项目文件夹,把 `mykey_template.py` 复制一份,重命名为 `mykey.py`。
用任意文本编辑器打开 `mykey.py`,填入你的 API 信息。**选一种填就行**,不用的配置删掉或留着不管都行。
用任意文本编辑器打开 `mykey.py`,按接口协议选择开头的一段配置,**取消整段注释,填好地址、API Key 和模型名即可**。不用的配置保持注释。
> 💡 也可以运行交互式向导 `python assets/configure_mykey.py`,按提示选择厂商、填入 Key 即可自动生成 `mykey.py`。
@@ -125,7 +125,7 @@ mixin_config = {
}
```
> 💡 完整字段说明(`thinking_type` / `reasoning_effort` / `context_win` / `proxy` / Zhipu / MiniMax / Kimi / OpenRouter 等渠道示例)见 `mykey_template.py` 顶部注释。
> 💡 常用高级选项、自动故障转移和聊天平台配置见 `mykey_template.py` 后半部分;首次配置只需看开头。
### 关键规则
+30
View File
@@ -0,0 +1,30 @@
# Desktop组件与源码部署
GA主仓拥有后端与整体分发,独立私有Desktop仓只构建桌面组件。两仓不使用子模块,也不互相复制源码。
## Desktop构建
在Desktop仓手动运行 **Build standalone Desktop components**,选择平台;也可使用 `desktop-component-*` 标签。
| 平台 | 组件产物 | 源码部署位置 |
| --- | --- | --- |
| Windows x64 | `GenericAgent.exe` | `frontends/GenericAgent.exe` |
| macOS ARM64 | `GenericAgent-Desktop-macOS-arm64.zip` | 解压为 `frontends/GenericAgent.app` |
| Linux x64 | `GenericAgent-Linux-x86_64.AppImage` | `frontends/GenericAgent.AppImage` |
UI由Tauri内嵌,不依赖 `frontends/desktop/static/`。组件不包含GA、Python或Python依赖。启动时配置已有GA根目录和Python解释器。
mac组件沿用ad-hoc签名,签名校验失败会中止构建;压缩解压后再次验签。它不是Developer ID签名或Apple公证,首次启动可能需要系统设置中手动允许。当前只构建Apple Silicon,不是Intel或Universal版。保持 `.app` 完整,不修改内部文件。
## 部署与发布
**主仓不配置CI;CI仅在Desktop仓构建桌面组件。**
1. 从Desktop Actions下载对应平台产物,核对SHA256和Desktop commit。
2. 将组件放到上表所列的源码部署路径。mac需完整解压 `.app`,不要修改内部文件。
3. 使用已有GA源码、Python环境与依赖启动桌面。
4. Windows发布沿用现有手工/VPS发布SOP;需要分发mac组件时,使用Desktop CI输出的已签名ZIP。
私有仓Actions下载需要认证,产物保留30天。长期分发使用现有二进制发布渠道,不把私有Actions下载页作为公开下载地址。
Desktop CI不打包GA或Python;主仓不承担自动组装、测试或发布任务。
+2
View File
@@ -1,5 +1,7 @@
# GenericAgent 桌面版安装指南
> 以下为旧DMG说明。新的源码部署使用独立签名 `.app`,参见 [Desktop组件与源码部署](desktop_components.md)。
## 📦 安装步骤
### 第一步:打开安装包
+48 -156
View File
@@ -1,6 +1,5 @@
import os, sys, re, time, json, uuid, queue, asyncio, threading, argparse, base64, secrets
from dataclasses import dataclass, field
from pathlib import Path
from typing import Dict, Any, Optional, List
from contextlib import asynccontextmanager, suppress
@@ -11,7 +10,6 @@ from pydantic import BaseModel
FRONTENDS_DIR = os.path.dirname(os.path.abspath(__file__))
if FRONTENDS_DIR not in sys.path: sys.path.insert(0, FRONTENDS_DIR)
from desktop_settings import DesktopSettingsError, update_settings
def _resolve_ga_root() -> str:
"""Use the external core selected by the package-owned desktop bridge when valid."""
@@ -72,41 +70,6 @@ HOST = args.host
PORT = args.port
SETTINGS_PATH = Path.home() / ".ga_desktop_settings.json"
def _settings_doc() -> dict:
try:
doc = json.loads(SETTINGS_PATH.read_text(encoding="utf-8"))
return doc if isinstance(doc, dict) else {}
except Exception:
return {}
def _persist_conductor_llm_no(llm_no: int) -> None:
def mutate(document: dict) -> None:
section = document.get("conductor")
if not isinstance(section, dict):
section = {}
document["conductor"] = section
section["llmNo"] = llm_no
update_settings(SETTINGS_PATH, mutate)
def _conductor_llm_no() -> Optional[int]:
"""Read the model index bound to the conductor session.
Falls back to the legacy desktop default ui.llmNo for existing installs."""
doc = _settings_doc()
for section in (doc.get("conductor"), doc.get("ui")):
if isinstance(section, dict) and section.get("llmNo") is not None:
try:
return int(section.get("llmNo"))
except (TypeError, ValueError):
pass
return None
def _client_usable(agent: "GenericAgent") -> bool:
return hasattr(getattr(agent, "llmclient", None), "backend")
@@ -131,89 +94,12 @@ def _activate_model(agent: "GenericAgent", no: int) -> None:
agent.next_llm(no)
def _runtime_model_state(agent: "GenericAgent", configured: Optional[int], reason: Optional[str]) -> dict:
effective = getattr(agent, "llm_no", None) if _client_usable(agent) else None
current = None
if _client_usable(agent):
with suppress(Exception):
current = str(agent.llmclient.backend.name)
return {"configured": configured, "effective": effective,
"fallbackReason": reason, "current": current}
def _apply_desktop_model(agent: "GenericAgent") -> dict:
"""Make the conductor's session reflect the current desktop config before a task:
switch to its bound model if one is set, otherwise still refresh sessions from
mykey so live key/model edits (e.g. importing keys) take effect without a restart.
next_llm() already reloads internally; the no-bound-model branch must reload too,
or a conductor started on an empty/stale mykey would never pick up imported keys."""
doc = _settings_doc()
conductor_cfg = doc.get("conductor") if isinstance(doc.get("conductor"), dict) else {}
ui_cfg = doc.get("ui") if isinstance(doc.get("ui"), dict) else {}
raw_configured = conductor_cfg.get("llmNo")
configured = _parse_model_no(raw_configured)
ui_default = _parse_model_no(ui_cfg.get("llmNo"))
try:
agent.load_llm_sessions() # mtime-guarded; rebuilds only when mykey changed
except Exception as e:
print(f"[conductor] failed to refresh model sessions: {e}", file=sys.stderr)
clients = getattr(agent, "llmclients", []) or []
configured_failed = False
if _usable_model(agent, configured):
try:
_activate_model(agent, configured)
return _runtime_model_state(agent, configured, None)
except Exception as e:
configured_failed = True
print(f"[conductor] configured model #{configured} is unavailable: {e}", file=sys.stderr)
if _usable_model(agent, ui_default):
if raw_configured is None:
reason = "ui_default"
elif configured_failed:
reason = "configured_unavailable"
elif configured is not None:
reason = "configured_unavailable" if 0 <= configured < len(clients) else "invalid_configured"
else:
reason = "invalid_configured"
try:
_activate_model(agent, ui_default)
return _runtime_model_state(agent, configured, reason)
except Exception as e:
print(f"[conductor] UI default model #{ui_default} is unavailable: {e}", file=sys.stderr)
for i, client in enumerate(clients):
if hasattr(client, "backend"):
try:
_activate_model(agent, i)
return _runtime_model_state(agent, configured, "first_available")
except Exception:
continue
print("[conductor] no usable model is available", file=sys.stderr)
return {"configured": configured, "effective": None,
"fallbackReason": "no_models", "current": None}
def _selected_conductor_llm_no(agent: "GenericAgent") -> int:
configured = _conductor_llm_no()
return configured if _usable_model(agent, configured) else agent.llm_no
def _set_conductor_llm_no(agent: "GenericAgent", value: Any) -> int:
"""Persist the standalone UI binding without mutating an in-flight client.
The Conductor loop applies this binding at its existing idle task boundary, so
a selection made immediately before sending a message controls that next turn.
"""
no = _parse_model_no(value)
if no is None or not _usable_model(agent, no):
raise ValueError(f"llm index out of range or unavailable: {value}")
_persist_conductor_llm_no(no)
return no
def _runtime_model_state(agent: "GenericAgent") -> dict:
usable = _client_usable(agent)
return {"configured": None,
"effective": agent.llm_no if usable else None,
"fallbackReason": None if usable else "no_models",
"current": str(agent.llmclient.backend.name) if usable else None}
def _select_llm(agent: "GenericAgent", llm: Any) -> bool:
@@ -447,7 +333,7 @@ class SubagentPool:
agent.inc_out = True
agent.verbose = False
agent.no_print = True
if not _select_llm(agent, llm): _apply_desktop_model(agent)
_select_llm(agent, llm)
th = start_agent_runner(agent, f"subagent-{sid}")
state = SubAgentState(id=sid, agent=agent, prompt=prompt, status="running", thread=th)
with self.lock: self.subagents[sid] = state
@@ -532,24 +418,30 @@ class Conductor:
self._runner_thread: Optional[threading.Thread] = None
self.log: list = []
self._model_lock = threading.RLock()
self._model_state = {
"configured": None,
"effective": None,
"fallbackReason": "no_models",
"current": None,
"running": False,
}
self._model_running = False
def model_snapshot(self) -> dict:
with self._model_lock:
return dict(self._model_state)
return {**_runtime_model_state(self.agent), "running": self._model_running}
def _publish_model_state(self, state: dict, running: bool) -> None:
snapshot = {**state, "running": bool(running)}
with self._model_lock:
self._model_state = snapshot
self._model_running = bool(running)
schedule_broadcast({"type": "model", "model": snapshot})
def select_model(self, value: Any) -> int:
with self._model_lock:
if self._model_running or self.agent.task_queue.unfinished_tasks:
raise ValueError("conductor is busy; switch models after the task finishes")
no = _parse_model_no(value)
if no is None:
raise ValueError(f"invalid model index: {value}")
self.agent.load_llm_sessions()
_activate_model(self.agent, no)
self._publish_model_state(_runtime_model_state(self.agent), running=False)
return self.agent.llm_no
def notify(self, event: dict): self.inbox.put(event)
def _wait_for_agent_idle(self, timeout: float = 10.0) -> None:
@@ -657,24 +549,23 @@ API: {base};requests,GET /readme查用法,GET /chat读未读对话,GET /
# mutate the live client until that previous task has reached
# ``task_done``; the queue join is the authoritative idle barrier.
self._wait_for_agent_idle()
# Settings can change while this long-lived process remains healthy.
# Refresh only at the task boundary so an in-flight task keeps its
# client, while the next task observes the newly persisted binding.
model_state = _apply_desktop_model(self.agent)
if model_state.get("effective") is None:
self._publish_model_state(model_state, running=False)
self._record_unavailable_model(events)
deferred_events = events
continue
kind = events[0].get("type")
other_events = [event for event in events if event.get("type") != kind]
events = [event for event in events if event.get("type") == kind]
for event in other_events:
self.inbox.put(event)
prompt = self._build_prompt(events)
self._publish_model_state(model_state, running=True)
try:
with self._model_lock:
self.agent.load_llm_sessions()
model_state = _runtime_model_state(self.agent)
if model_state.get("effective") is None:
self._publish_model_state(model_state, running=False)
self._record_unavailable_model(events)
deferred_events = events
continue
kind = events[0].get("type")
other_events = [event for event in events if event.get("type") != kind]
events = [event for event in events if event.get("type") == kind]
for event in other_events:
self.inbox.put(event)
prompt = self._build_prompt(events)
dq = self.agent.put_task(prompt, source="conductor")
self._publish_model_state(model_state, running=True)
try:
self._drain(dq, events)
finally:
self._publish_model_state(model_state, running=False)
@@ -682,7 +573,7 @@ API: {base};requests,GET /readme查用法,GET /chat读未读对话,GET /
def start(self):
self.agent = GenericAgent()
self._publish_model_state(_apply_desktop_model(self.agent), running=False)
self._publish_model_state(_runtime_model_state(self.agent), running=False)
threading.Thread(target=self._run, name="conductor-loop", daemon=True).start()
@@ -809,11 +700,12 @@ def api_subagent_action(sid: str, body: SubagentActionIn):
return JSONResponse({"error": f"unknown action: {body.action}"}, status_code=400)
@app.get("/chat")
def api_get_chat(last: int = 20):
def api_get_chat(last: int = 20, mark_read: bool = True):
items = [m.copy() for m in chat_messages[-last:]]
for m in chat_messages:
if m.get("role") == "user" and not m.get("read"): m["read"] = True
schedule_broadcast({"type": "chat_read"})
if mark_read:
for m in chat_messages:
if m.get("role") == "user" and not m.get("read"): m["read"] = True
schedule_broadcast({"type": "chat_read"})
return {"items": items}
@app.post("/chat")
@@ -837,17 +729,17 @@ async def websocket(ws: WebSocket):
"log": conductor.log, "running": running,
"model": conductor.model_snapshot(),
"llms": conductor.agent.list_llms(),
"llm": _selected_conductor_llm_no(conductor.agent)})
"llm": conductor.agent.llm_no})
while True:
data = await ws.receive_json()
if "llm" in data:
try:
llm_no = _set_conductor_llm_no(conductor.agent, data["llm"])
except (TypeError, ValueError, OSError, DesktopSettingsError) as error:
llm_no = conductor.select_model(data["llm"])
except (TypeError, ValueError, RuntimeError) as error:
await ws.send_json({
"type": "model_error",
"error": str(error),
"llm": _selected_conductor_llm_no(conductor.agent),
"llm": conductor.agent.llm_no,
})
else:
await broadcast({"type": "model_selected", "llm": llm_no})
+18 -5
View File
@@ -832,6 +832,11 @@ def extract_ui_messages(path):
try:
with open(path, encoding='utf-8', errors='replace') as f: content = f.read()
except Exception: return []
return extract_ui_messages_text(content)
def extract_ui_messages_text(content):
"""Replay log text, including archive members, without extracting to disk."""
pairs = _pairs(content)
if not pairs: return []
# tool_results live in the *next* Prompt's content; index look-ahead.
@@ -839,25 +844,33 @@ def extract_ui_messages(path):
for i in range(len(pairs) - 1):
next_tr[i] = _tool_results_from_prompt(pairs[i + 1][0])
stamps = re.findall(r'^=== Prompt ===\s+(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d)', content, re.M)
out, assistant, round_turn = [], None, 0
for i, (prompt, response) in enumerate(pairs):
try:
ts = time.mktime(time.strptime(stamps[i], '%Y-%m-%d %H:%M:%S'))
except (IndexError, ValueError, OverflowError):
ts = None
user = _user_text(prompt)
seg = _format_response_segment(response, next_tr[i])
if user:
if assistant is not None: out.append(assistant)
out.append({'role': 'user', 'content': user})
out.append({'role': 'user', 'content': user, 'ts': ts})
# Turn 1 marker too — agent_loop yields one per LLM call, including the
# first, so fold_turns treats every non-last call uniformly as a fold.
assistant = {'role': 'assistant',
'content': f"\n\n**LLM Running (Turn 1) ...**\n\n{seg}"}
step = f"\n\n**LLM Running (Turn 1) ...**\n\n{seg}"
assistant = {'role': 'assistant', 'ts': ts,
'content': step, 'turn_segs': [step]}
round_turn = 1
else:
if assistant is None:
assistant = {'role': 'assistant', 'content': ''}
assistant = {'role': 'assistant', 'content': '', 'turn_segs': []}
round_turn = 1
round_turn += 1
marker = f"\n\n**LLM Running (Turn {round_turn}) ...**\n\n"
assistant['content'] = (assistant['content'] or '') + marker + seg
step = marker + seg
assistant['turn_segs'].append(step)
assistant['content'] = (assistant['content'] or '') + step
if assistant is not None: out.append(assistant)
return [m for m in out if (m.get('content') or '').strip()]
+10 -7
View File
@@ -430,15 +430,19 @@ def canonical_session_record(
plan_path = item.get("plan_path", "")
if not isinstance(title, str) or not isinstance(cwd, str) or not isinstance(plan_path, str):
raise BackupFormatError("session text field is invalid")
messages = _record_list(item.get("messages"), [], "messages")
llm_history_value = item.get("llm_history")
llm_history = None if llm_history_value is None else _record_list(
llm_history_value, [], "llm history"
)
try:
from .desktop_history import metadata
except ImportError:
from desktop_history import metadata
llm_no_value = item.get("llm_no")
llm_no = None if llm_no_value is None else _non_negative_integer(
llm_no_value, 0, "model index"
)
if "messages" in item:
_record_list(item["messages"], [], "messages")
history = item.get("llm_history")
if history is not None and (not isinstance(history, list) or any(not isinstance(m, dict) for m in history)):
raise BackupFormatError("session history is invalid")
pinned = item.get("pinned", False)
untitled = item.get("untitled", True)
if not isinstance(pinned, bool) or not isinstance(untitled, bool):
@@ -449,7 +453,7 @@ def canonical_session_record(
"cwd": cwd,
"created_at": _finite_timestamp(item.get("created_at"), current_time),
"updated_at": _finite_timestamp(item.get("updated_at"), current_time),
"messages": messages,
**metadata(item),
"msg_seq": _non_negative_integer(item.get("msg_seq"), 0, "message sequence"),
"pinned": pinned,
"untitled": untitled,
@@ -458,7 +462,6 @@ def canonical_session_record(
),
"plan_path": plan_path,
"llm_no": llm_no,
"llm_history": llm_history,
}
+4 -7
View File
@@ -1,7 +1,4 @@
# Rust build artifacts
src-tauri/target/
src-tauri/gen/
# Node
node_modules/
package-lock.json
# Desktop is maintained separately. Local files are not part of this repository.
/*
!/.gitignore
!/README.md
-100
View File
@@ -1,100 +0,0 @@
# GenericAgent Desktop 2.0 integration boundary
GenericAgent Desktop 2.0 is a packaged Tauri desktop application with a generated React renderer and
Desktop-specific Python services. The React source is intentionally developed outside this upstream tree;
the generated distribution and all runtime interfaces required to execute it are tracked here.
## Renderer ownership
- `frontends/desktop/dist/**` contains the generated Desktop 2.0 HTML, JavaScript, CSS, fonts, and images.
- `frontends/desktop/static/**` is the independent Desktop v1 implementation and remains available unchanged.
- Tauri packages `dist/**`; it does not compile React during an upstream build.
- The public React source, issue tracker, and contribution home is
<https://github.com/abraxas914/GenericAgent>.
- The exact fork commit and generated-file content manifest are recorded in
`dist/build-provenance.json`.
Generated files must not be edited by hand. Renderer changes are made and tested in the fork, rebuilt from an
accepted fork `main` commit, and submitted upstream as a refreshed `dist/**` tree with matching provenance.
The manifest identifies the submitted bytes; it is not a claim that later builds are bit-for-bit reproducible.
The production Tauri configuration loads only the tracked asset origin and applies an explicit Content Security
Policy. React source tooling is absent from the upstream package path, while WebDriver permission remains isolated
to `tauri.e2e.conf.json` and is not granted by the production configuration.
## Desktop runtime ownership
Desktop 2.0 uses these repository-owned integration layers:
- `frontends/desktop_bridge.py`: local HTTP/WebSocket API, model/session/upload/data routes, service control,
identity, and Desktop diagnostics.
- `frontends/conductor.py`: Desktop collaboration and model-routing integration.
- `frontends/cost_tracker.py`: Desktop usage and cost ledger.
- `frontends/data_backup.py`: validated Desktop data export, inspection, and import/merge behavior.
- `frontends/desktop_settings.py`: locked, atomic read/modify/write updates for shared Desktop preferences.
- `frontends/desktop/src-tauri/**`: native bootstrap, permissions, file pickers, runtime/source switching,
process/port recovery, window behavior, and package resource resolution.
The package-owned bridge remains the executable service boundary. `GA_ROOT` can point it at a compatible
external GenericAgent repository, but does not replace the package-owned bridge or Tauri shell.
Desktop data import first backs up the complete destination `memory/**` tree, then applies source-wins memory
files. Model responses remain add-only, and Desktop sessions are de-duplicated by session ID. Activation is staged
and rolled back on failure. Import is rejected while a managed session or Desktop extra has unfinished work; users
must also stop any independent TUI, CLI, or automation process before importing because those external processes
are outside the bridge's maintenance gate. The persistent cost ledger is initialized by the Desktop bridge only;
existing TUI and conductor processes retain their previous in-memory accounting hot path.
Browser-origin requests are accepted only from the production Tauri origins, the fixed development origin, the
explicit E2E origin, or the bridge's own same origin. Native clients without an Origin remain supported, while
cross-site, null, lookalike, wrong-port, preflight, and WebSocket requests are rejected before route handling.
Backup exports cannot be written into any managed data or HTTP-readable directory.
Managed-service state is based on the bridge-owned live child process, not merely a listener on the configured
port. A foreign conductor on production port `8900` is reported as an external port conflict and is never stopped
or counted as an owned running extra. The alternate conductor port is available only to the isolated package E2E
journey; production renderer and CSP contracts remain fixed to `8900`.
On macOS, the package runtime uses a stable writable root and is refreshed through a package/build/source marker
with staged atomic activation. A previously shipped versioned runtime is migrated into that stable root. User
configuration, memory, responses, sessions, and token ledger data are preserved; a failed migration or activation
restores the previous runtime and marker. Matching markers keep the hot-start copy untouched.
## Core runtime boundary
Desktop 2.0 does not own or modify GenericAgent's Agent/LLM/Harness business runtime. In particular, the
integration does not change `agentmain.py`, LLM execution, Harness/Agent execution, inference, tool-calling,
or memory-scheduling semantics. Desktop bridge and conductor changes translate Desktop requests onto those
existing core contracts.
## Version and release contract
Desktop package metadata is `0.2.0` across npm, Cargo, Tauri, and generated provenance. Upstream packages consume
the tracked `dist/**` tree, so an upstream maintainer can build official Windows, Linux, and macOS artifacts
without the React source. A `desktop-portable-*` tag starts three read-only platform builders. One separate
publisher receives write permission only after all three succeed, validates the six expected files and checksums,
creates an invisible draft with all assets, and then exposes that single entry as a prerelease. Manual
`workflow_dispatch` runs produce candidate artifacts only and skip the publisher.
The Linux builder runs on Ubuntu 22.04, isolates Rust target/bin caches from newer runner ABIs, and rejects any
ELF requiring a GLIBC version newer than 2.35. Windows remains unsigned and documents SmartScreen plus checksum
verification; macOS remains ad-hoc signed and unnotarized.
The renderer still uses the existing local loopback bridge contract. This integration neither treats that inherited
platform requirement as a new release blocker nor claims to have changed operating-system loopback policy.
## Validation layers
- Compiled distribution contract: required entries, asset references, source-map/source leakage, E2E markers,
version consistency, exact provenance manifest, and the `dist` package entry.
- Python contracts: bridge, conductor, model routing, sessions, uploads, cost ledger, `GA_ROOT`, and data backup.
- Rust contracts: formatting, clippy, production and E2E feature tests, and
path/identity/port/diagnostic/bootstrap behavior.
- Native package contract: Linux Tauri build smoke plus the platform release workflow.
Optional platform release qualification lives under `frontends/desktop/release_qualification/**`.
Its automated evidence gate validates package behavior and cleanup; screenshots and manual visual checklists
remain separate release-owner review material rather than CI pass/fail inputs.
The richer React unit/browser/native E2E suites remain in the fork and run before its accepted `main` SHA is
used to refresh the generated upstream distribution.
+8
View File
@@ -0,0 +1,8 @@
# Desktop placeholder
The desktop application is maintained independently in a private repository.
Its source code and build artifacts are not included in this repository.
This directory is a placeholder, not a Git submodule or a repository link.
Desktop files may be placed here locally or by packaging tools; all contents
except this README and `.gitignore` are ignored by Git.
-66
View File
@@ -1,66 +0,0 @@
# GenericAgent React Desktop 2.0 — compiled distribution
This directory contains generated HTML, JavaScript, CSS, fonts, images, and license notices for the
GenericAgent React Desktop 2.0 renderer. It is build output, not the React development tree.
## Source and contributions
The public React source of truth and the place for renderer issues, pull requests, and design feedback is:
- <https://github.com/abraxas914/GenericAgent>
- Exact source used for this distribution:
[`21f12f6dfe57ada8572bb21fe6604caac230b1cf`](https://github.com/abraxas914/GenericAgent/commit/21f12f6dfe57ada8572bb21fe6604caac230b1cf)
Over the two-month React Desktop 2.0 development cycle, [abraxas914](https://github.com/abraxas914) led the new
renderer architecture and UI, Desktop bridge and Tauri integration, startup and recovery surfaces, package
validation, browser/native end-to-end coverage, renderer security hardening, and bundle optimization. Please
open an Issue or pull request in the fork above when proposing React renderer changes so source and generated
output stay synchronized.
[yiqi-017](https://github.com/yiqi-017) contributed user-facing help and feedback contacts that remain in the
compiled renderer, including the
[`help and feedback` settings work](https://github.com/abraxas914/GenericAgent/commit/5ddf03bb152666637bdfcfa44f1fac3cff5a66b6)
and [`startup recovery` support contacts](https://github.com/abraxas914/GenericAgent/commit/2fb55d944e4444b08cb9ad76c13aef7a5788186b).
He also produced an earlier
[`compiled-only delivery` prototype](https://github.com/abraxas914/GenericAgent/commit/3e7ca6a2b20eefdb3ee335dc0d520c3b6d9d57f8)
that helped establish this upstream packaging boundary. The current generated tree was rebuilt by abraxas914
from the exact merged source commit recorded above.
## Third-party software: Semi Design
This distribution contains code from these nine Semi Design packages, all resolved at version `2.101.0`:
- `@douyinfe/semi-animation`
- `@douyinfe/semi-animation-react`
- `@douyinfe/semi-animation-styled`
- `@douyinfe/semi-foundation`
- `@douyinfe/semi-icons`
- `@douyinfe/semi-illustrations`
- `@douyinfe/semi-json-viewer-core`
- `@douyinfe/semi-theme-default`
- `@douyinfe/semi-ui`
- Project: <https://github.com/DouyinFE/semi-design>
- Website: <https://semi.design>
- Copyright (c) 2021 DouyinFE
- License: MIT
The complete license text and bundled third-party notices are in
[`THIRD_PARTY_NOTICES.txt`](./THIRD_PARTY_NOTICES.txt) in this directory.
## Repository boundary
- `frontends/desktop/dist/**` is the generated React Desktop 2.0 renderer used by the packaged Tauri app.
- `frontends/desktop/static/**` remains the independent legacy Desktop v1 implementation; this distribution
neither replaces nor modifies its source files.
- The complete Desktop 2.0 integration also uses the repository's Desktop-specific bridge, conductor, cost
tracking, data-backup, bootstrap, permissions, and Tauri shell code.
- The integration does **not** modify GenericAgent's Agent, LLM, Harness, inference, tool-calling, or memory
scheduling core runtime.
- `build-provenance.json` records the source repository, exact source commit, generated file count, and a
content-manifest SHA-256. This README and the provenance file are excluded from that manifest. The manifest
identifies this exact generated tree; it is not a claim that later builds are bit-for-bit reproducible.
Upstream maintainers can package the tracked distribution directly without the React source. React changes
should be built and validated in the fork, then submitted here as a refreshed generated tree with updated
provenance and matching Desktop integration contracts.
-83
View File
@@ -1,83 +0,0 @@
MIT License
Copyright (c) 2021 DouyinFE
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The code implementation of the external library is referenced by DouyinFe are:
- animate.css
The MIT License (MIT)
Copyright (c) 2020 Daniel Eden
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- Ant Design
MIT LICENSE
Copyright (c) 2015-present Ant UED, https://xtech.antfin.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- rc-tree
MIT LICENSE
Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-1
View File
@@ -1 +0,0 @@
import{g as q}from"./tauri-compat-tfiFK9EG.js";var x,P;function Q(){if(P)return x;P=1;var i=4,t=.001,e=1e-7,s=10,n=11,a=1/(n-1),c=typeof Float32Array=="function";function l(u,o){return 1-3*o+3*u}function g(u,o){return 3*o-6*u}function T(u){return 3*u}function r(u,o,f){return((l(o,f)*u+g(o,f))*u+T(o))*u}function h(u,o,f){return 3*l(o,f)*u*u+2*g(o,f)*u+T(o)}function C(u,o,f,p,y){var m,_,F=0;do _=o+(f-o)/2,m=r(_,p,y)-u,m>0?f=_:o=_;while(Math.abs(m)>e&&++F<s);return _}function b(u,o,f,p){for(var y=0;y<i;++y){var m=h(o,f,p);if(m===0)return o;var _=r(o,f,p)-u;o-=_/m}return o}function d(u){return u}return x=function(o,f,p,y){if(!(0<=o&&o<=1&&0<=p&&p<=1))throw new Error("bezier x values must be in [0, 1] range");if(o===f&&p===y)return d;for(var m=c?new Float32Array(n):new Array(n),_=0;_<n;++_)m[_]=r(_*a,o,p);function F(v){for(var S=0,j=1,R=n-1;j!==R&&m[j]<=v;++j)S+=a;--j;var U=(v-m[j])/(m[j+1]-m[j]),A=S+U*a,k=h(A,o,p);return k>=t?b(v,A,o,p):k===0?A:C(v,S,S+a,o,p)}return function(S){return S===0?0:S===1?1:r(F(S),f,y)}},x}var K=Q();const z=q(K);function B(i,t,e){return Math.min(Math.max(i,t),e)}function W(i){const t=/\(([^)]+)\)/.exec(i);return t?t[1].split(",").map(e=>parseFloat(e)):[]}function V(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.5;const e=B(i,1,10),s=B(t,.1,2);return n=>n===0||n===1?n:-e*Math.pow(2,10*(n-1))*Math.sin((n-1-s/(Math.PI*2)*Math.asin(1/e))*(Math.PI*2)/s)}const N=(()=>{const i=["Quad","Cubic","Quart","Quint","Sine","Expo","Circ","Back","Elastic"],t={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],V],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],(s,n)=>a=>1-V(s,n)(1-a)],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],(s,n)=>a=>a<.5?V(s,n)(a*2)/2:1-V(s,n)(a*-2+2)/2]},e={linear:[.25,.25,.75,.75]};for(const s of Object.keys(t))t[s].forEach((n,a)=>{e["ease"+s+i[a]]=n});return e})();function D(i){if(typeof i=="function")return i;!i||typeof i!="string"?i="linear":i=i.trim();let t=i.split("(")[0];const e=W(i);let s;return t==="cubic-bezier"||t==="cubicBezier"?z(...e.length?e:N.linear):((!t||typeof t!="string"||typeof t=="string"&&N[t]==null)&&(t="linear"),s=N[t],typeof s=="function"?s(...e):e.length?z(...e):z(...s))}class Z{constructor(){this._eventMap=new Map}on(t,e){return t&&typeof e=="function"&&(this._eventMap.has(t)||this._eventMap.set(t,[]),this._eventMap.get(t).push(e)),this}once(t,e){var s=this;if(t&&typeof e=="function"){const n=function(){e(...arguments),s.off(t,n)};this.on(t,n)}}off(t,e){if(t)if(typeof e=="function"){const s=this._eventMap.get(t);if(Array.isArray(s)&&s.length){let n=-1;for(;(n=s.findIndex(a=>a===e))>-1;)s.splice(n,1)}}else e==null&&this._eventMap.delete(t);return this}emit(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];return this._eventMap.has(t)?(this._eventMap.get(t).forEach(a=>a(...s)),!0):!1}}function M(i){return!!(i&&typeof i=="object"&&(i.duration>0||typeof i.easing=="string"||typeof i.easing=="function"))}function H(i,t,e,s,n){for(const a of Object.keys(t)){const c=t[a],l=typeof c=="number"?c:c.val;if(!(typeof c=="object"&&c.done)){if(M(c)&&s&&n&&c.duration){if(c.duration+s<=n||l!==i[a])return!1}else if(typeof e[a]=="number"&&e[a]!==0)return!1;if(i[a]!==l)return!1}}return!0}function E(i){const t={};for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=typeof i[e]=="number"?i[e]:i[e].val);return t}const I=[0,0];function L(i,t,e,s,n,a,c){const l=-n*(t-s),g=-a*e,T=l+g,r=e+T*i,h=t+r*i;return Math.abs(r)<c&&Math.abs(h-s)<c?(I[0]=s,I[1]=0,I):(I[0]=h,I[1]=r,I)}function J(i){const t={},e=i&&Object.keys(i)||[];for(const s of e)t[s]=0;return t}const $={default:{tension:170,friction:26}},Y=Object.assign(Object.assign({},$.default),{precision:.01});function G(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(M(t)){const s=D(t.easing),n=typeof t.duration=="number"&&t.duration>0?t.duration:1e3;t=Object.assign(Object.assign({},t),{easing:s,duration:n})}let e=Object.assign(Object.assign(Object.assign({},Y),t),{done:!1});if(i&&typeof i=="object"&&"val"in i){if(M(i)){const s=D(i.easing),n=typeof i.duration=="number"&&i.duration>0?i.duration:parseInt(t.duration)||1e3;i=Object.assign(Object.assign({},i),{easing:s,duration:n})}e=Object.assign(Object.assign({},e),i)}else e=Object.assign(Object.assign({},e),{val:i});return e}const w=()=>Date.now(),O=1e3/60;class tt extends Z{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),this._props=Object.assign({},t),this._config=Object.assign({},e),this.initStates()}_wrapConfig(t,e){e=e&&typeof e=="object"?Line truncated
-1
View File
@@ -1 +0,0 @@
.collab-page{display:flex;width:100%;height:100%;overflow:hidden}.collab-main{flex:1;display:flex;flex-direction:column;min-width:0;position:relative}.collab-chat-area{flex:1;position:relative;min-height:0;overflow:hidden}.collab-offline{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;gap:.5rem;color:var(--semi-color-text-2, #4e5969)}.collab-offline-icon{font-size:2rem;opacity:.5}.collab-offline h3{margin:0;font-size:1rem;font-weight:600;color:var(--semi-color-text-0, #1c1f23)}.collab-offline p{margin:0;font-size:.8125rem}.collab-retry-btn{margin-top:.75rem;padding:.375rem 1rem;border:1px solid var(--semi-color-border, #e0e0e0);border-radius:.375rem;background:var(--semi-color-bg-0, #fff);color:var(--semi-color-text-0, #1c1f23);font-size:.8125rem;cursor:pointer;transition:background .12s}.collab-retry-btn:hover{background:var(--semi-color-fill-0, #f5f5f5)}.collab-connecting{display:flex;align-items:center;justify-content:center;height:100%;gap:.5rem;font-size:.8125rem;color:var(--semi-color-text-2, #4e5969);position:absolute;top:0;right:0;bottom:0;left:0}.collab-connecting-dot{width:8px;height:8px;border-radius:50%;background:var(--semi-color-primary, #3370ff);animation:statusPulse 1.2s ease-in-out infinite}.collab-empty{display:flex;align-items:center;justify-content:center;height:100%;color:var(--semi-color-text-3, #8f959e);font-size:.8125rem;position:absolute;top:0;right:0;bottom:0;left:0}.collab-welcome{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:2rem 0;gap:1rem}.collab-welcome-title{font-size:1.125rem;font-weight:600;color:var(--semi-color-text-0, #1c1f23);margin:0}.collab-welcome-sub{font-size:.8125rem;color:var(--semi-color-text-2, #4e5969);line-height:1.5;margin:0}.collab-welcome-steps{display:flex;flex-direction:column;gap:.75rem;width:100%;margin-top:.5rem}.collab-welcome-step{display:flex;align-items:flex-start;gap:.625rem}.collab-welcome-step-icon{display:flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border-radius:.375rem;background:var(--semi-color-fill-0, #f5f5f5);color:var(--semi-color-text-1, #1c1f23);flex-shrink:0}.collab-welcome-step-text{display:flex;flex-direction:column;gap:.125rem;padding-top:.1875rem}.collab-welcome-step-label{font-size:.8125rem;font-weight:600;color:var(--semi-color-text-0, #1c1f23)}.collab-welcome-step-desc{font-size:.75rem;color:var(--semi-color-text-2, #4e5969);line-height:1.4}.collab-welcome-chips{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.5rem}.collab-welcome-chip{display:inline-flex;align-items:center;padding:.375rem .625rem;border:1px solid var(--semi-color-border, #e0e0e0);border-radius:6px;background:none;color:var(--ui-text-secondary, #4e5969);font-size:.8125rem;font-weight:500;line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s,box-shadow .15s}.collab-welcome-chip:hover{background:color-mix(in srgb,var(--semi-color-primary, #3370ff) 4%,transparent);box-shadow:0 1px 4px color-mix(in srgb,var(--semi-color-primary, #3370ff) 12%,transparent)}.collab-welcome-chip:active{background:color-mix(in srgb,var(--semi-color-primary, #3370ff) 8%,transparent)}[data-slot=collab-page][data-empty] .collab-chat-area{display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:visible}[data-slot=collab-page][data-empty] .collab-welcome{position:relative;inset:unset;width:min(var(--composer-width, 48.75rem),calc(100% - 2rem))}[data-slot=collab-page][data-empty] .collab-composer-wrap{position:relative;width:min(var(--composer-width, 48.75rem),calc(100% - 2rem))}[data-slot=collab-page][data-empty] [data-slot=composer-root]{position:relative;bottom:auto;left:auto;transform:none;width:100%}[data-slot=collab-page][data-empty] [data-slot=composer-root]:before{display:none}[data-slot=collab-page][data-empty] [data-slot=composer-surface]{border-color:var(--semi-color-primary)!important;box-shadow:0 0 20px color-mix(in srgb,var(--semi-color-primary) 12%,transparent),0 0 50px -4px color-mix(in srgb,var(--semi-color-primary) 8%,transparent)!important}[data-slot=collab-messages]{position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:auto;padding:1rem;padding-bottom:calc(var(--composer-measured-height, 62px) + 1rem)}.collab-messages-scroll{display:flex;flex-direction:column;gap:.75rem;max-width:48rem;margin:0 auto}.collab-msg{display:flex}.collab-msg--user{justify-content:flex-end}.collab-msg--conductor,.collab-msg--system{justify-content:flex-start}.collab-bubble{max-width:80%;min-width:min(24rem,100%);padding:.5rem .75rem;border-radius:.75rem;font-size:.8125rem;line-height:1.5}.collab-bubble--user{background:#d3e0fd;color:#000;border-bottom-right-radius:.25rem;min-width:unset;word-break:break-word;white-space:pre-wrap}.collab-bubble--conductor{background:var(--semi-color-fill-0, #f5f5f5);color:var(--semi-color-text-0, #1c1f23);border-bLine truncated
-1
View File
@@ -1 +0,0 @@
import{b as r,aj as l}from"./tauri-compat-tfiFK9EG.js";import{H as i,b as N,J as C,K as S,L as M,N as T,O as v,M as E,P as W}from"./main-Knf6L_en.js";import{MarkdownPart as w}from"./MarkdownPart-Bhe_jloX.js";import"./index-Bpi3BHKj.js";import"./WindowsTitlebar-CrkUa1UM.js";import"./markdown-preprocess-Bvg4n8KE.js";function R(e){const c=Math.floor(e/1e3);if(c<60)return`${c}s`;const a=Math.floor(c/60),n=c%60;return`${a}m ${n}s`}function $({since:e}){const[c,a]=r.useState(Date.now());return r.useEffect(()=>{const n=setInterval(()=>a(Date.now()),1e3);return()=>clearInterval(n)},[]),l.jsx(l.Fragment,{children:R(c-e)})}const D=200;function P({message:e}){const c=e.role==="user",a=e.role==="conductor";return l.jsx("div",{className:`collab-msg collab-msg--${e.role}`,"data-slot":"collab-msg",children:l.jsxs("div",{className:`collab-bubble ${c?"collab-bubble--user":a?"collab-bubble--conductor":"collab-bubble--system"}`,children:[e.images&&e.images.length>0&&l.jsx("div",{className:"collab-msg-images",children:e.images.map((n,s)=>l.jsx("img",{src:n.base64||n.path,alt:n.name,className:"collab-msg-img"},s))}),e.files&&e.files.length>0&&l.jsx("div",{className:"collab-msg-files",children:e.files.map((n,s)=>l.jsx("span",{className:"collab-msg-file-chip",children:n.name},s))}),a||e.role==="system"?l.jsx(w,{content:e.msg}):l.jsx("span",{className:"collab-msg-text",children:e.msg})]})})}function B({since:e}){const{t:c}=N();return l.jsx("div",{className:"collab-msg collab-msg--conductor","data-slot":"collab-typing",children:l.jsxs("div",{className:"collab-thinking-bar",children:[l.jsx("span",{className:"collab-thinking-dot"}),l.jsx("span",{className:"collab-thinking-label",children:c("collab.typing")}),l.jsx("span",{className:"collab-thinking-time",children:l.jsx($,{since:e})})]})})}function I(){const e=i(o=>o.messages),c=i(o=>o.conductorTyping),a=i(o=>o.connectionStatus),{t:n}=N(),{scrollRef:s}=C(),[u,x]=r.useState(1),d=r.useRef(null),p=r.useRef(0);r.useEffect(()=>{(a==="connecting"||e.length===0)&&x(1)},[a,e.length]);const b=D*u,m=Math.max(0,e.length-b),k=e.slice(m),t=m,g=r.useCallback(()=>{const o=s.current;o&&(d.current=o.scrollHeight-o.scrollTop),x(h=>h+1)},[s]);r.useLayoutEffect(()=>{if(d.current==null)return;if(m>=p.current){d.current=null,p.current=m;return}const o=s.current;o&&(o.scrollTop=o.scrollHeight-d.current),d.current=null,p.current=m},[m,s]),r.useEffect(()=>{p.current=m},[m]);const j=[...e].reverse().find(o=>o.role==="user"),y=o=>o>1e12?o:o*1e3,f=r.useRef(Date.now());return j!=null&&j.ts&&(f.current=y(j.ts)),a==="connecting"?l.jsx("div",{className:"collab-messages-area","data-slot":"collab-messages",children:l.jsxs("div",{className:"collab-connecting",children:[l.jsx("span",{className:"collab-connecting-dot"}),l.jsx("span",{children:n("status.connecting")})]})}):e.length===0?l.jsx("div",{className:"collab-messages-area","data-slot":"collab-messages",children:l.jsx("div",{className:"collab-empty",children:l.jsx("p",{children:n("collab.placeholder")})})}):l.jsx("div",{className:"collab-messages-area","data-slot":"collab-messages",ref:s,children:l.jsxs("div",{className:"collab-messages-scroll",children:[t>0&&l.jsxs("button",{type:"button","data-slot":"show-earlier-btn",onClick:g,children:["Show ",t," earlier"]}),k.map((o,h)=>l.jsx(P,{message:o},o.id||m+h)),c&&l.jsx(B,{since:f.current})]})})}function F(){const e=i(t=>t.sendMessage),c=i(t=>t.conductorTyping),a=i(t=>t.connectionStatus),n=i(t=>t.modelConfig),s=i(t=>t.runtimeModel),u=i(t=>t.loadModel),x=i(t=>t.selectModel),d=S(t=>t.defaultModelNo);r.useEffect(()=>{u()},[u]);const p=r.useCallback((t,g)=>{var f,o;const j=(f=g==null?void 0:g.files)==null?void 0:f.map(h=>({name:h.name,path:h.path})),y=(o=g==null?void 0:g.images)==null?void 0:o.map(h=>({name:h.name,path:h.path,base64:h.base64}));e(t,j,y)},[e]),b=r.useCallback(()=>{},[]),m=a!=="ready",k=(n==null?void 0:n.effective)??(n==null?void 0:n.configured)??d;return l.jsx("div",{className:"collab-composer-wrap","data-slot":"collab-composer","data-disabled":m||void 0,children:l.jsx(M,{onSend:p,onStop:b,isGenerating:c,hideStatusStack:!0,modelControl:l.jsx(T,{selectedNo:k,runningNo:s!=null&&s.running?s.effective:null,isRunning:!!(s!=null&&s.running),onSelect:x})})})}const H=[{key:"1",icon:"comment"},{key:"2",icon:"symbol-misc"},{key:"3",icon:"graph"},{key:"4",icon:"edit"}],L=["collab.chipProgress","collab.chipPause","collab.chipSummary"];function O({onChipClick:e}){const{t:c}=N();return l.jsxs("div",{className:"collab-welcome","data-slot":"collab-welcome",children:[l.jsx("h2",{className:"collab-welcome-title",children:c("collab.guideTitle")}),l.jsx("p",{className:"collab-welcome-sub",children:c("collab.guideWhen")}),l.jsx("div",{className:"collab-welcome-steps",children:H.map(a=>l.jsxs("div",{className:"collab-welcome-step",children:[l.jsx("span",{className:"collab-welcome-step-icon",children:l.jsx(v,{name:a.icon,size:"1rem"})}),l.jsxs("span",{className:"collab-welcome-step-text",children:[l.jsx("span",{className:"collabLine truncated
-1
View File
@@ -1 +0,0 @@
import{c as t,b as e}from"./tauri-compat-tfiFK9EG.js";function n(a){return e.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},a),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2a1 1 0 0 0-1-1H6a2 2 0 0 0-2 2v18c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V10a1 1 0 0 0-1-1h-5a2 2 0 0 1-2-2V2ZM7 8a1 1 0 0 1 1-1h1a1 1 0 0 1 0 2H8a1 1 0 0 1-1-1Zm0 5a1 1 0 0 1 1-1h8a1 1 0 1 1 0 2H8a1 1 0 0 1-1-1Zm1 4a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2H8Zm11.07-9.5H14.5a1 1 0 0 1-1-1V1.93a.8.8 0 0 1 1.37-.56l4.76 4.76a.8.8 0 0 1-.56 1.37Z",fill:"currentColor"}))}const l=t(n,"file");export{l as I};
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-271
View File
@@ -1,271 +0,0 @@
var an=Object.defineProperty;var nn=(r,e,t)=>e in r?an(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var nr=(r,e,t)=>nn(r,typeof e!="symbol"?e+"":e,t);import{bs as ir,g as sn,b as a0,aj as U}from"./tauri-compat-tfiFK9EG.js";import{M as ln,r as on,a as un,b as cn,p as hn,S as dn}from"./markdown-preprocess-Bvg4n8KE.js";import{Q as sr,S as mn,U as pn}from"./main-Knf6L_en.js";import"./index-Bpi3BHKj.js";import"./WindowsTitlebar-CrkUa1UM.js";var at={exports:{}},lr;function fn(){return lr||(lr=1,(function(r){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/var t=(function(a){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,o={},u={manual:a.Prism&&a.Prism.manual,disableWorkerMessageHandler:a.Prism&&a.Prism.disableWorkerMessageHandler,util:{encode:function y(w){return w instanceof h?new h(w.type,y(w.content),w.alias):Array.isArray(w)?w.map(y):w.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(y){return Object.prototype.toString.call(y).slice(8,-1)},objId:function(y){return y.__id||Object.defineProperty(y,"__id",{value:++s}),y.__id},clone:function y(w,k){k=k||{};var A,T;switch(u.util.type(w)){case"Object":if(T=u.util.objId(w),k[T])return k[T];A={},k[T]=A;for(var O in w)w.hasOwnProperty(O)&&(A[O]=y(w[O],k));return A;case"Array":return T=u.util.objId(w),k[T]?k[T]:(A=[],k[T]=A,w.forEach(function(P,B){A[B]=y(P,k)}),A);default:return w}},getLanguage:function(y){for(;y;){var w=n.exec(y.className);if(w)return w[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,w){y.className=y.className.replace(RegExp(n,"gi"),""),y.classList.add("language-"+w)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(A){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(A.stack)||[])[1];if(y){var w=document.getElementsByTagName("script");for(var k in w)if(w[k].src==y)return w[k]}return null}},isActive:function(y,w,k){for(var A="no-"+w;y;){var T=y.classList;if(T.contains(w))return!0;if(T.contains(A))return!1;y=y.parentElement}return!!k}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(y,w){var k=u.util.clone(u.languages[y]);for(var A in w)k[A]=w[A];return k},insertBefore:function(y,w,k,A){A=A||u.languages;var T=A[y],O={};for(var P in T)if(T.hasOwnProperty(P)){if(P==w)for(var B in k)k.hasOwnProperty(B)&&(O[B]=k[B]);k.hasOwnProperty(P)||(O[P]=T[P])}var j=A[y];return A[y]=O,u.languages.DFS(u.languages,function(W,Y){Y===j&&W!=y&&(this[W]=O)}),O},DFS:function y(w,k,A,T){T=T||{};var O=u.util.objId;for(var P in w)if(w.hasOwnProperty(P)){k.call(w,P,w[P],A||P);var B=w[P],j=u.util.type(B);j==="Object"&&!T[O(B)]?(T[O(B)]=!0,y(B,k,null,T)):j==="Array"&&!T[O(B)]&&(T[O(B)]=!0,y(B,k,P,T))}}},plugins:{},highlightAll:function(y,w){u.highlightAllUnder(document,y,w)},highlightAllUnder:function(y,w,k){var A={callback:k,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};u.hooks.run("before-highlightall",A),A.elements=Array.prototype.slice.apply(A.container.querySelectorAll(A.selector)),u.hooks.run("before-all-elements-highlight",A);for(var T=0,O;O=A.elements[T++];)u.highlightElement(O,w===!0,A.callback)},highlightElement:function(y,w,k){var A=u.util.getLanguage(y),T=u.languages[A];u.util.setLanguage(y,A);var O=y.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&u.util.setLanguage(O,A);var P=y.textContent,B={element:y,language:A,grammar:T,code:P};function j(Y){B.highlightedCode=Y,u.hooks.run("before-insert",B),B.element.innerHTML=B.highlightedCode,u.hooks.run("after-highlight",B),u.hooks.run("complete",B),k&&k.call(B.element)}if(u.hooks.run("before-sanity-check",B),O=B.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!B.code){u.hooks.run("complete",B),k&&k.call(B.element);return}if(u.hooks.run("before-highlight",B),!B.grammar){j(u.util.encode(B.code));return}if(w&&a.Worker){var W=new Worker(u.filename);W.onmessage=function(Y){j(Y.data)},W.postMessage(JSON.stringify({language:B.language,code:B.code,immediateClose:!0}))}else j(u.highlight(B.code,B.grammar,B.language))},highlight:function(y,w,k){var A={code:y,grammar:w,language:k};if(u.hooks.run("before-tokenize",A),!A.grammar)throw new Error('The language "'+A.language+'" has no grammar.');return A.tokens=u.tokenize(A.code,A.grammar),u.hooks.run("after-tokenize",A),h.stringify(u.util.encode(A.tokens),A.language)},tokenize:function(y,w){var k=w.rest;if(k){for(var A in k)w[A]=k[A];delete w.rest}var T=new g;return S(T,T.head,y),p(y,T,w,T.head,0),D(T)},hooks:{all:{},add:function(y,w){var k=u.hooks.all;k[y]=k[y]||[],k[y].push(w)},run:function(y,w){var k=u.hooks.all[y];if(!(!k||!k.length))for(var A=0,T;T=k[A++];)T(w)}},Token:h};a.Prism=u;function h(y,w,k,A){this.type=y,this.content=w,this.alias=k,this.length=(A||"").length|0}h.stringify=function y(w,k){if(typeof w=="string")return w;if(Array.isArray(w)){var A="";return w.forEach(function(j){A+=y(j,k)}),A}var T={type:w.type,content:y(w.content,k),tag:"span",classes:["token",w.type],attributes:{},language:k},O=w.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(T.classes,O):T.classes.push(O)),u.hooks.run("wrap",T);var P="";for(var B in T.attributes)P+=" "+B+'="'+(T.attributes[B]||"").replace(/"/g,"&quot;")+'"';return"<"+T.tag+' class="'+T.classes.join(" ")+'"'+P+">"+T.content+"</"+T.tag+">"};function m(y,w,k,A){y.lastIndex=w;var T=y.exec(k);if(T&&A&&T[1]){var O=T[1].length;T.indexLine truncated
`),M.hasAttribute("data-start")||M.setAttribute("data-start",String(B+1))}R.textContent=T,t.highlightElement(R)},function(T){M.setAttribute(u,p),R.textContent=T})}}),t.plugins.fileHighlight={highlight:function(M){for(var R=(M||document).querySelectorAll(g),y=0,w;w=R[y++];)t.highlightElement(w)}};var D=!1;t.fileHighlight=function(){D||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),D=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(at)),at.exports}var vn=fn();const $e=sn(vn);(function(r){var e=r.util.clone(r.languages.javascript),t=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,a=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,n=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function s(h,m){return h=h.replace(/<S>/g,function(){return t}).replace(/<BRACES>/g,function(){return a}).replace(/<SPREAD>/g,function(){return n}),RegExp(h,m)}n=s(n).source,r.languages.jsx=r.languages.extend("markup",e),r.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),r.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,r.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,r.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,r.languages.jsx.tag.inside.comment=e.comment,r.languages.insertBefore("inside","attr-name",{spread:{pattern:s(/<SPREAD>/.source),inside:r.languages.jsx}},r.languages.jsx.tag),r.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:r.languages.jsx}}},r.languages.jsx.tag);var o=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(o).join(""):""},u=function(h){for(var m=[],p=0;p<h.length;p++){var g=h[p],S=!1;if(typeof g!="string"&&(g.type==="tag"&&g.content[0]&&g.content[0].type==="tag"?g.content[0].content[0].content==="</"?m.length>0&&m[m.length-1].tagName===o(g.content[0].content[1])&&m.pop():g.content[g.content.length-1].content==="/>"||m.push({tagName:o(g.content[0].content[1]),openedBraces:0}):m.length>0&&g.type==="punctuation"&&g.content==="{"?m[m.length-1].openedBraces++:m.length>0&&m[m.length-1].openedBraces>0&&g.type==="punctuation"&&g.content==="}"?m[m.length-1].openedBraces--:S=!0),(S||typeof g=="string")&&m.length>0&&m[m.length-1].openedBraces===0){var x=o(g);p<h.length-1&&(typeof h[p+1]=="string"||h[p+1].type==="plain-text")&&(x+=o(h[p+1]),h.splice(p+1,1)),p>0&&(typeof h[p-1]=="string"||h[p-1].type==="plain-text")&&(x=o(h[p-1])+x,h.splice(p-1,1),p--),h[p]=new r.Token("plain-text",x,null,x)}g.content&&typeof g.content!="string"&&u(g.content)}};r.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||u(h.tokens)})})(Prism);(function(r){var e=r.util.clone(r.languages.typescript);r.languages.tsx=r.languages.extend("jsx",e),delete r.languages.tsx.parameter,delete r.languages.tsx["literal-property"];var t=r.languages.tsx.tag;t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0})(Prism);Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var a={};a["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},a.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:a} Line truncated
?|
|(?![\\s\\S])))+`,"m"),alias:n,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(t)[0]}}}}),Object.defineProperty(r.languages.diff,"PREFIXES",{value:e})})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};var or={},ur;function gn(){return ur||(ur=1,(function(r){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,t=0;t<2;t++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),r.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|boxLine truncated
`),t=[];let a=0,n=0;for(const s of e){if(s.startsWith("diff --git")||s.startsWith("index ")||s.startsWith("--- ")||s.startsWith("+++ ")||s.startsWith("new file")||s.startsWith("deleted file")||s.startsWith("similarity index")||s.startsWith("rename from")||s.startsWith("rename to"))continue;const o=s.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);if(o){a=parseInt(o[1],10),n=parseInt(o[2],10),t.push({kind:"header",text:s});continue}if(s.startsWith("+"))t.push({kind:"add",text:s.slice(1),newLine:n++});else if(s.startsWith("-"))t.push({kind:"remove",text:s.slice(1),oldLine:a++});else{const u=s.startsWith(" ")?s.slice(1):s;t.push({kind:"context",text:u,oldLine:a++,newLine:n++})}}return t}const Rn=a0.memo(function({code:e}){const t=a0.useMemo(()=>Cn(e),[e]);return U.jsx("div",{"data-slot":"diff-block",children:t.map((a,n)=>U.jsxs("div",{"data-slot":"diff-line","data-diff-kind":a.kind,children:[a.kind!=="header"&&U.jsxs("span",{"data-slot":"diff-gutter",children:[U.jsx("span",{"data-slot":"diff-line-old",children:a.oldLine??""}),U.jsx("span",{"data-slot":"diff-line-new",children:a.newLine??""})]}),U.jsxs("span",{"data-slot":"diff-content",children:[a.kind==="add"&&U.jsx("span",{"data-slot":"diff-sign",children:"+"}),a.kind==="remove"&&U.jsx("span",{"data-slot":"diff-sign",children:"-"}),a.text]})]},n))})});class F extends Error{constructor(e,t){var a="KaTeX parse error: "+e,n,s,o=t&&t.loc;if(o&&o.start<=o.end){var u=o.lexer.input;n=o.start,s=o.end,n===u.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var h=u.slice(n,s).replace(/[^]/g,"$&̲"),m;n>15?m="…"+u.slice(n-15,n):m=u.slice(0,n);var p;s+15<u.length?p=u.slice(s,s+15)+"…":p=u.slice(s),a+=m+h+p}super(a),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,F.prototype),this.position=n,n!=null&&s!=null&&(this.length=s-n),this.rawMessage=e}}var Fn=/([A-Z])/g,In=r=>r.replace(Fn,"-$1").toLowerCase(),Dn={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Nn=/[&><"']/g,c0=r=>String(r).replace(Nn,e=>Dn[e]),Pe=r=>r.type==="ordgroup"||r.type==="color"?r.body.length===1?Pe(r.body[0]):r:r.type==="font"?Pe(r.body):r,Bn=new Set(["mathord","textord","atom"]),_0=r=>Bn.has(Pe(r).type),On=r=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(r);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},xt={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro e Line truncated
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+e/2.075+" -"+e+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+e)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Wn=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+e/2.084+" -"+e+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+e)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Yn=function(e,t){return"M983 "+(10+e+t)+`
l`+e/3.13+" -"+e+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Zn=function(e,t){return"M424,"+(2398+e+t)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+e)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+`
h400000v`+(40+e)+"h-400000z"},Kn=function(e,t){return"M473,"+(2713+e+t)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},Jn=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},Qn=function(e,t,a){var n=a-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+`
H742v`+n+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},ei=function(e,t,a){t=1e3*t;var n="";switch(e){case"sqrtMain":n=Vn(t,ce);break;case"sqrtSize1":n=Wn(t,ce);break;case"sqrtSize2":n=Yn(t,ce);break;case"sqrtSize3":n=Zn(t,ce);break;case"sqrtSize4":n=Kn(t,ce);break;case"sqrtTall":n=Qn(t,ce,a)}return n},ti=function(e,t){switch(e){case"⎜":return l0("M291 0 H417 V"+t+" H291z");case"∣":return l0("M145 0 H188 V"+t+" H145z");case"∥":return l0("M145 0 H188 V"+t+" H145z")+l0("M367 0 H410 V"+t+" H367z");case"⎟":return l0("M457 0 H583 V"+t+" H457z");case"⎢":return l0("M319 0 H403 V"+t+" H319z");case"⎥":return l0("M263 0 H347 V"+t+" H263z");case"⎪":return l0("M384 0 H504 V"+t+" H384z");case"⏐":return l0("M312 0 H355 V"+t+" H312z");case"‖":return l0("M257 0 H300 V"+t+" H257z")+l0("M478 0 H521 V"+t+" H478z");default:return""}},yr={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:l0("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:l0("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:l0("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:l0("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:l0("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:l0("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:l0("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:l0("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},ri=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 v84 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z
M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z
M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function ai(r){return"toText"in r}class fe{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(ai(e))return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}var St={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},ni={ex:!0,em:!0,mu:!0},sa=function(e){return typeof e!="string"&&(e=e.unit),e in St||e in ni||e==="ex"},t0=function(e,t){var a;if(e.unit in St)a=St[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")a=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")a=n.fontMetrics().xHeight;else if(e.unit==="em")a=n.fontMetrics().quad;else throw new F("Invalid unit: '"+e.unit+"'");n!==t&&(a*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*a,t.maxSize)},N=function(e){return+e.toFixed(4)+"em"},K0=function(e){return e.filter(t=>t).join(" ")},$t=function(e){var t="";for(var a of Object.keys(e)){var n=e[a];n!==void 0&&(t+=In(a)+":"+n+";")}return t},la=function(e,t,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},oa=function(e){var t=document.createElement(e);t.className=K0(this.classes),Object.assign(t.style,this.style);for(var a of Object.keys(this.attributes))t.setAttribute(a,this.attributes[a]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t},ii=/[\s"'>/=\x00-\x1f]/,ua=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+c0(K0(this.classes))+'"');var a=$t(this.style);a&&(t+=' style="'+c0(a)+'"');for(var n of Object.keys(this.attributes)){if(ii.test(n))throw new F("Invalid attribute name '"+n+"'");t+=" "+n+'="'+c0(this.attributes[n])+'"'}t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+="</"+e+">",t};class ve{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,la.call(this,e,a,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return oa.call(this,"span")}toMarkup(){return ua.call(this,"span")}}class je{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,la.call(this,t,n),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return oa.call(this,"a")}toMarkup(){return ua.call(this,"a")}}class si{constructor(e,t,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=a}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e='<img src="'+c0(this.src)+'"'+(' alt="'+c0(this.alt)+'"'),t=$t(this.style);return t&&(e+=' style="'+c0(t)+'"'),e+="'/>",e}}var li={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class A0{constructor(e,t,a,n,s,o,u,h){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=a||0,this.italic=n||0,this.skew=s||0,this.width=o||0,this.classes=u||[],this.style=h||{},this.maxFontSize=0;var m=Xn(this.text.charCodeAt(0));m&&this.classes.push(m+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=li[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement("span"),t.style.marginRight=N(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=K0(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=c0(K0 Line truncated
`+T+" children.");for(var B=0;B<T;B++){var j=new J0(y[B]),W=new $0([j],{width:"400em",height:N(A),viewBox:"0 0 "+u+" "+k,preserveAspectRatio:P[B]+" slice"}),Y=Q0([O[B]],[W],t);if(T===1)return{span:Y,minWidth:w,height:A};Y.style.height=N(A),M.push(Y)}return{span:C(["stretchy"],M,t),minWidth:w,height:A}}}var{span:n,minWidth:s,height:o}=a();return n.height=o,n.style.height=N(o),s>0&&(n.style.minWidth=N(s)),n},Bi=function(e,t,a,n,s){var o,u=e.height+e.depth+a+n;if(/fbox|color|angl/.test(t)){if(o=C(["stretchy",t],[],s),t==="fbox"){var h=s.color&&s.getColor();h&&(o.style.borderColor=h)}}else{var m=[];/^[bx]cancel$/.test(t)&&m.push(new kt({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&m.push(new kt({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var p=new $0(m,{width:"100%",height:N(u)});o=Q0([],[p],s)}return o.height=u,o.style.height=N(u),o},Oi={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Li={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function qi(r){return r in Oi}function G(r,e){if(!r||r.type!==e)throw new Error("Expected node of type "+e+", but got "+(r?"node of type "+r.type:String(r)));return r}function Ze(r){var e=Ke(r);if(!e)throw new Error("Expected node of symbol group type, but got "+(r?"node of type "+r.type:String(r)));return e}function Ke(r){return r&&(r.type==="atom"||Li.hasOwnProperty(r.type))?r:null}var wa=r=>{if(r instanceof A0)return r;if(ci(r)&&r.children.length===1)return wa(r.children[0])},Sa=(r,e)=>{var t,a,n;r&&r.type==="supsub"?(a=G(r.base,"accent"),t=a.base,r.base=t,n=ui(V(r,e)),r.base=a):(a=G(r,"accent"),t=a.base);var s=V(t,e.havingCrampedStyle()),o=a.isShifty&&_0(t),u=0;if(o){var h,m;u=(h=(m=wa(s))==null?void 0:m.skew)!=null?h:0}var p=a.label==="\\c",g=p?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),S;if(a.isStretchy)S=Ye(a,e),S=X({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:S,wrapperClasses:["svg-align"],wrapperStyle:u>0?{width:"calc(100% - "+N(2*u)+")",marginLeft:N(2*u)}:void 0}]});else{var x,D;a.label==="\\vec"?(x=pa("vec",e),D=ma.vec[1]):(x=Ve({type:"textord",mode:a.mode,text:a.label},e),x=oi(x),x.italic=0,D=x.width,p&&(g+=x.depth)),S=C(["accent-body"],[x]);var E=a.label==="\\textcircled";E&&(S.classes.push("accent-full"),g=s.height);var M=u;E||(M-=D/2),S.style.left=N(M),a.label==="\\textcircled"&&(S.style.top=".2em"),S=X({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-g},{type:"elem",elem:S}]})}var R=C(["mord","accent"],[S],e);return n?(n.children[0]=R,n.height=Math.max(R.height,n.height),n.classes[0]="mord",n):R},Pi=(r,e)=>{var t=r.isStretchy?We(r.label):new I("mo",[z0(r.label,r.mode)]),a=new I("mover",[Z(r.base,e),t]);return a.setAttribute("accent","true"),a},Hi=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));L({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],numArgs:1,handler:(r,e)=>{var t=Ue(e[0]),a=!Hi.test(r.funcName),n=!a||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:a,isShifty:n,base:t}},htmlBuilder:Sa,mathmlBuilder:Pi});L({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"],handler:(r,e)=>{var t=e[0],a=r.parser.mode;return a==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:r.funcName,isStretchy:!1,isShifty:!0,base:t}}});L({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],numArgs:1,handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"accentUnder",mode:t.mode,label:a,base:n}},htmlBuilder:(r,e)=>{var t=V(r.base,e),a=Ye(r,e),n=r.label==="\\utilde"?.12:0,s=X({positionType:"top",positionData:t.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]});return C(["mord","accentunder"],[s],e)},mathmlBuilder:(r,e)=>{var t=We(r.label),a=new I("munder",[Z(r.base,e),t]);return a.setAttribute("accentunder","true"),a}});var Be=r=>{var e=new I("mpadded",r?[r]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};L({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleLine truncated
]`,ks="\\\\[a-zA-Z@]+",As="\\\\[^\uD800-\uDFFF]",Ts="("+ks+")"+Ua+"*",Es=`\\\\(
|[ \r ]+
?)[ \r ]*`,qt="[̀-ͯ]",Ms=new RegExp(qt+"+$"),zs="("+Ua+"+)|"+(Es+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(qt+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(qt+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Ts)+("|"+As+")");class Jr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(zs,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new k0("EOF",new g0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new F("Unexpected character: '"+e[t]+"'",new k0(e[t],new g0(this,t,t+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var s=e.indexOf(`
`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new k0(n,new g0(this,t,this.tokenRegex.lastIndex))}}class Cs{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new F("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var Rs=Na;d("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});d("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});d("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});d("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});d("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});d("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");d("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Qr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};d("\\char",function(r){var e=r.popToken(),t,a=0;if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new F("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=Qr[e.text],a==null||a>=t)throw new F("Invalid base-"+t+" digit "+e.text);for(var n;(n=Qr[r.future().text])!=null&&n<t;)a*=t,a+=n,r.popToken()}return"\\@char{"+a+"}"});var Zt=(r,e,t,a)=>{var n=r.consumeArg().tokens;if(n.length!==1)throw new F("\\newcommand's first argument must be a macro name");var s=n[0].text,o=r.isDefined(s);if(o&&!e)throw new F("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!o&&!t)throw new F("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var u=0;if(n=r.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var h="",m=r.expandNextToken();m.text!=="]"&&m.text!=="EOF";)h+=m.text,m=r.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new F("Invalid number of arguments: "+h);u=parseInt(h),n=r.consumeArg().tokens}return o&&a||r.macros.set(s,{tokens:n,numArgs:u}),""};d("\\newcommand",r=>Zt(r,!1,!0,!1));d("\\renewcommand",r=>Zt(r,!0,!1,!1));d("\\providecommand",r=>Zt(r,!0,!0,!0));d("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});d("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});d("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),Z0[t],K.math[t],K.text[t]),""});d("\\bgroup","{");d("\\egroup","}");d("~","\\nobreakspace");d("\\lq","`");d("\\rq","'");d("\\aa","\\r a");d("\\AA","\\r A");d("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");d("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");d("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");d("ℬ","\\mathscr{B}");d("ℰ","\\mathscr{E}");d("ℱ","\\mathscr{F}");d("ℋ","\\mathscr{H}");d("ℐ","\\mathscr{I}");d("ℒ","\\mathscr{L}");d("ℳ","\\mathscr{M}");d("ℛ","\\mathscr{R}");d("ℭ","\\mathfrak{C}");d("ℌ","\\mathfrak{H}");d("ℨ","\\mathfrak{Z}");d("\\Bbbk","\\Bbb{k}");d("\\llap","\\mathllap{\\textrm{#1}}");d("\\rlap","\\mathrlap{\\textrm{#1}}");d("\\clap","\\mathclap{\\textrm{#1}}");d("\\mathstrut","\\vphantom{(}");d("\\underbar","\\underline{\\text{#1}}");d("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');d("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");d("\\ne","\\neq");d("≠","\\neq");d("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");d("∉","\\notin");d("≘","\\htmLine truncated
please report what input caused this bug`);return a=a.slice(1,-1),{type:"verb",mode:"text",body:a,star:n}}ra.hasOwnProperty(t[0])&&!K[this.mode][t[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=ra[t[0]]+t.slice(1));var s=Ms.exec(t);s&&(t=t.substring(0,s.index),t==="i"?t="ı":t==="j"&&(t="ȷ"));var o;if(K[this.mode][t]){this.settings.strict&&this.mode==="math"&&At.includes(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var u=K[this.mode][t].group,h=g0.range(e),m;qi(u)?m={type:"atom",mode:this.mode,family:u,loc:h,text:t}:m={type:u,mode:this.mode,loc:h,text:t},o=m}else if(t.charCodeAt(0)>=128)this.settings.strict&&(ia(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:g0.range(e),text:t};else return null;if(this.consume(),s)for(var p=0;p<s[0].length;p++){var g=s[0][p];if(!yt[g])throw new F("Unknown accent ' "+g+"'",e);var S=yt[g][this.mode]||yt[g].text;if(!S)throw new F("Accent "+g+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:g0.range(e),label:S,isStretchy:!1,isShifty:!0,base:o}}return o}}tt.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var Jt=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var a=new tt(e,t);delete a.gullet.macros.current["\\df@tag"];var n=a.parse();if(delete a.gullet.macros.current["\\current@color"],delete a.gullet.macros.current["\\color"],a.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new F("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:a.subparse([new k0("\\df@tag")])}]}return n},Wa=function(e,t,a){t.textContent="";var n=Qt(e,a).toNode();t.appendChild(n)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Wa=function(){throw new F("KaTeX doesn't work in quirks mode.")});var Ds=function(e,t){var a=Qt(e,t).toMarkup();return a},Ns=function(e,t){var a=new Pt(t);return Jt(e,a)},Ya=function(e,t,a){if(a.throwOnError||!(e instanceof F))throw e;var n=C(["katex-error"],[new A0(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+a.errorColor),n},Qt=function(e,t){var a=new Pt(t);try{var n=Jt(e,a);return Ri(n,e,a)}catch(s){return Ya(s,e,a)}},Bs=function(e,t){var a=new Pt(t);try{var n=Jt(e,a);return Fi(n,e,a)}catch(s){return Ya(s,e,a)}},Os="0.17.0",Ls={Span:ve,Anchor:je,SymbolNode:A0,SvgNode:$0,PathNode:J0,LineNode:kt},aa={version:Os,render:Wa,renderToString:Ds,ParseError:F,SETTINGS_SCHEMA:xt,__parse:Ns,__renderToDomTree:Qt,__renderToHTMLTree:Bs,__setFontMetrics:hi,__defineSymbol:i,__defineFunction:L,__defineMacro:d,__domTree:Ls};const qs=512;class Ps{constructor(){nr(this,"map",new Map)}get(e){const t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}set(e,t){if(this.map.has(e))this.map.delete(e);else if(this.map.size>=qs){const a=this.map.keys().next().value;a!==void 0&&this.map.delete(a)}this.map.set(e,t)}get size(){return this.map.size}}const qe=new Ps;function Hs(r,e){return`d\0${e}`}function $s(r,e,t={}){const a=Hs(e,r),n=qe.get(a);if(n!==void 0)return n;const{errorColor:s="var(--semi-color-text-2)",macros:o}=t;let u;try{return u=aa.renderToString(r,{displayMode:e,throwOnError:!0,macros:o,trust:sr}),qe.set(a,u),u}catch{}try{return u=aa.renderToString(r,{displayMode:e,throwOnError:!1,strict:"ignore",errorColor:s,macros:o,trust:sr}),qe.set(a,u),u}catch{}return u=`<span class="katex-error" style="color:${s}" title="KaTeX parse error">${_s(r)}</span>`,qe.set(a,u),u}function _s(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}const Gs=a0.memo(function({expr:e}){const t=$s(e,!0);return U.jsx("div",{"data-slot":"math-display",dangerouslySetInnerHTML:{__html:t}})}),na=200,Us=a0.memo(function({text:e}){const t=a0.useMemo(()=>{const a=e.split(`
`),n=[];for(let s=0;s<a.length;s+=na)n.push(a.slice(s,s+na).join(`
`));return n},[e]);return U.jsx("div",{"data-slot":"huge-text-fallback",children:t.map((a,n)=>U.jsx("pre",{style:{contentVisibility:"auto",containIntrinsicSize:"0 400px",margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:"var(--font-mono, monospace)",fontSize:"var(--font-size-code, 13px)",lineHeight:1.5},children:a},n))})}),js=500,Xs=30,Vs=33,Ws=5e3;function Ys(r,e){const[t,a]=a0.useState(r),n=a0.useRef(r),s=a0.useRef(0),o=a0.useRef(null),u=a0.useRef(r);return u.current=r,a0.useEffect(()=>{if(!e){o.current!==null&&(cancelAnimationFrame(o.current),o.current=null),n.current=r,a(r);return}if(!r.startsWith(n.current)){n.current=r,a(r);return}if(r.length-n.current.length>Ws){n.current=r,a(r);return}function h(){o.current=null;const m=performance.now();if(m-s.current<Vs){o.current=requestAnimationFrame(h);return}const p=u.current,g=p.length-n.current.length;if(g<=0)return;const S=Math.max(1,Math.ceil(js/16.67)),x=Math.min(Xs,Math.ceil(g/S));n.current=p.slice(0,n.current.length+x),a(n.current),s.current=m,n.current.length<p.length&&(o.current=requestAnimationFrame(h))}return n.current.length<r.length&&o.current===null&&(o.current=requestAnimationFrame(h)),()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)}},[r,e]),e?t:r}const Zs={macros:{"\\vline":"\\vert","\\R":"\\mathbb{R}","\\N":"\\mathbb{N}","\\Z":"\\mathbb{Z}","\\Q":"\\mathbb{Q}","\\C":"\\mathbb{C}","\\norm":"\\left\\lVert #1 \\right\\rVert","\\abs":"\\left\\lvert #1 \\right\\rvert"},...pn,errorColor:"var(--semi-color-text-2)"},Ks=15e4;function Js(r){return{...dn,pre({children:e}){return U.jsx(U.Fragment,{children:e})},code({className:e,children:t}){const a=/language-(\w+)/.exec(e||""),n=String(t).replace(/\n$/,"");return a?a[1]==="math"?U.jsx(Gs,{expr:n}):a[1]==="diff"?U.jsx(Rn,{code:n}):U.jsx(br,{language:a[1],code:n,isStreaming:r}):n.includes(`
`)?U.jsx(br,{code:n,isStreaming:r}):U.jsx("code",{className:e,children:t})},table({children:e}){return U.jsx("div",{"data-slot":"md-table-wrap",children:U.jsx("table",{children:e})})}}}const i1=a0.memo(function({content:e,isStreaming:t=!1}){const a=a0.useMemo(()=>Js(t),[t]),n=Ys(e,t),s=a0.useDeferredValue(n);return s.length>Ks?U.jsx("div",{"data-slot":"aui_markdown-part",children:U.jsx(Us,{text:s})}):U.jsx("div",{"data-slot":"aui_markdown-part",children:U.jsx(ln,{remarkPlugins:[un,cn],rehypePlugins:[[on,Zs]],components:a,urlTransform:mn,children:hn(s)})})});export{i1 as MarkdownPart};
@@ -1 +0,0 @@
[data-slot=code-card]{position:relative;margin:.5rem 0;border-radius:.375rem;border:1px solid var(--semi-color-border);background:var(--semi-color-fill-0);overflow:hidden}[data-slot=code-card-header]{display:flex;align-items:center;justify-content:space-between;padding:.25rem .5rem;border-bottom:1px solid var(--semi-color-border);background:color-mix(in srgb,var(--semi-color-fill-0) 60%,var(--semi-color-bg-0));min-height:1.5rem}[data-slot=code-card-lang]{font-size:.6875rem;font-family:SF Mono,Cascadia Code,Fira Code,monospace;color:var(--semi-color-text-2);text-transform:lowercase}[data-slot=code-card-copy]{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border:none;border-radius:.25rem;background:transparent;color:var(--semi-color-text-2);cursor:pointer;opacity:.55;transition:opacity .12s,background .12s}[data-slot=code-card-copy]:hover{opacity:1;background:var(--semi-color-fill-1)}[data-slot=code-card-body]{position:relative;padding:.625rem .75rem;overflow-x:auto;overflow-y:auto;max-height:7.5rem;font-family:SF Mono,Cascadia Code,Fira Code,monospace;font-size:.7rem;line-height:1.6;color:var(--semi-color-text-0);white-space:pre;-moz-tab-size:2;tab-size:2}[data-slot=code-card-body][data-expanded]{max-height:40dvh}[data-slot=code-card-expand]{position:absolute;inset-inline:0;bottom:0;display:flex;height:1.75rem;cursor:pointer;align-items:flex-end;justify-content:center;padding-bottom:.25rem;border:none;background:linear-gradient(to top,var(--semi-color-fill-0),transparent);color:var(--ui-text-tertiary);transition:color .12s ease-out}[data-slot=code-card-expand]:hover{color:var(--foreground)}[data-slot=code-card-expand] svg{width:.875rem;height:.875rem;transition:transform .15s ease-out}[data-slot=code-card-body][data-expanded]+[data-slot=code-card-expand]{background:none}[data-slot=code-card-body][data-expanded]+[data-slot=code-card-expand] svg{transform:rotate(180deg)}[data-slot=code-card-body] code{font-family:inherit;font-size:inherit;background:none!important;padding:0;display:block}[data-slot=code-card][data-streaming]{animation:code-card-glow 1.8s ease-in-out infinite alternate;border-color:color-mix(in srgb,var(--semi-color-primary) 24%,var(--semi-color-border))}[data-slot=code-card][data-streaming] [data-slot=code-card-body]{mask-image:linear-gradient(to bottom,#000,#000 calc(100% - 1.5rem),#00000080);-webkit-mask-image:linear-gradient(to bottom,black 0%,black calc(100% - 1.5rem),rgba(0,0,0,.5) 100%)}@keyframes code-card-glow{0%{box-shadow:0 0 0 .5px color-mix(in srgb,var(--semi-color-primary) 10%,transparent)}to{box-shadow:0 0 0 .5px color-mix(in srgb,var(--semi-color-primary) 10%,transparent),0 .5rem 1.5rem color-mix(in srgb,var(--semi-color-primary) 6%,transparent)}}:root{--code-keyword: #d73a49;--code-string: #032f62;--code-comment: #6a737d;--code-function: #6f42c1;--code-number: #005cc5;--code-operator: #d73a49;--code-class-name: #6f42c1;--code-punctuation: #24292e;--code-property: #005cc5;--code-builtin: #e36209;--code-attr-name: #6f42c1;--code-attr-value: #032f62;--code-tag: #22863a;--code-selector: #22863a;--code-inserted: #22863a;--code-deleted: #d73a49}[data-appearance=dark]{--code-keyword: #ff7b72;--code-string: #a5d6ff;--code-comment: #8b949e;--code-function: #d2a8ff;--code-number: #79c0ff;--code-operator: #ff7b72;--code-class-name: #f0c674;--code-punctuation: #c9d1d9;--code-property: #79c0ff;--code-builtin: #ffa657;--code-attr-name: #d2a8ff;--code-attr-value: #a5d6ff;--code-tag: #7ee787;--code-selector: #7ee787;--code-inserted: #7ee787;--code-deleted: #ff7b72}.token.keyword,.token.control,.token.directive,.token.important{color:var(--code-keyword)}.token.string,.token.template-string,.token.url{color:var(--code-string)}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:var(--code-comment);font-style:italic}.token.function{color:var(--code-function)}.token.number,.token.boolean{color:var(--code-number)}.token.operator,.token.entity{color:var(--code-operator)}.token.class-name,.token.maybe-class-name{color:var(--code-class-name)}.token.punctuation{color:var(--code-punctuation)}.token.property,.token.constant,.token.variable{color:var(--code-property)}.token.builtin,.token.symbol{color:var(--code-builtin)}.token.attr-name{color:var(--code-attr-name)}.token.attr-value{color:var(--code-attr-value)}.token.tag{color:var(--code-tag)}.token.selector{color:var(--code-selector)}.token.inserted{color:var(--code-inserted)}.token.deleted{color:var(--code-deleted);text-decoration:line-through}.token.italic{font-style:italic}.token.bold{font-weight:700}[data-slot=diff-block]{margin:.5rem 0;border-radius:.375rem;border:1px solid var(--semi-color-border);overflow-x:auto;overscroll-behavior-x:contain;font-family:SF Mono,Cascadia Code,Fira Code,monospace;font-size:var(--font-size-code, 13px);line-height:1.375rem}[data-slot=diff-line]{display:flex;padding:0 .5rem;min-height:1.375rem;line-height:1.375rem;border-left:2px solid transparent}[data-diff-kind=add]{backLine truncated
@@ -1 +0,0 @@
.semi-input-textarea-wrapper{box-sizing:border-box;display:inline-block;position:relative;width:100%;border:1px transparent solid;border-radius:var(--semi-border-radius-small);vertical-align:bottom;background-color:var(--semi-color-fill-0);transition:background-color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none),border var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none)}.semi-input-textarea-wrapper-resizeX{display:inline-block;width:fit-content;max-width:100%}.semi-input-textarea-wrapper:hover{background-color:var(--semi-color-fill-1)}.semi-input-textarea-wrapper-focus{background-color:var(--semi-color-fill-0);border:1px var(--semi-color-focus-border) solid}.semi-input-textarea-wrapper-focus:hover,.semi-input-textarea-wrapper-focus:active{background-color:var(--semi-color-fill-0)}.semi-input-textarea-wrapper:active{background-color:var(--semi-color-fill-2)}.semi-input-textarea-wrapper .semi-input-clearbtn{position:absolute;top:0;min-width:24px;color:var(--semi-color-text-2);right:4px;height:32px;display:flex;align-items:center;justify-content:center}.semi-input-textarea-wrapper .semi-input-clearbtn>svg{pointer-events:none}.semi-input-textarea-wrapper .semi-input-clearbtn:hover{cursor:pointer}.semi-input-textarea-wrapper .semi-input-clearbtn:hover .semi-icon{color:var(--semi-color-primary-hover)}.semi-input-textarea-wrapper .semi-input-clearbtn-hidden{visibility:hidden}.semi-input-textarea-wrapper-disabled,.semi-input-textarea-wrapper-readonly{cursor:not-allowed;color:var(--semi-color-disabled-text);background-color:var(--semi-color-disabled-fill)}.semi-input-textarea-wrapper-disabled:hover,.semi-input-textarea-wrapper-readonly:hover{background-color:var(--semi-color-disabled-fill)}.semi-input-textarea-wrapper-disabled::placeholder,.semi-input-textarea-wrapper-readonly::placeholder{color:var(--semi-color-disabled-text)}.semi-input-textarea-wrapper-readonly{cursor:text}.semi-input-textarea-wrapper-error{background-color:var(--semi-color-danger-light-default);border-color:var(--semi-color-danger-light-default)}.semi-input-textarea-wrapper-error:hover{background-color:var(--semi-color-danger-light-hover);border-color:var(--semi-color-danger-light-hover)}.semi-input-textarea-wrapper-error.semi-input-textarea-wrapper-focus{background-color:var(--semi-color-danger-light-default);border-color:var(--semi-color-danger)}.semi-input-textarea-wrapper-error:active{background-color:var(--semi-color-danger-light-active);border-color:var(--semi-color-danger)}.semi-input-textarea-wrapper-warning{background-color:var(--semi-color-warning-light-default);border-color:var(--semi-color-warning-light-default)}.semi-input-textarea-wrapper-warning:hover{background-color:var(--semi-color-warning-light-hover);border-color:var(--semi-color-warning-light-hover)}.semi-input-textarea-wrapper-warning.semi-input-textarea-wrapper-focus{background-color:var(--semi-color-warning-light-default);border-color:var(--semi-color-warning)}.semi-input-textarea-wrapper-warning:active{background-color:var(--semi-color-warning-light-active);border-color:var(--semi-color-warning)}.semi-input-textarea{position:relative;resize:none;padding:5px 12px;box-shadow:none;font-size:14px;line-height:20px;font-family:Inter,-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Segoe UI,Helvetica Neue,Helvetica,Arial,sans-serif;background-color:transparent;border:0 solid transparent;vertical-align:bottom;width:100%;outline:none;cursor:text;box-sizing:border-box;color:var(--semi-color-text-0)}.semi-input-textarea:hover{border-color:transparent}.semi-input-textarea::placeholder{color:var(--semi-color-text-2)}.semi-input-textarea-showClear{padding-right:36px}.semi-input-textarea-disabled,.semi-input-textarea-readonly{cursor:not-allowed;color:var(--semi-color-disabled-text);background-color:transparent}.semi-input-textarea-disabled:hover,.semi-input-textarea-readonly:hover{background-color:transparent}.semi-input-textarea-disabled::placeholder,.semi-input-textarea-readonly::placeholder{color:var(--semi-color-disabled-text)}.semi-input-textarea-readonly{cursor:text}.semi-input-textarea-autosize{overflow:hidden;resize:none}.semi-input-textarea-counter{font-size:12px;line-height:16px;font-family:Inter,-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Segoe UI,Helvetica Neue,Helvetica,Arial,sans-serif;display:flex;flex-direction:column;justify-content:center;padding:3px 12px 5px;min-height:24px;text-align:right;color:var(--semi-color-text-2)}.semi-input-textarea-counter-exceed{color:var(--semi-color-danger)}.semi-input-textarea-borderless:not(:focus-within):not(:hover){background-color:transparent;border-color:transparent}.semi-input-textarea-borderless:focus-within:not(:active){background-color:transparent}.semi-input-textarea-borderless.semi-input-textarea-wrapper-error:not(:focus-within){border-color:vLine truncated
@@ -1,4 +0,0 @@
import{c as se,b as u,ax as Le,f as Ee,h as S,_ as K,i as oe,R as v,k as Te,ay as re,l as D,n as le,V as Oe,az as X,P as f,aj as i,ab as Me}from"./tauri-compat-tfiFK9EG.js";import{T as He,a as Ve,b as ce}from"./index-DwVcZP0M.js";import{_ as he,t as Fe,c as Pe,I as Ie,a as $e,u as Be,b as q,d as z,M as fe,e as xe,i as be,f as Y,E as ye,T as ee,g as Ae,h as de}from"./main-Knf6L_en.js";import{B as _,c as Q,I as Ke}from"./index-Bpi3BHKj.js";import{S as G}from"./index-D_sWIqse.js";import{I as ve}from"./IconFile-CgfQSwGI.js";import"./WindowsTitlebar-CrkUa1UM.js";function We(s){return u.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},s),u.createElement("path",{d:"M5 2.9a1 1 0 0 1 1.57-.82l13.23 9.1a1 1 0 0 1 0 1.64l-13.23 9.1A1 1 0 0 1 5 21.1V2.9Z",fill:"currentColor"}))}const we=se(We,"play");function Ue(s){return u.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},s),u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 5.07c-.8.47-1.8.46-2.6 0l-.24-.15a1.4 1.4 0 0 0-1.82.29c-.64.82-1.16 1.73-1.55 2.7a1.4 1.4 0 0 0 .66 1.71l.24.14a2.57 2.57 0 0 1 0 4.48l-.24.14a1.4 1.4 0 0 0-.66 1.72 11.1 11.1 0 0 0 1.55 2.69 1.4 1.4 0 0 0 1.82.3l.25-.15a2.57 2.57 0 0 1 3.88 2.24v.28c-.01.7.46 1.33 1.16 1.43a11 11 0 0 0 3.1 0 1.4 1.4 0 0 0 1.17-1.43v-.28a2.57 2.57 0 0 1 3.87-2.24l.25.14c.6.36 1.38.26 1.82-.29.64-.82 1.16-1.73 1.55-2.7a1.4 1.4 0 0 0-.66-1.71l-.24-.14a2.57 2.57 0 0 1 0-4.48l.24-.14a1.4 1.4 0 0 0 .66-1.72 11.08 11.08 0 0 0-1.55-2.69 1.4 1.4 0 0 0-1.82-.3l-.25.15a2.57 2.57 0 0 1-3.88-2.24v-.28c.01-.7-.46-1.33-1.16-1.43a10.99 10.99 0 0 0-3.1 0c-.7.1-1.17.72-1.17 1.43v.28C9.3 3.75 8.8 4.61 8 5.07Zm6 10.4a4 4 0 1 0-4-6.93 4 4 0 0 0 4 6.92Z",fill:"currentColor"}))}const De=se(Ue,"setting");function qe(s){return u.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},s),u.createElement("path",{d:"M3 6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6Z",fill:"currentColor"}))}const Se=se(qe,"stop");let R=null;const ue={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},ge=s=>{Object.keys(ue).forEach(e=>{s.style.setProperty(e,ue[e],"important")})},pe=(s,e)=>{const t=s.scrollHeight;return e.sizingStyle.boxSizing==="border-box"?t+e.borderSize:t-e.paddingSize};function Ze(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1/0;R||(R=document.createElement("textarea"),R.setAttribute("tab-index","-1"),R.setAttribute("aria-hidden","true"),ge(R)),R.parentNode===null&&document.body.appendChild(R);const{paddingSize:a,borderSize:o,sizingStyle:r}=s,{boxSizing:l}=r;Object.keys(r).forEach(x=>{R.style[x]=r[x]}),ge(R),R.value=e;let c=pe(R,s);R.value="x";const g=pe(R,s)-a-o;let m=g*t;l==="border-box"&&(m=m+a+o),c=Math.max(m,c);let w=g*n;return l==="border-box"&&(w=w+a+o),c=Math.min(w,c),c}const Xe=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],Ye=s=>{const e=window.getComputedStyle(s);if(e===null)return null;const t=Le(e,Xe),{boxSizing:n}=t;if(n==="")return null;const a=parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),o=parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth);return{sizingStyle:t,paddingSize:a,borderSize:o}};class ne extends Ee{static get textAreaDefaultAdapter(){return{notifyChange:S,setValue:S,toggleFocusing:S,toggleHovering:S,notifyFocus:S,notifyBlur:S,notifyKeyDown:S,notifyEnterPress:S}}constructor(e){super(Object.assign(Object.assign({},ne.textAreaDefaultAdapter),e)),this.compositionEnter=!1,this._changeValue=(t,n)=>{this._isControlledComponent()?this._adapter.notifyChange(t,n):(this._adapter.setValue(t),this._adapter.notifyChange(t,n))},this.getNextValue=t=>{const{maxLength:n,minLength:a,getValueLength:o}=this._adapter.getProps();return K(o)?n?this.handleVisibleMaxLength(t):(a&&this.handleVisibleMinLength(t),t):t},this.handleCompositionStart=t=>{this.compositionEnter=!0,this._adapter.notifyCompositionStart(t)},this.handleCompositionEnd=t=>{const{composition:n}=this._adapter.getProps(),a=t.target.value;if(this.compositionEnter=!1,this._adapter.notifyCompositionEnd(t),n){const c=this.getNextValue(a);this._changeValue(c,t);return}const{getValueLength:o,maxLength:r,minLength:l}=this.getProps();if(K(o)){if(r){const c=this.handleVisibleMaxLength(a);c!==a&&this._changeValue(c,t)}l&&this.handleVisibleMinLength(a)}},this.handleCompositionUpdate=t=>{this._adapter.notifyCompLine truncated
`):[""],m=D(`${y}-textarea-lineNumber`,n),w=c?this.getTextareaLineHeightPx(c):21,x=Object.assign(Object.assign({},a||{}),{height:l?`${l}px`:void 0,maxHeight:l?`${l}px`:void 0});return v.createElement("div",{ref:this.lineNumberRef,className:m,style:x},g.map((E,C)=>{const k=c?this.calculateWrappedLines(E,c):1;return v.createElement("div",{key:C,className:`${y}-textarea-lineNumber-item`,style:{minHeight:`${k*w}px`,lineHeight:`${w}px`}},t+C)}))}render(){const e=this.props,{autosize:t,placeholder:n,onEnterPress:a,onResize:o,resize:r,disabled:l,readonly:c,className:g,showCounter:m,validateStatus:w,maxCount:x,defaultValue:E,style:C,textareaStyle:k,forwardRef:T,getValueLength:H,maxLength:p,minLength:N,showClear:O,borderless:L,autoFocus:I,showLineNumber:h,lineNumberStart:d,lineNumberClassName:b,lineNumberStyle:M,composition:U}=e,$=Qe(e,["autosize","placeholder","onEnterPress","onResize","resize","disabled","readonly","className","showCounter","validateStatus","maxCount","defaultValue","style","textareaStyle","forwardRef","getValueLength","maxLength","minLength","showClear","borderless","autoFocus","showLineNumber","lineNumberStart","lineNumberClassName","lineNumberStyle","composition"]),{isFocus:Z,value:B,minLength:F}=this.state,A=!le(r),je=!t&&A&&["horizontal","both","inline"].includes(r),Re=!t&&A&&["vertical","both","block"].includes(r),_e=D(g,`${y}-textarea-wrapper`,{[`${y}-textarea-borderless`]:L,[`${y}-textarea-wrapper-disabled`]:l,[`${y}-textarea-wrapper-readonly`]:c,[`${y}-textarea-wrapper-${w}`]:!!w,[`${y}-textarea-wrapper-focus`]:Z,[`${y}-textarea-wrapper-withLineNumber`]:h,[`${y}-textarea-wrapper-resizeX`]:je,[`${y}-textarea-wrapper-resizeY`]:Re}),ke=D(`${y}-textarea`,{[`${y}-textarea-disabled`]:l,[`${y}-textarea-readonly`]:c,[`${y}-textarea-autosize`]:$e(t)?le(t==null?void 0:t.maxRows):t,[`${y}-textarea-showClear`]:O}),J=Object.assign({},k||{});t?J.resize="none":A&&(J.resize=r);const ie=!t&&A&&r&&r!=="none",V=Object.assign(Object.assign({},Oe($,"insetLabel","insetLabelId","getValueLength","onClear","showClear","disabledEnterStartNewLine","composition")),{style:J,autoFocus:I||this.props.autofocus,className:ke,disabled:l,readOnly:c,placeholder:n||null,onChange:j=>this.foundation.handleChange(j.target.value,j),onFocus:j=>this.foundation.handleFocus(j),onBlur:j=>this.foundation.handleBlur(j.nativeEvent),onKeyDown:j=>this.foundation.handleKeyDown(j),onScroll:this.handleTextAreaScroll,value:B??"",onCompositionStart:this.foundation.handleCompositionStart,onCompositionEnd:this.foundation.handleCompositionEnd,onCompositionUpdate:this.foundation.handleCompositionUpdate});return K(H)||(V.maxLength=p),F&&(V.minLength=F),v.createElement("div",{className:_e,style:C,onMouseEnter:j=>this.foundation.handleMouseEnter(j),onMouseLeave:j=>this.foundation.handleMouseLeave(j),onClick:j=>this.handleClick(j)},this.renderLineNumbers(),h?v.createElement("div",{className:`${y}-textarea-content`},t?v.createElement(X,{onResize:this.throttledResizeTextarea},v.createElement("textarea",Object.assign({},V,{ref:this.setRef}))):ie?v.createElement(X,{onResize:this.throttledNotifyNativeResize},v.createElement("textarea",Object.assign({},V,{ref:this.setRef}))):v.createElement("textarea",Object.assign({},V,{ref:this.setRef}))):t?v.createElement(X,{onResize:this.throttledResizeTextarea},v.createElement("textarea",Object.assign({},V,{ref:this.setRef}))):ie?v.createElement(X,{onResize:this.throttledNotifyNativeResize},v.createElement("textarea",Object.assign({},V,{ref:this.setRef}))):v.createElement("textarea",Object.assign({},V,{ref:this.setRef})),this.renderClearBtn(),this.renderCounter())}}ae.propTypes={autosize:f.oneOfType([f.bool,f.object]),borderless:f.bool,placeholder:f.string,value:f.string,rows:f.number,cols:f.number,maxCount:f.number,onEnterPress:f.func,validateStatus:f.string,className:f.string,style:f.object,textareaStyle:f.object,showClear:f.bool,onClear:f.func,onResize:f.func,onCompositionStart:f.func,onCompositionEnd:f.func,onCompositionUpdate:f.func,getValueLength:f.func,disabledEnterStartNewLine:f.bool,composition:f.bool,showLineNumber:f.bool,lineNumberStart:f.number,lineNumberClassName:f.string,lineNumberStyle:f.object,resize:f.oneOf(["none","both","horizontal","vertical","block","inline"])};ae.defaultProps={autosize:!1,borderless:!1,rows:4,cols:20,showCounter:!1,showClear:!1,onEnterPress:S,onChange:S,onBlur:S,onFocus:S,onKeyDown:S,onResize:S,onClear:S,onCompositionStart:S,onCompositionEnd:S,onCompositionUpdate:S,composition:!1,showLineNumber:!1,lineNumberStart:1};const Ge=v.forwardRef((s,e)=>v.createElement(ae,Object.assign({},s,{forwardRef:e})));function Je({lines:s,emptyLabel:e="No logs",className:t}){const n=u.useRef(null),a=u.useRef(!0),[o,r]=u.useState(!1);u.useEffect(()=>{const g=n.current;g&&a.current&&(g.scrollTop=g.scrollHeight)},[s]);const l=u.useCallback(g=>{const m=g.currentTarget;a.current=m.scrollHeight-m.scrollTop-m.clientHeight<24},[]),c=u.useCallback(()=>{s!=null&&s.length&&navigator.clipboard.writeText(s.join( Line truncated
`)).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})},[s]);return i.jsxs("div",{className:`ga-log-tail ${t??""}`,children:[i.jsx("button",{type:"button",className:`ga-log-tail-copy ${o?"copied":""}`,onClick:c,title:"Copy",children:o?"✓":"⎘"}),i.jsx("div",{ref:n,className:"ga-log-tail-scroll",onScroll:l,children:s===null?i.jsx("p",{className:"ga-log-tail-empty",children:"…"}):s.length===0?i.jsx("p",{className:"ga-log-tail-empty",children:e}):i.jsx("pre",{className:"ga-log-tail-pre",children:s.map((g,m)=>i.jsxs("span",{className:g.startsWith("=====")?"ga-log-separator":void 0,children:[g,`
`]},m))})})]})}function Ce(s,e){Be.getState().notify({kind:e,message:s})}function W(s){Ce(s,"error")}function P(s){Ce(s,"success")}const et=3e3;function ze({serviceId:s,onClose:e}){const{t}=q(),n=z(c=>c.fetchLogs),[a,o]=u.useState(null),r=u.useRef(null),l=u.useCallback(async()=>{if(!s)return;const c=await n(s);o(c)},[s,n]);return u.useEffect(()=>(s&&(o(null),l(),r.current=setInterval(l,et)),()=>{r.current&&(clearInterval(r.current),r.current=null)}),[s,l]),i.jsx(fe,{title:t("modal.channelLogs"),visible:s!==null,onCancel:e,footer:null,width:870,centered:!0,closeOnEsc:!0,className:"ga-log-dialog",children:a===null?i.jsx("div",{className:"ga-services-loading",style:{padding:24},children:i.jsx(G,{})}):i.jsx(Je,{lines:a,emptyLabel:t("ch.logEmpty"),className:"ga-log-modal-body"})})}function tt({visible:s,onClose:e}){const{t}=q(),n=z(x=>x.fetchMykey),a=z(x=>x.saveMykey),o=z(x=>x.mykeyContent),r=z(x=>x.mykeyLoading),[l,c]=u.useState(""),[g,m]=u.useState(!1);u.useEffect(()=>{s&&n()},[s,n]),u.useEffect(()=>{c(o)},[o]);const w=async()=>{m(!0);const x=await a(l);m(!1),x?(P(t("sys.configSaved")),e()):W(t("err.mykeyExport"))};return i.jsx(fe,{title:t("modal.mykeyConfig"),visible:s,onCancel:e,width:870,centered:!0,closeOnEsc:!0,className:"ga-settings-dialog",footer:i.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",padding:"8px 0"},children:[i.jsx(_,{onClick:e,children:t("common.cancel")}),i.jsx(_,{type:"primary",loading:g,onClick:w,children:t("common.save")})]}),children:r?i.jsx("div",{className:"ga-services-loading",children:i.jsx(G,{})}):i.jsx(Ge,{value:l,onChange:x=>c(x),autosize:{minRows:16,maxRows:30},style:{fontFamily:"var(--font-mono)",fontSize:13}})})}const st="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eTencent%20QQ%3c/title%3e%3cpath%20d='M21.395%2015.035a40%2040%200%200%200-.803-2.264l-1.079-2.695c.001-.032.014-.562.014-.836C19.526%204.632%2017.351%200%2012%200S4.474%204.632%204.474%209.241c0%20.274.013.804.014.836l-1.08%202.695a39%2039%200%200%200-.802%202.264c-1.021%203.283-.69%204.643-.438%204.673.54.065%202.103-2.472%202.103-2.472%200%201.469.756%203.387%202.394%204.771-.612.188-1.363.479-1.845.835-.434.32-.379.646-.301.778.343.578%205.883.369%207.482.189%201.6.18%207.14.389%207.483-.189.078-.132.132-.458-.301-.778-.483-.356-1.233-.646-1.846-.836%201.637-1.384%202.393-3.302%202.393-4.771%200%200%201.563%202.537%202.103%202.472.251-.03.581-1.39-.438-4.673'/%3e%3c/svg%3e",nt="data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eWeChat%3c/title%3e%3cpath%20d='M8.691%202.188C3.891%202.188%200%205.476%200%209.53c0%202.212%201.17%204.203%203.002%205.55a.59.59%200%200%201%20.213.665l-.39%201.48c-.019.07-.048.141-.048.213%200%20.163.13.295.29.295a.326.326%200%200%200%20.167-.054l1.903-1.114a.864.864%200%200%201%20.717-.098%2010.16%2010.16%200%200%200%202.837.403c.276%200%20.543-.027.811-.05-.857-2.578.157-4.972%201.932-6.446%201.703-1.415%203.882-1.98%205.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785%205.991c.642%200%201.162.529%201.162%201.18a1.17%201.17%200%200%201-1.162%201.178A1.17%201.17%200%200%201%204.623%207.17c0-.651.52-1.18%201.162-1.18zm5.813%200c.642%200%201.162.529%201.162%201.18a1.17%201.17%200%200%201-1.162%201.178%201.17%201.17%200%200%201-1.162-1.178c0-.651.52-1.18%201.162-1.18zm5.34%202.867c-1.797-.052-3.746.512-5.28%201.786-1.72%201.428-2.687%203.72-1.78%206.22.942%202.453%203.666%204.229%206.884%204.229.826%200%201.622-.12%202.361-.336a.722.722%200%200%201%20.598.082l1.584.926a.272.272%200%200%200%20.14.047c.134%200%20.24-.111.24-.247%200-.06-.023-.12-.038-.177l-.327-1.233a.582.582%200%200%201-.023-.156.49.49%200%200%201%20.201-.398C23.024%2018.48%2024%2016.82%2024%2014.98c0-3.21-2.931-5.837-6.656-6.088V8.89c-.135-.01-.27-.027-.407-.03zm-2.53%203.274c.535%200%20.969.44.969.982a.976.976%200%200%201-.969.983.976.976%200%200%201-.969-.983c0-.542.434-.982.97-.982zm4.844%200c.535%200%20.969.44.969.982a.976.976%200%200%201-.969.983.976.976%200%200%201-.969-.983c0-.542.434-.982.969-.982z'/%3e%3c/svg%3e",at="data:image/svg+xml,%3csvg%20width='46'%20height='46'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_338_13245)'%3e%3cpath%20d='M39.743%200H6.257A6.257%206.257%200%200%200%200%206.257v33.487A6.257%206.257%200%200%200%206.257%2046h33.487A6.257%206.257%200%200%200%2046%2039.743V6.257A6.257%206.257%200%200%200%2039.743%200'%20fill='%23fff'/%3e%3cmask%20id='mask0_338_13245'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='5'%20y='8'%20width='36'%20height='30'%3e%3cpath%20d='M40.514%208.373H5.484v29.262h35.03z'%20fill='%23fff'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_338_13245)'%3e%3cpath%20d='M28.856%2031.647a.483.483%200%200%200%20.06.738%206.2%206.2%200%200%201%201.911%203.725%202.02%202.02%200%201%200%202.16-2.54%206.2%206.2%200%200%201-3.448-1.922.483.483%200%200%200-.683-.001'%20fill='%23fb Line truncated
-1
View File
@@ -1 +0,0 @@
import{b as s,aj as r}from"./tauri-compat-tfiFK9EG.js";import{M as o,S as m,r as t,a as e,b as n,p}from"./markdown-preprocess-Bvg4n8KE.js";import{S as i,U as c}from"./main-Knf6L_en.js";import"./index-Bpi3BHKj.js";import"./WindowsTitlebar-CrkUa1UM.js";const u={...c},O=s.memo(function({content:a}){return r.jsx("div",{"data-slot":"summary-block",children:r.jsx(o,{remarkPlugins:[e,n],rehypePlugins:[[t,u]],components:m,urlTransform:i,children:p(a)})})});export{O as SummaryPart};
-2
View File
@@ -1,2 +0,0 @@
import{aA as F,aB as L,aC as ee,aD as ze,aE as Xe,aF as wt,aG as Vr,c as Dt,b as J,aH as Br,aI as Gr,B,d as Yi,e as Li,x as $i,aJ as Hi,g as ia,aK as Ui,_ as st,f as He,ae as Be,w as qi,i as Wi,aL as De,N as oe,j as ji,R as b,k as Ue,l as Y,P as p,q as We,h as Q,aM as Vi,aN as Bi,M as K,aO as Gi,aP as zi,ay as Xi,X as zr,T as Zi,O as Xr,s as Qi,aQ as Ki,ax as Ji,aj as A}from"./tauri-compat-tfiFK9EG.js";import{_ as es,c as M,V as ts,i as Sn,d as ns,e as Et,I as Zr,f as as,r as rs,g as rt,h as Un,j as Qn,k as is,l as ss,T as os,a as us,b as Ta}from"./index-DwVcZP0M.js";import{s as Qr,a as Kr,F as gt,I as ls,j as cs,k as ds,B as Jr,C as fs,l as hs,m as wa,b as lt,n as ps,T as ms,E as ei,g as gs}from"./main-Knf6L_en.js";import{a as pt,B as yt}from"./index-Bpi3BHKj.js";import{A as vs}from"./Animation-TKQfYYOo.js";import{B as Da}from"./index-DpGuh58E.js";import{S as ys}from"./index-D_sWIqse.js";import"./WindowsTitlebar-CrkUa1UM.js";function Le(s,e){F(2,arguments);var t=L(s),n=ee(e);if(isNaN(n))return new Date(NaN);if(!n)return t;var a=t.getDate(),i=new Date(t.getTime());i.setMonth(t.getMonth()+n+1,0);var r=i.getDate();return a>=r?i:(t.setFullYear(i.getFullYear(),i.getMonth(),a),t)}function Ts(s,e){F(2,arguments);var t=L(s).getTime(),n=ee(e);return new Date(t+n)}function ti(s){var e=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()));return e.setUTCFullYear(s.getFullYear()),s.getTime()-e.getTime()}function Kn(s){F(1,arguments);var e=L(s);return e.setHours(0,0,0,0),e}function xn(s,e){F(2,arguments);var t=ee(e);return Le(s,t*12)}var sa=6e4,oa=36e5,ws=1e3;function ua(s,e){F(2,arguments);var t=Kn(s),n=Kn(e);return t.getTime()===n.getTime()}function Jn(s){return F(1,arguments),s instanceof Date||ze(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}function Ce(s){if(F(1,arguments),!Jn(s)&&typeof s!="number")return!1;var e=L(s);return!isNaN(Number(e))}function je(s,e){F(2,arguments);var t=L(s),n=L(e),a=t.getFullYear()-n.getFullYear(),i=t.getMonth()-n.getMonth();return a*12+i}function Ds(s,e){F(2,arguments);var t=L(s),n=L(e);return t.getFullYear()-n.getFullYear()}function bs(s){F(1,arguments);var e=L(s);return e.setDate(1),e.setHours(0,0,0,0),e}function ni(s,e){F(2,arguments);var t=ee(e);return Ts(s,-t)}var _s=864e5;function Cs(s){F(1,arguments);var e=L(s),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),a=t-n;return Math.floor(a/_s)+1}function ot(s){F(1,arguments);var e=1,t=L(s),n=t.getUTCDay(),a=(n<e?7:0)+n-e;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function ai(s){F(1,arguments);var e=L(s),t=e.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var a=ot(n),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var r=ot(i);return e.getTime()>=a.getTime()?t+1:e.getTime()>=r.getTime()?t:t-1}function Is(s){F(1,arguments);var e=ai(s),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var n=ot(t);return n}var Rs=6048e5;function ri(s){F(1,arguments);var e=L(s),t=ot(e).getTime()-Is(e).getTime();return Math.round(t/Rs)+1}function la(s,e){var t,n,a,i,r,u,o,l;F(1,arguments);var c=L(s),d=c.getUTCFullYear(),f=wt(),h=ee((t=(n=(a=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(r=e.locale)===null||r===void 0||(u=r.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&a!==void 0?a:f.firstWeekContainsDate)!==null&&n!==void 0?n:(o=f.locale)===null||o===void 0||(l=o.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(d+1,0,h),v.setUTCHours(0,0,0,0);var w=Xe(v,e),m=new Date(0);m.setUTCFullYear(d,0,h),m.setUTCHours(0,0,0,0);var g=Xe(m,e);return c.getTime()>=w.getTime()?d+1:c.getTime()>=g.getTime()?d:d-1}function Ps(s,e){var t,n,a,i,r,u,o,l;F(1,arguments);var c=wt(),d=ee((t=(n=(a=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(r=e.locale)===null||r===void 0||(u=r.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(o=c.locale)===null||o===void 0||(l=o.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1),f=la(s,e),h=new Date(0);h.setUTCFullYear(f,0,d),h.setUTCHours(0,0,0,0);var v=Xe(h,e);return v}var Es=6048e5;function ii(s,e){F(1,arguments);var t=L(s),n=Xe(t,e).getTime()-Ps(t,e).getTime();return Math.round(n/Es)+1}function z(s,e){for(var t=s<0?"-":"",n=Math.abs(s).toString();n.length<e;)n="0"+n;return t+n}var Fe={y:function(e,t){var n=e.getUTCFullYear(),a=n>0?n:1-n;return z(t==="yy"?a%100:a,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):z(n+1,2)},d:function(e,t){return z(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aLine truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,r=!0,u=!1;return{s:function(){t=t.call(s)},n:function(){var l=t.next();return r=l.done,l},e:function(l){u=!0,i=l},f:function(){try{r||t.return==null||t.return()}finally{if(u)throw i}}}}function q(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(e&&e.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),e&&es(s,e)}function Nn(s){return Nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nn(s)}function di(){try{var s=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(di=function(){return!!s})()}function Ws(s,e){if(e&&(ze(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M(s)}function W(s){var e=di();return function(){var t,n=Nn(s);if(e){var a=Nn(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return Ws(this,t)}}function $(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}function js(s,e){if(ze(s)!="object"||!s)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var n=t.call(s,e);if(ze(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function fi(s){var e=js(s,"string");return ze(e)=="symbol"?e:e+""}function Vs(s,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,fi(n.key),n)}}function H(s,e,t){return e&&Vs(s.prototype,e),Object.defineProperty(s,"prototype",{writable:!1}),s}function S(s,e,t){return(e=fi(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}var Bs=10,hi=(function(){function s(){$(this,s),S(this,"priority",void 0),S(this,"subPriority",0)}return H(s,[{key:"validate",value:function(t,n){return!0}}]),s})(),Gs=(function(s){q(t,s);var e=W(t);function t(n,a,i,r,u){var o;return $(this,t),o=e.call(this),o.value=n,o.validateValue=a,o.setValue=i,o.priority=r,u&&(o.subPriority=u),o}return H(t,[{key:"validate",value:function(a,i){return this.validateValue(a,this.value,i)}},{key:"set",value:function(a,i,r){return this.setValue(a,i,this.value,r)}}]),t})(hi),zs=(function(s){q(t,s);var e=W(t);function t(){var n;$(this,t);for(var a=arguments.length,i=new Array(a),r=0;r<a;r++)i[r]=arguments[r];return n=e.call.apply(e,[this].concat(i)),S(M(n),"priority",Bs),S(M(n),"subPriority",-1),n}return H(t,[{key:"set",value:function(a,i){if(i.timestampIsSet)return a;var r=new Date(0);return r.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),r.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),r}}]),t})(hi),j=(function(){function s(){$(this,s),S(this,"incompatibleTokens",void 0),S(this,"priority",void 0),S(this,"subPriority",void 0)}return H(s,[{key:"run",value:function(t,n,a,i){var r=this.parse(t,n,a,i);return r?{setter:new Gs(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(t,n,a){return!0}}]),s})(),Xs=(function(s){q(t,s);var e=W(t);function t(){var n;$(this,t);for(var a=arguments.length,i=new Array(a),r=0;r<a;r++)i[r]=arguments[r];return n=e.call.apply(e,[this].concat(i)),S(M(n),"priority",140),S(M(n),"incompatibleTokens",["R","u","t","T"]),n}return H(t,[{key:"parse",value:function(a,i,r){switch(i){case"G":case"GG":case"GGG":return r.era(a,{width:"abbreviated"})||r.era(a,{width:"narrow"});case"GGGGG":return r.era(a,{width:"narrow"});case"GGGG":default:return r.era(a,{width:"wide"})||r.era(a,{width:"abbreviated"})||r.era(a,{width:"narrow"})}}},{key:"set",value:function(a,i,r){return i.era=r,a.setUTCFullYear(r,0,1),a.setUTCHours(0,0,0,0),a}}]),t})(j),ue={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Ee={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function le(s,e){return s&&{value:e(s.value),rest:s.rest}}function ae(s,e){var t=e.match(s);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function Oe(s,e){var t=e.match(s);if(!t)return null;if(t[0]==="Z")return{value:0,rest: Line truncated
-1
View File
@@ -1 +0,0 @@
.semi-scrolllist{width:100%;height:100%;background:var(--semi-color-bg-3);box-shadow:0 0 1px #0000004d,0 4px 14px #0000001a;border-radius:var(--semi-border-radius-medium);overflow:hidden;font-size:14px;line-height:20px;font-family:Inter,-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Segoe UI,Helvetica Neue,Helvetica,Arial,sans-serif;-webkit-user-select:none;user-select:none;display:flex;flex-direction:column}.semi-scrolllist-header{text-align:center;padding:0 16px;background:transparent}.semi-scrolllist-header-title{padding:16px 0;font-weight:600;color:var(--semi-color-text-0);font-size:14px;line-height:20px;font-family:Inter,-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Segoe UI,Helvetica Neue,Helvetica,Arial,sans-serif}.semi-scrolllist-body{display:flex;height:300px;padding:0 16px;overflow:hidden}.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer-nocycle>ul:before,.semi-scrolllist-body .semi-scrolllist-item>ul:before{content:"";display:block;width:100%;height:132px}.semi-scrolllist-body .semi-scrolllist-item{position:relative;flex:1;overflow-x:hidden;overflow-y:auto}.semi-scrolllist-body .semi-scrolllist-item:not(:last-child){border-right:1px solid var(--semi-color-border)}.semi-scrolllist-body .semi-scrolllist-item>ul,.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer>ul{box-sizing:border-box;width:100%;margin:0;padding:0 0 132px;list-style:none}.semi-scrolllist-body .semi-scrolllist-item>ul>li,.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer>ul>li{list-style:none;height:36px;box-sizing:border-box;color:var(--semi-color-text-0);text-align:center;display:flex;align-items:center;justify-content:center;cursor:pointer;background-color:transparent;transition:background-color var(--semi-transition_duration-none) var(--semi-transition_function-easeOut) 0ms}.semi-scrolllist-body .semi-scrolllist-item>ul>li.semi-scrolllist-item-sel,.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer>ul>li.semi-scrolllist-item-sel{background:var(--semi-color-primary-light-default);color:var(--semi-color-text-0)}.semi-scrolllist-body .semi-scrolllist-item>ul>li.semi-scrolllist-item-sel>svg,.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer>ul>li.semi-scrolllist-item-sel>svg{color:var(--semi-color-text-2);width:16px;height:16px;margin-right:12px}.semi-scrolllist-body .semi-scrolllist-item>ul>li:not(.disabled):not(.semi-scrolllist-item-disabled):not(.semi-scrolllist-item-sel):not(.semi-scrolllist-item-selected),.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer>ul>li:not(.disabled):not(.semi-scrolllist-item-disabled):not(.semi-scrolllist-item-sel):not(.semi-scrolllist-item-selected){cursor:pointer}.semi-scrolllist-body .semi-scrolllist-item>ul>li:not(.disabled):not(.semi-scrolllist-item-disabled):not(.semi-scrolllist-item-sel):not(.semi-scrolllist-item-selected):hover,.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer>ul>li:not(.disabled):not(.semi-scrolllist-item-disabled):not(.semi-scrolllist-item-sel):not(.semi-scrolllist-item-selected):hover{background-color:var(--semi-color-fill-1)}.semi-scrolllist-body .semi-scrolllist-item>ul>li:not(.disabled):not(.semi-scrolllist-item-disabled):not(.semi-scrolllist-item-sel):not(.semi-scrolllist-item-selected):active,.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer>ul>li:not(.disabled):not(.semi-scrolllist-item-disabled):not(.semi-scrolllist-item-sel):not(.semi-scrolllist-item-selected):active{background-color:var(--semi-color-fill-2)}.semi-scrolllist-body .semi-scrolllist-item>ul>li.semi-scrolllist-item-disabled,.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer>ul>li.semi-scrolllist-item-disabled{color:var(--semi-color-disabled-text);cursor:not-allowed}.semi-scrolllist-body .semi-scrolllist-item-wheel{position:relative;flex:1;overflow:hidden}.semi-scrolllist-body .semi-scrolllist-item-wheel:not(:last-child){border-right:1px solid var(--semi-color-border)}.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-item-selected{font-weight:600;color:var(--semi-color-primary)!important}.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-list-outer{overflow-x:hidden;overflow-y:auto;height:100%;width:100%;padding-right:18px}.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-shade{width:100%;height:50%;pointer-events:none;position:absolute}.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-shade-pre{top:0;margin-top:-19px;background:var(--semi-color-bg-3);opacity:.5}.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-shade-post{top:50%;margin-top:19px;background:var(--semi-color-bg-3);opacity:.5}.semi-scrolllist-body .semi-scrolllist-item-wheel .semi-scrolllist-selector{pointer-events:none;position:absolute;top:50%;border-tLine truncated
@@ -1 +0,0 @@
import{aj as t}from"./tauri-compat-tfiFK9EG.js";function d(){var n,e,o;const i=(o=(e=(n=window.__TAURI__)==null?void 0:n.window)==null?void 0:e.getCurrentWindow)==null?void 0:o.call(e);return i?t.jsxs("div",{className:"ga-win-controls","data-no-drag":!0,children:[t.jsx("button",{type:"button",className:"ga-win-btn",onClick:()=>i.minimize(),"aria-label":"Minimize",children:t.jsx("svg",{width:"10",height:"1",viewBox:"0 0 10 1",children:t.jsx("rect",{fill:"currentColor",width:"10",height:"1"})})}),t.jsx("button",{type:"button",className:"ga-win-btn",onClick:()=>i.toggleMaximize(),"aria-label":"Maximize",children:t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:t.jsx("rect",{x:"0.5",y:"0.5",width:"9",height:"9",stroke:"currentColor",strokeWidth:"1"})})}),t.jsx("button",{type:"button",className:"ga-win-btn ga-win-btn--close",onClick:()=>i.close(),"aria-label":"Close",children:t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",children:t.jsx("path",{d:"M1 1l8 8M9 1l-8 8",stroke:"currentColor",strokeWidth:"1.2"})})})]}):null}function c(){const i=n=>{var o,r,s,a,l;n.button!==0||n.target.closest("button, a, input, [data-no-drag]")||(n.preventDefault(),(l=(a=(s=(r=(o=window.__TAURI__)==null?void 0:o.window)==null?void 0:r.getCurrentWindow)==null?void 0:s.call(r))==null?void 0:a.startDragging)==null||l.call(a))};return t.jsx("div",{className:"ga-win-titlebar","data-testid":"windows-titlebar",onMouseDown:i,children:t.jsx(d,{})})}export{c as W};
@@ -1 +0,0 @@
:root[data-platform=windows]{--ga-titlebar-height: 32px}.ga-win-titlebar{height:32px;flex-shrink:0;width:100%;background:#0a0a0a;display:flex;justify-content:flex-end;align-items:stretch;-webkit-user-select:none;user-select:none}.ga-win-controls{display:flex;height:100%}.ga-win-btn{width:46px;height:100%;border:none;background:transparent;color:#d1d1d1;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .1s}.ga-win-btn:hover{background:#2e2e2e;color:#fff}.ga-win-btn--close:hover{background:#c42b1c;color:#fff}
Binary file not shown.
-12
View File
@@ -1,12 +0,0 @@
<svg width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<path d="M12.9238 12.8029C12.9427 12.784 12.9616 12.7682 12.9806 12.7493C13.0184 12.7146 13.0563 12.6767 13.091 12.6389L13.1667 12.5631L13.397 12.336L14.7315 11.0173L15.0659 10.686C15.129 10.6229 15.1952 10.563 15.2615 10.5031C15.3845 10.3926 15.5076 10.2854 15.6369 10.1813C15.7536 10.0866 15.8767 9.99514 15.9997 9.9068C16.1732 9.78376 16.3499 9.67019 16.5329 9.55977C16.7127 9.45251 16.8957 9.35471 17.085 9.26322C17.2616 9.17804 17.4415 9.09917 17.6276 9.02661C17.7317 8.9856 17.8326 8.94774 17.9399 8.91304C17.9935 8.89411 18.044 8.87834 18.0977 8.86256C17.6276 7.00439 16.7632 5.3008 15.5991 3.84959C15.3719 3.56566 15.0249 3.40161 14.6589 3.40161H5.0084C4.83489 3.40161 4.76233 3.6256 4.90114 3.72656C8.18528 6.13997 10.9236 9.24114 12.9017 12.825C12.908 12.8187 12.9175 12.8124 12.9238 12.8029Z"
fill="#00D6B9" />
<path d="M9.09696 21.2986C14.0815 21.2986 18.4225 18.5476 20.6877 14.4843C20.7666 14.3423 20.8454 14.1972 20.918 14.052C20.8044 14.2729 20.6751 14.4811 20.5394 14.6767C20.4889 14.7461 20.4385 14.8155 20.388 14.8818C20.3217 14.9669 20.2555 15.049 20.1861 15.1278C20.1324 15.1909 20.0757 15.2509 20.0189 15.3108C19.9021 15.4307 19.7823 15.5474 19.6561 15.6547C19.5867 15.7146 19.5141 15.7714 19.4415 15.8282C19.3564 15.8944 19.268 15.9575 19.1797 16.0143C19.1229 16.0522 19.0661 16.09 19.0093 16.1247C18.9494 16.1626 18.8895 16.1973 18.8264 16.232C18.7002 16.3014 18.574 16.3645 18.4446 16.4245C18.3311 16.4749 18.2175 16.5223 18.1008 16.5633C17.9746 16.6106 17.8452 16.6516 17.7159 16.6863C17.5234 16.7399 17.3247 16.7809 17.1259 16.8125C16.9808 16.8346 16.8357 16.8504 16.6874 16.863C16.5328 16.8724 16.3751 16.8787 16.2173 16.8756C16.0438 16.8724 15.8703 16.863 15.6936 16.844C15.5643 16.8314 15.435 16.8125 15.3056 16.7873C15.192 16.7683 15.0785 16.7431 14.9649 16.7178C14.9049 16.7021 14.845 16.6895 14.7851 16.6737C14.6179 16.6295 14.4538 16.5822 14.2898 16.5349C14.2077 16.5096 14.1257 16.4875 14.0437 16.4623C13.9206 16.4245 13.7976 16.3897 13.6777 16.3519C13.5768 16.3203 13.479 16.2888 13.378 16.2572C13.2834 16.2257 13.1887 16.1942 13.0941 16.1626C13.031 16.1405 12.9647 16.1184 12.9016 16.0964C12.8228 16.0711 12.7471 16.0427 12.6682 16.0143C12.6114 15.9954 12.5578 15.9765 12.501 15.9544C12.3906 15.9134 12.2802 15.8755 12.1729 15.8345C12.1098 15.8093 12.0467 15.7872 11.9836 15.7619C11.8984 15.7304 11.8132 15.6957 11.7312 15.6641C11.6429 15.6294 11.5514 15.5947 11.4631 15.5569C11.4063 15.5348 11.3463 15.5096 11.2895 15.4875C11.217 15.4591 11.1476 15.4275 11.075 15.3991C11.0214 15.3771 10.9646 15.3518 10.911 15.3297C10.8542 15.3045 10.7974 15.2793 10.7406 15.254C10.6901 15.2319 10.6428 15.2099 10.5923 15.1878C10.5482 15.1688 10.5008 15.1468 10.4567 15.1278C10.4094 15.1057 10.3652 15.0868 10.3179 15.0647C10.2705 15.0427 10.2232 15.0206 10.1759 14.9985C10.116 14.9701 10.056 14.9417 9.99608 14.9165C9.93299 14.8881 9.87304 14.8565 9.80995 14.8281C9.7437 14.7966 9.67745 14.765 9.6112 14.7303C9.55441 14.7019 9.49762 14.6735 9.44084 14.6483C6.45324 13.1592 3.80321 11.1717 1.54438 8.76145C1.43081 8.64157 1.23206 8.72044 1.23206 8.88449L1.23836 18.0933C1.23836 18.494 1.43712 18.8726 1.77153 19.0934C3.86631 20.4878 6.38699 21.2986 9.09696 21.2986Z"
fill="#3370FF" />
<path d="M23.7322 9.29488C22.7226 8.79642 21.5838 8.5188 20.3818 8.5188C19.6688 8.5188 18.9747 8.6166 18.3217 8.80273C18.246 8.82481 18.1703 8.8469 18.0977 8.86898C18.0441 8.88476 17.9905 8.90368 17.94 8.91946C17.8359 8.95416 17.7318 8.99202 17.6276 9.03303C17.4447 9.10559 17.2617 9.18446 17.085 9.26964C16.8957 9.36113 16.7128 9.45893 16.5329 9.56619C16.35 9.67345 16.1701 9.79018 15.9998 9.91322C15.8767 10.0016 15.7569 10.093 15.637 10.1877C15.5076 10.2918 15.3846 10.3991 15.2616 10.5095C15.1953 10.5694 15.1322 10.6325 15.066 10.6925L14.7315 11.0206L13.3939 12.3424L13.1636 12.5696L13.0879 12.6453C13.05 12.6831 13.0122 12.7178 12.9775 12.7557C12.9586 12.7746 12.9396 12.7904 12.9207 12.8093C12.8923 12.8377 12.8639 12.863 12.8355 12.8882C12.804 12.9166 12.7724 12.9481 12.7409 12.9765C11.9143 13.7368 10.9931 14.3899 9.99304 14.923C10.053 14.9514 10.1129 14.9798 10.1729 15.0051C10.2202 15.0271 10.2675 15.0492 10.3148 15.0713C10.359 15.0934 10.4063 15.1123 10.4536 15.1344C10.4978 15.1533 10.5451 15.1754 10.5893 15.1943C10.6398 15.2164 10.6871 15.2385 10.7376 15.2606C10.7944 15.2858 10.8511 15.3111 10.9079 15.3363C10.9616 15.3584 11.0184 15.3836 11.072 15.4057C11.1445 15.4373 11.2139 15.4657 11.2865 15.4941C11.3433 15.5193 11.4032 15.5414 11.46 15.5635C11.5484 15.5982 11.6367 15.636 11.7282 15.6707C11.8134 15.7023 11.8954 15.737 11.9806 15.7685C12.0437 15.7938 12.1068 15.8158 12.1699 15.8411C12.2803 15.8821 12.3875 15.9231 12.498 15.961C12.5547 15.9799 12.6084 16.002 12.6652 16.0209C12.744 16.0493 12.8197 16.0745 12.8986 16.1029C12.9617 16.125 13.028 16.1471 13.0911 16.1692C13.1857 16.2007 13.2803 16.2323 13.375 16.2638C13.4728 16.2954 13.5737 16.3269 13.6747 16.3585C13.7977 16.3963 13.9176 16.4342 14.0406 16.4689C14.1227 16.4941 14.2047 16.5162 14.2867 16.5414C14.4508 16.5888 14.618 16.6361 14.782 16.6803C14.842 16.696 14.9019 16.7118 14.9618 16.7244C15.0754 16.7528 15.189 16.7749 15.3026 16.7938C15.4319 16.8159 15.5613 16.8348 15.6906 16.8506C15.8673 16.8695 16.0408 16.8822 16.2143 16.8822C16.372 16.8853 16.5298 16.879 16.6844 16.8695C16.8326 16.8601 16.9778 16.8412 17.1229 16.8191C17.3248 16.7875 17.5204 16.7465 17.7128 16.6929C17.8422 16.6582 17.9715 16.6172 18.0977 16.5698C18.2144 16.5257 18.328 16.4815 18.4416 16.4279C18.5709 16.3679 18.7003 16.3048 18.8233 16.2354C18.8833 16.2007 18.9464 16.166 19.0063 16.1282C19.0631 16.0935 19.1199 16.0556 19.1767 16.0178C19.265 15.9578 19.3533 15.8947 19.4385 15.8316C19.5111 15.7748 19.5836 15.718 19.653 15.6581C19.7792 15.5508 19.8991 15.4341 20.0158 15.3142C20.0726 15.2543 20.1294 15.1943 20.183 15.1313C20.2524 15.0524 20.3187 14.9704 20.3849 14.8852C20.4354 14.8189 20.4859 14.7495 20.5364 14.6801C20.672 14.4845 20.7982 14.2763 20.9118 14.0586L21.0411 13.7999L22.2084 11.4748L22.2053 11.4812C22.5807 10.6578 23.1012 9.91953 23.7322 9.29488Z"
fill="#133C9A" />
</svg>

Before

Width:  |  Height:  |  Size: 6.1 KiB

-58
View File
@@ -1,58 +0,0 @@
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 878 404"
fill="none"
role="img"
aria-labelledby="ga-logo-title"
>
<title id="ga-logo-title">GenericAgent</title>
<style>
path { fill: #000; }
@media (prefers-color-scheme: dark) {
path { fill: #fff; }
}
</style>
<path
fill-rule="evenodd"
d="
M200 0
H489
L428 86
H187
C128.46 86 81 138.83 81 204
C81 269.17 130.47 322 189 322
H359
L401 404
H186
C83.27 404 0 313.57 0 202
C0 90.43 89.54 0 200 0
Z
M240 176
H463
L506 251
H187
Z
M407 251
H506
L401 404
L359 322
Z
M579 0
H638
L878 404
H781
L689 251
H506
L463 176
Z
M606 106
L648 174
H560
Z
"
/>
</svg>

Before

Width:  |  Height:  |  Size: 858 B

-1
View File
@@ -1 +0,0 @@
import{c as I,b as a,B as R,V as F,l as j,R as i,q as $,P as n,aw as Z,h as N,s as D}from"./tauri-compat-tfiFK9EG.js";function U(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{prefix:o="",length:s=7}=t,e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ",l=e.length;let g="";for(let m=0;m<s;m++){const c=Math.floor(Math.random()*l);g+=e.charAt(c)}return o?`${o}-${g}`:g}function H(t,o){if(typeof t=="string")return new Array(o).fill(t);if(Array.isArray(t)){const s=t.length;let e=t;if(s<o){let l=0;for(e=[];l<o;)e.push(t[l%s]),l++;return e}else s>o&&(e=t.slice(0,o));return e.reverse()}return["rgba(233,69,255)","rgba(166,71,255)","rgba(107,97,255)","rgba(46,140,255)"]}var X=function(t,o){var s={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(s[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,e=Object.getOwnPropertySymbols(t);l<e.length;l++)o.indexOf(e[l])<0&&Object.prototype.propertyIsEnumerable.call(t,e[l])&&(s[e[l]]=t[e[l]]);return s};function G(t){const{fill:o}=t,s=X(t,["fill"]),e=U({prefix:"semi-ai-loading"}),[l,g,m,c]=H(o,4);return a.createElement("svg",Object.assign({viewBox:"0 0 16 16",width:"1em",height:"1em",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},s),a.createElement("path",{d:"M15.1112 7.99978C15.1112 4.07242 11.9275 0.888672 8.00009 0.888672C5.18219 0.888672 2.74711 2.52771 1.59619 4.90445",stroke:`url(#${e})`,strokeWidth:"1.77778",strokeLinecap:"round"}),a.createElement("defs",null,a.createElement("linearGradient",{id:e,x1:"16",y1:"8",x2:"2.68594",y2:"11.022",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:l}),a.createElement("stop",{offset:"0.3",stopColor:g}),a.createElement("stop",{offset:"0.6",stopColor:m}),a.createElement("stop",{offset:"1",stopColor:c,stopOpacity:"0"}))))}const V=I(G,"ai_loading");function q(t){return a.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},t),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m10.23 2.4-8.7 16.67A2 2 0 0 0 3.3 22h17.4a2 2 0 0 0 1.77-2.93L13.77 2.4a2 2 0 0 0-3.54 0ZM13.14 14a1.15 1.15 0 0 1-2.28 0l-.58-4.03a1.73 1.73 0 1 1 3.44 0l-.58 4.03Zm.36 4.49a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z",fill:"currentColor"}))}const se=I(q,"alert_triangle");function W(t){return a.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},t),a.createElement("path",{d:"M17.66 19.78a1.5 1.5 0 0 0 2.12-2.12L14.12 12l5.66-5.66a1.5 1.5 0 0 0-2.12-2.12L12 9.88 6.34 4.22a1.5 1.5 0 1 0-2.12 2.12L9.88 12l-5.66 5.66a1.5 1.5 0 0 0 2.12 2.12L12 14.12l5.66 5.66Z",fill:"currentColor"}))}const re=I(W,"close");function K(t){return a.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},t),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm2-16a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm-5 3.75c0-.41.34-.75.75-.75h2.75a1 1 0 0 1 1 1v5.5h.75a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5h.75v-5h-.75a.75.75 0 0 1-.75-.75Z",fill:"currentColor"}))}const ie=I(K,"info_circle"),B={PREFIX:`${R}-button`},w={sizes:["default","small","large"],iconPositions:["left","right"],htmlTypes:["button","reset","submit"],btnTypes:["primary","secondary","tertiary","warning","danger"],themes:["solid","borderless","light","outline"],DEFAULT_ICON_POSITION:"left"},Q={SIZE:["extra-small","small","default","large","extra-large","custom"]};var Y=function(t,o){var s={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(s[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,e=Object.getOwnPropertySymbols(t);l<e.length;l++)o.indexOf(e[l])<0&&Object.prototype.propertyIsEnumerable.call(t,e[l])&&(s[e[l]]=t[e[l]]);return s};const J=w.sizes,{htmlTypes:ee,btnTypes:te}=w;let E=class extends a.PureComponent{render(){const o=this.props,{children:s,block:e,htmlType:l,loading:g,circle:m,className:c,style:f,disabled:p,size:P,theme:u,type:h,colorful:C,prefixCls:r,iconPosition:T}=o,y=Y(o,["children","block","htmlType","loading","circle","className","style","disabled","size","theme","type","colorful","prefixCls","iconPosition"]),S=Object.assign(Object.assign({disabled:p},F(y,["x-semi-children-alias"])),{className:j(r,{[`${r}-${h}`]:!p&&h,[`${r}-disabled`]:p,[`${r}-size-large`]:P==="large",[`${r}-size-small`]:P==="small",[`${r}-block`]:e,[`${r}-circle`]:m,[`${r}-${u}`]:u,[`${r}-${h}-disabled`]:p&&h,[`${r}-colorful`]:C},c),type:l,"aria-disabled":p}),O={};return c&&c.includes("-with-icon")||(O["x-semi-prop"]=this.props["x-semi-children-alias"]||"children"),i.createElement("button",Object.assign({},S,{onClick:this.props.onClick,onMouseDown:this.props.onMouseDown,style:f}),i.creaLine truncated
-1
View File
@@ -1 +0,0 @@
.semi-banner{padding:12px}.semi-banner-content-wrapper{display:flex;flex-direction:row}.semi-banner-description{margin:0}.semi-banner .semi-banner-content-wrapper .semi-banner-content{display:flex;flex:1}.semi-banner-in-container{border-radius:var(--semi-border-radius-small)}.semi-banner-in-container .semi-banner-content-wrapper .semi-banner-content-body{flex:1}.semi-banner-in-container .semi-banner-content-wrapper .semi-banner-content-body .semi-banner-title+.semi-banner-description{margin-top:2px}.semi-banner-full .semi-banner-content-wrapper .semi-banner-content{justify-content:center}.semi-banner-full .semi-banner-content-wrapper .semi-banner-icon,.semi-banner-full .semi-banner-content-wrapper .semi-banner-content-body{display:flex;align-items:center}.semi-banner-close{margin-left:12px;height:24px;width:24px}.semi-banner-extra{margin-top:8px}.semi-banner-icon{display:flex;margin-right:12px}.semi-banner-info{background-color:var(--semi-color-info-light-default);color:var(--semi-color-info)}.semi-banner-info.semi-banner-bordered{border:1px solid var(--semi-color-info)}.semi-banner-warning{background-color:var(--semi-color-warning-light-default);color:var(--semi-color-warning)}.semi-banner-warning.semi-banner-bordered{border:1px solid var(--semi-color-warning)}.semi-banner-success{background-color:var(--semi-color-success-light-default);color:var(--semi-color-success)}.semi-banner-success.semi-banner-bordered{border:1px solid var(--semi-color-success)}.semi-banner-danger{background-color:var(--semi-color-danger-light-default);color:var(--semi-color-danger)}.semi-banner-danger.semi-banner-bordered{border:1px solid var(--semi-color-danger)}.semi-rtl .semi-banner,.semi-portal-rtl .semi-banner{direction:rtl}.semi-rtl .semi-banner-close,.semi-portal-rtl .semi-banner-close{margin-left:0;margin-right:12px;height:24px;width:24px}.semi-rtl .semi-banner-icon,.semi-portal-rtl .semi-banner-icon{margin-right:0;margin-left:12px}
-1
View File
@@ -1 +0,0 @@
.semi-button-split{display:inline-block}.semi-button-split .semi-button{border-radius:0;margin-right:1px}.semi-button-split .semi-button-first{border-top-left-radius:var(--semi-border-radius-small);border-bottom-left-radius:var(--semi-border-radius-small)}.semi-button-split .semi-button-last{border-top-right-radius:var(--semi-border-radius-small);border-bottom-right-radius:var(--semi-border-radius-small);margin-right:unset}.semi-button-split:hover .semi-button-borderless:active{background-color:var(--semi-color-fill-1)}.semi-button{--semi-button-colorful-multiple-fill-0: rgba(var(--semi-ai-general-5-3));--semi-button-colorful-multiple-fill-1: rgba(var(--semi-ai-general-5-2));--semi-button-colorful-multiple-fill-2: rgba(var(--semi-ai-general-5-1));--semi-button-colorful-multiple-fill-3: rgba(var(--semi-ai-general-5-0));--semi-button-colorful-disabled-fill: var(--semi-color-disabled-text);--semi-button-colorful-fill-primary: var(--semi-color-ai-purple);--semi-button-colorful-fill-secondary: var(--semi-color-text-0)}.semi-button{box-shadow:none;height:32px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;border:0 transparent solid;border-radius:var(--semi-border-radius-small);padding:6px 12px;font-size:14px;line-height:20px;font-weight:600;outline:none;vertical-align:middle;white-space:nowrap}.semi-button.semi-button-primary:focus-visible,.semi-button.semi-button-secondary:focus-visible,.semi-button.semi-button-tertiary:focus-visible,.semi-button.semi-button-warning:focus-visible,.semi-button.semi-button-danger:focus-visible{outline:2px solid var(--semi-color-primary-light-active)}.semi-button-content{display:flex;align-items:center}.semi-button-danger{background-color:var(--semi-color-danger);color:rgba(var(--semi-white),1);transition:background-color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none),border var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none);transform:scale(var(--semi-transform_scale-none))}.semi-button-danger-disabled{background-color:var(--semi-color-disabled-bg)}.semi-button-danger-disabled.semi-button-outline{background-color:transparent;border:1px solid var(--semi-color-border)}.semi-button-danger-disabled.semi-button-light{background-color:var(--semi-color-fill-0)}.semi-button-danger:hover{background-color:var(--semi-color-danger-hover)}.semi-button-danger:active{background-color:var(--semi-color-danger-active)}.semi-button-danger.semi-button-outline{background-color:transparent;border:1px solid var(--semi-color-danger)}.semi-button-danger.semi-button-light,.semi-button-danger.semi-button-outline,.semi-button-danger.semi-button-borderless{color:var(--semi-color-danger)}.semi-button-danger:not(.semi-button-borderless):not(.semi-button-light):focus-visible{outline:2px solid var(--semi-color-danger-light-active)}.semi-button-warning{background-color:var(--semi-color-warning);color:rgba(var(--semi-white),1);transition:background-color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none),border var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none);transform:scale(var(--semi-transform_scale-none))}.semi-button-warning-disabled{background-color:var(--semi-color-disabled-bg)}.semi-button-warning-disabled.semi-button-outline{background-color:transparent;border:1px solid var(--semi-color-border)}.semi-button-warning-disabled.semi-button-light{background-color:var(--semi-color-fill-0)}.semi-button-warning:hover{background-color:var(--semi-color-warning-hover)}.semi-button-warning:active{background-color:var(--semi-color-warning-active)}.semi-button-warning.semi-button-outline{background-color:transparent;border:1px solid var(--semi-color-warning)}.semi-button-warning.semi-button-light,.semi-button-warning.semi-button-outline,.semi-button-warning.semi-button-borderless{color:var(--semi-color-warning)}.semi-button-warning:not(.semi-button-borderless):not(.semi-button-light):focus-visible{outline:2px solid var(--semi-color-warning-light-active)}.semi-button-tertiary{background-color:var(--semi-color-tertiary);color:rgba(var(--semi-white),1);transition:background-color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none),border var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none);transform:scale(var(--semi-transform_scale-none))}.semi-button-tertiary.semi-button-colorful.semi-button-solid{background:var(--semi-ai-general-0)}.semi-button-tertiary.semi-button-colorful.semi-button-solid:hover{background:var(--semi-ai-general-1)}.semi-button-tertiary.semi-button-colorful.semi-button-solid:active{background:var(--semi-ai-general-2)}.semi-button-tertiary.semi-button-colorful.semi-button-solid .semi-Line truncated
Loaded 100 of 206 files, more files were not shown because too many files have changed in this diff. Show more