Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/desktop-release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ jobs:
- name: Validate six assets and publish prerelease
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
TAG_NAME: ${{ github.ref_name }}
TARGET_SHA: ${{ github.sha }}
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion frontends/desktop/dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The public React source of truth and the place for renderer issues, pull request

- <https://github.com/abraxas914/GenericAgent>
- Exact source used for this distribution:
[`21f12f6dfe57ada8572bb21fe6604caac230b1cf`](https://github.com/abraxas914/GenericAgent/commit/21f12f6dfe57ada8572bb21fe6604caac230b1cf)
[`9fe5d69b85cfad8778ace84b6f69bc75f9e0d392`](https://github.com/abraxas914/GenericAgent/commit/9fe5d69b85cfad8778ace84b6f69bc75f9e0d392)

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
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions frontends/desktop/dist/build-provenance.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"product": "GenericAgent React Desktop 2.0",
"version": "0.2.0",
"sourceRepository": "https://github.com/abraxas914/GenericAgent",
"sourceCommit": "21f12f6dfe57ada8572bb21fe6604caac230b1cf",
"sourceCommit": "9fe5d69b85cfad8778ace84b6f69bc75f9e0d392",
"generatedAssetCount": 98,
"generatedManifestSha256": "7ed4bd56d50919d1ea6f92f60658403f19a93f117612704252f6e154ba39f92e"
"generatedManifestSha256": "bd1ee4cd8f0d3b8c00e8cf05a68af12d2ec0d6ff456212d2d5930e4ad6889ee2"
}
2 changes: 1 addition & 1 deletion frontends/desktop/dist/fallback.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1 id="page-title">完成启动设置</h1>
<p class="ga-picker-status" id="picker-status" role="status" aria-live="polite"></p>
<button class="ga-primary" id="retry" type="button">继续启动</button>
<details><summary id="diagnostics-label">诊断信息</summary><div class="ga-diagnostics-actions"><button class="ga-copy" id="copy" type="button">复制诊断信息</button><span class="ga-copy-status" id="copy-status" aria-live="polite"></span></div><pre id="diagnostics" tabindex="0">GenericAgent Desktop startup diagnostics</pre><p class="ga-privacy" id="privacy">诊断信息由启动服务脱敏后提供,包含本机路径和错误日志,不包含 API Key、会话或记忆内容。</p></details>
<details><summary id="help-feedback-label">帮助与反馈</summary><p class="ga-contact-copy" id="contact-copy">如果仍无法完成启动,可添加微信联系:</p><div class="ga-contact-ids"><code>RoundSquisheen</code><code>_Ashes_in_the_Snow_</code></div></details>
<details><summary id="help-feedback-label">帮助与反馈</summary><p class="ga-contact-copy" id="contact-copy">如果仍无法完成启动,可添加微信联系:</p><div class="ga-contact-ids"><code>RoundSquisheen</code><code>persist0612</code></div></details>
</main>
<script>
(function () {
Expand Down
62 changes: 31 additions & 31 deletions frontends/desktop/dist/index.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/svg+xml" href="/assets/ga-logo.svg">
<title>GenericAgent</title>
<script>
// FOUC prevention: apply cached appearance before first paint
(function(){
var l=localStorage.getItem('ga_lang'); if(l==='en') document.documentElement.lang='en';
var app=localStorage.getItem('ga_appearance')||'light';
document.documentElement.dataset.appearance=app;
var LEGACY_FONT={sm:12,md:14,lg:16};
function chatFontPx(v){
if(v&&LEGACY_FONT[v]) return LEGACY_FONT[v];
var n=parseInt(v,10); if(!isNaN(n)&&n>=10&&n<=20) return n;
return 14;
}
var fs=localStorage.getItem('ga_font_size');
var cfp=chatFontPx(fs);
document.documentElement.dataset.chatFont=String(cfp);
document.documentElement.style.setProperty('--chat-font',cfp+'px');
})();
</script>
<script type="module" crossorigin src="/assets/main-Knf6L_en.js"></script>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/svg+xml" href="/assets/ga-logo.svg">
<title>GenericAgent</title>
<script>
// FOUC prevention: apply cached appearance before first paint
(function(){
var l=localStorage.getItem('ga_lang'); if(l==='en') document.documentElement.lang='en';
var app=localStorage.getItem('ga_appearance')||'light';
document.documentElement.dataset.appearance=app;
var LEGACY_FONT={sm:12,md:14,lg:16};
function chatFontPx(v){
if(v&&LEGACY_FONT[v]) return LEGACY_FONT[v];
var n=parseInt(v,10); if(!isNaN(n)&&n>=10&&n<=20) return n;
return 14;
}
var fs=localStorage.getItem('ga_font_size');
var cfp=chatFontPx(fs);
document.documentElement.dataset.chatFont=String(cfp);
document.documentElement.style.setProperty('--chat-font',cfp+'px');
})();
</script>
<script type="module" crossorigin src="/assets/main-BlLQtfpq.js"></script>
<link rel="modulepreload" crossorigin href="/assets/tauri-compat-tfiFK9EG.js">
<link rel="modulepreload" crossorigin href="/assets/index-Bpi3BHKj.js">
<link rel="modulepreload" crossorigin href="/assets/WindowsTitlebar-CrkUa1UM.js">
<link rel="stylesheet" crossorigin href="/assets/tauri-compat-BTcpEvqB.css">
<link rel="stylesheet" crossorigin href="/assets/index-D0pGtk0y.css">
<link rel="stylesheet" crossorigin href="/assets/WindowsTitlebar-U0YG9JNA.css">
<link rel="stylesheet" crossorigin href="/assets/main-uLcKKTNv.css">
</head>
<body class="no-transition">
<div id="app"></div>
</body>
</html>
</head>
<body class="no-transition">
<div id="app"></div>
</body>
</html>
Expand Down
44 changes: 22 additions & 22 deletions frontends/desktop/dist/loading.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GenericAgent</title>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GenericAgent</title>
<style>
:root{color-scheme:light dark;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI","Microsoft YaHei UI",sans-serif;--ga-first-bg:#fff;--ga-first-text:#1c1f23;--ga-first-track:#e8e8e8;--ga-first-accent:#0064fa;background:var(--ga-first-bg);color:var(--ga-first-text)}
@media(prefers-color-scheme:dark){:root{--ga-first-bg:#16161a;--ga-first-text:#f2f3f5;--ga-first-track:#34363c;--ga-first-accent:#54a9ff}}
*{box-sizing:border-box}html,body,#loading-root{height:100%;margin:0}.ga-first-frame{height:100%;display:grid;place-items:center;background:var(--ga-first-bg)}.ga-first-spinner{width:28px;height:28px;border:3px solid var(--ga-first-track);border-top-color:var(--ga-first-accent);border-radius:50%;animation:ga-first-spin 1s linear infinite}@keyframes ga-first-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.ga-first-spinner{animation-duration:1.8s}}
</style>
<script>
window.__GA_LEGACY_PROGRESS__ = window.__GA_LEGACY_PROGRESS__ || [];
window.gaProgress = function (pct, key) {
window.__GA_LEGACY_PROGRESS__.push({ pct: pct, key: key });
};
</script>
</style>
<script>
window.__GA_LEGACY_PROGRESS__ = window.__GA_LEGACY_PROGRESS__ || [];
window.gaProgress = function (pct, key) {
window.__GA_LEGACY_PROGRESS__.push({ pct: pct, key: key });
};
</script>
<script type="module" crossorigin src="/assets/loading-VXGdS4iv.js"></script>
<link rel="modulepreload" crossorigin href="/assets/tauri-compat-tfiFK9EG.js">
<link rel="modulepreload" crossorigin href="/assets/index-D_sWIqse.js">
Expand All @@ -25,12 +25,12 @@
<link rel="stylesheet" crossorigin href="/assets/index-DkG9Cu-r.css">
<link rel="stylesheet" crossorigin href="/assets/WindowsTitlebar-U0YG9JNA.css">
<link rel="stylesheet" crossorigin href="/assets/loading-6Qy4iUUr.css">
</head>
<body>
<div id="loading-root">
<div class="ga-first-frame" aria-label="GenericAgent is starting">
<div class="ga-first-spinner" aria-hidden="true"></div>
</div>
</div>
</body>
</html>
</head>
<body>
<div id="loading-root">
<div class="ga-first-frame" aria-label="GenericAgent is starting">
<div class="ga-first-spinner" aria-hidden="true"></div>
</div>
</div>
</body>
</html>
Expand Down
84 changes: 42 additions & 42 deletions frontends/desktop/dist/setup.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GenericAgent — Fix startup</title>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GenericAgent — Fix startup</title>
<style>
:root{color-scheme:light dark;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI","Microsoft YaHei UI",sans-serif;--ga-setup-first-bg:#fff;--ga-setup-first-track:#e8e8e8;--ga-setup-first-accent:#0064fa;background:var(--ga-setup-first-bg)}
@media(prefers-color-scheme:dark){:root{--ga-setup-first-bg:#16161a;--ga-setup-first-track:#34363c;--ga-setup-first-accent:#54a9ff}}
*{box-sizing:border-box}html,body,#setup-root{height:100%;margin:0}.ga-setup-first-frame{height:100%;display:grid;place-items:center;background:var(--ga-setup-first-bg)}.ga-setup-first-spinner{width:28px;height:28px;border:3px solid var(--ga-setup-first-track);border-top-color:var(--ga-setup-first-accent);border-radius:50%;animation:ga-setup-first-spin 1s linear infinite}@keyframes ga-setup-first-spin{to{transform:rotate(360deg)}}
</style>
<script>
(function () {
var ready = false;
var timer = 0;
function fallback(reason) {
if (ready || window.__GA_SETUP_FALLBACK_STARTED__) return;
window.__GA_SETUP_FALLBACK_STARTED__ = true;
try { sessionStorage.setItem('ga-setup-fallback-reason', String(reason || 'setup_not_ready').slice(0, 120)); } catch (_) {}
location.replace('fallback.html');
}
window.__GA_SETUP_MARK_READY__ = function () {
ready = true;
window.__GA_SETUP_READY__ = true;
clearTimeout(timer);
window.removeEventListener('error', onError);
window.removeEventListener('unhandledrejection', onRejection);
};
function onError(event) { fallback(event && event.message ? event.message : 'setup_script_error'); }
function onRejection() { fallback('setup_unhandled_rejection'); }
window.addEventListener('error', onError);
window.addEventListener('unhandledrejection', onRejection);
timer = window.setTimeout(function () { fallback('setup_watchdog_timeout'); }, 8000);
window.__GA_SETUP_FALLBACK__ = fallback;
}());
</script>
<script type="module" crossorigin src="/assets/setup-BtYdaXRD.js"></script>
</style>
<script>
(function () {
var ready = false;
var timer = 0;
function fallback(reason) {
if (ready || window.__GA_SETUP_FALLBACK_STARTED__) return;
window.__GA_SETUP_FALLBACK_STARTED__ = true;
try { sessionStorage.setItem('ga-setup-fallback-reason', String(reason || 'setup_not_ready').slice(0, 120)); } catch (_) {}
location.replace('fallback.html');
}
window.__GA_SETUP_MARK_READY__ = function () {
ready = true;
window.__GA_SETUP_READY__ = true;
clearTimeout(timer);
window.removeEventListener('error', onError);
window.removeEventListener('unhandledrejection', onRejection);
};
function onError(event) { fallback(event && event.message ? event.message : 'setup_script_error'); }
function onRejection() { fallback('setup_unhandled_rejection'); }
window.addEventListener('error', onError);
window.addEventListener('unhandledrejection', onRejection);
timer = window.setTimeout(function () { fallback('setup_watchdog_timeout'); }, 8000);
window.__GA_SETUP_FALLBACK__ = fallback;
}());
</script>
<script type="module" crossorigin src="/assets/setup-B0HJZv-E.js"></script>
<link rel="modulepreload" crossorigin href="/assets/tauri-compat-tfiFK9EG.js">
<link rel="modulepreload" crossorigin href="/assets/index-Bpi3BHKj.js">
<link rel="modulepreload" crossorigin href="/assets/index-DpGuh58E.js">
Expand All @@ -43,12 +43,12 @@
<link rel="stylesheet" crossorigin href="/assets/index-D0pGtk0y.css">
<link rel="stylesheet" crossorigin href="/assets/index-ClU1uQYs.css">
<link rel="stylesheet" crossorigin href="/assets/setup-D74O8rBf.css">
</head>
<body>
<div id="setup-root">
<div class="ga-setup-first-frame" aria-label="Loading startup recovery">
<div class="ga-setup-first-spinner" aria-hidden="true"></div>
</div>
</div>
</body>
</html>
</head>
<body>
<div id="setup-root">
<div class="ga-setup-first-frame" aria-label="Loading startup recovery">
<div class="ga-setup-first-spinner" aria-hidden="true"></div>
</div>
</div>
</body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion frontends/desktop/scripts/verify-compiled-dist.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const desktopDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '.
const repoRoot = path.resolve(desktopDir, '..', '..');
const distDir = path.join(desktopDir, 'dist');
const expectedVersion = '0.2.0';
const expectedSourceCommit = '21f12f6dfe57ada8572bb21fe6604caac230b1cf';
const expectedSourceCommit = '9fe5d69b85cfad8778ace84b6f69bc75f9e0d392';
const expectedNoticeSha256 = '2acf865e87e59090121369aac0575467067fdd7999923a70d785a46ceae3330f';
const noticeAttributeRules = [
'frontends/desktop/public/THIRD_PARTY_NOTICES.txt text eol=lf',
Expand Down
17 changes: 16 additions & 1 deletion frontends/desktop_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,22 @@ def get_model_profile(self, profile_id: int) -> dict:
def update_model_profile(self, profile_id: int, data: dict) -> dict:
var, existing = self._profile_at(profile_id)
text = self._mykey_file().read_text(encoding="utf-8")
profiles = self._save_mykey_text(self._patch_var_block(text, var, self._build_cfg(data, existing, require_key=False)))

# Sync mixin llm_nos when name changes to avoid orphan references
old_name = str(existing.get("name") or existing.get("model") or "").strip()
new_cfg = self._build_cfg(data, existing, require_key=False)
new_name = str(new_cfg.get("name") or new_cfg.get("model") or "").strip()

if old_name != new_name:
keys, mk = self._mykey_vars()
mvar, mcfg = self._mixin_entry(keys, mk)
if mcfg and mvar is not None and old_name in [str(m) for m in (mcfg.get("llm_nos") or [])]:
# Replace old name with new name in mixin's llm_nos
updated_nos = [new_name if str(m) == old_name else str(m) for m in (mcfg.get("llm_nos") or [])]
mcfg = {**mcfg, "llm_nos": updated_nos}
text = self._patch_var_block(text, mvar, mcfg)

profiles = self._save_mykey_text(self._patch_var_block(text, var, new_cfg))
return {"varName": var, "profileId": profile_id, "profiles": profiles}

def delete_model_profile(self, profile_id: int) -> dict:
Expand Down