beast-agent 2.43.0 → 2.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/app.ico +0 -0
- package/assets/logo.png +0 -0
- package/assets/tray.png +0 -0
- package/package.json +1 -1
- package/src/main.js +51 -3
- package/src/renderer/index.html +3 -3
- package/src/renderer/style.css +26 -8
package/assets/app.ico
CHANGED
|
Binary file
|
package/assets/logo.png
ADDED
|
Binary file
|
package/assets/tray.png
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/main.js
CHANGED
|
@@ -3774,7 +3774,7 @@ function toastNotify(title, body, target) {
|
|
|
3774
3774
|
const n = new Notification({
|
|
3775
3775
|
title: String(title || 'Beast Agent').slice(0, 120),
|
|
3776
3776
|
body: String(body || '').slice(0, 240),
|
|
3777
|
-
icon: path.join(__dirname, '..', 'assets', '
|
|
3777
|
+
icon: path.join(__dirname, '..', 'assets', 'logo.png'),
|
|
3778
3778
|
silent: false,
|
|
3779
3779
|
});
|
|
3780
3780
|
n.on('click', () => {
|
|
@@ -4342,6 +4342,34 @@ function researchViewAt(idx) {
|
|
|
4342
4342
|
return v;
|
|
4343
4343
|
}
|
|
4344
4344
|
|
|
4345
|
+
/* Ajanın DERİN ARAŞTIRMADA okuduğu sayfalar gizli havuzda açılır (hız için);
|
|
4346
|
+
panel GÖRÜNÜR açıksa sayfa canlı izlensin diye aynı adres görünür view'e de
|
|
4347
|
+
yansıtılır. 500ms debounce + son adres kazanır: paralel okumalar paneli
|
|
4348
|
+
boğmaz, gizli modda (visible=false) hiçbir ek yük bindirmez. */
|
|
4349
|
+
let __mirrorTimer = null;
|
|
4350
|
+
let __mirrorUrl = '';
|
|
4351
|
+
function browserMirror(url) {
|
|
4352
|
+
try {
|
|
4353
|
+
if (!browser.open || !browser.visible) return;
|
|
4354
|
+
if (!browser.view || browser.view.webContents.isDestroyed()) return;
|
|
4355
|
+
const u = String(url || '').trim();
|
|
4356
|
+
if (!/^https?:\/\//i.test(u)) return;
|
|
4357
|
+
__mirrorUrl = u;
|
|
4358
|
+
if (__mirrorTimer) return;
|
|
4359
|
+
__mirrorTimer = setTimeout(() => {
|
|
4360
|
+
__mirrorTimer = null;
|
|
4361
|
+
const target = __mirrorUrl;
|
|
4362
|
+
if (!target || !browser.open || !browser.visible || !browser.view) return;
|
|
4363
|
+
const wc = browser.view.webContents;
|
|
4364
|
+
if (!wc || wc.isDestroyed()) return;
|
|
4365
|
+
let cur = '';
|
|
4366
|
+
try { cur = wc.getURL() || ''; } catch {}
|
|
4367
|
+
if (cur === target) return;
|
|
4368
|
+
try { wc.loadURL(target).catch(() => {}); } catch {}
|
|
4369
|
+
}, 500);
|
|
4370
|
+
} catch {}
|
|
4371
|
+
}
|
|
4372
|
+
|
|
4345
4373
|
async function researchRead(rawUrl, signal) {
|
|
4346
4374
|
const url = String(rawUrl || '').trim();
|
|
4347
4375
|
if (!/^https?:\/\//i.test(url)) return { ok: false, url, error: 'geçersiz adres' };
|
|
@@ -4360,6 +4388,7 @@ async function researchRead(rawUrl, signal) {
|
|
|
4360
4388
|
wc.once('did-finish-load', onDone);
|
|
4361
4389
|
wc.on('did-fail-load', onFail);
|
|
4362
4390
|
wc.loadURL(url).catch(() => {});
|
|
4391
|
+
browserMirror(url); /* panel görünürse ajanın okuduğu sayfa canlı izlenir */
|
|
4363
4392
|
});
|
|
4364
4393
|
/* SPA hidrasyonu için kısa settle; metin boşsa bir kez daha dene */
|
|
4365
4394
|
await new Promise((r) => setTimeout(r, RESEARCH_SETTLE_MS));
|
|
@@ -4589,6 +4618,19 @@ async function browserSearchNow(query, signal, ctx) {
|
|
|
4589
4618
|
? { ok: false, blocked: true, engine: 'browser-google', query: q, error: 'unusual traffic (CAPTCHA)' }
|
|
4590
4619
|
: null;
|
|
4591
4620
|
}
|
|
4621
|
+
/* İZLEME: fetch() sayfayı değiştirmediği için panel google.com ana sayfasında
|
|
4622
|
+
kalıyordu — görünür moddayken gerçek sonuç sayfasına geç ki kullanıcı ajanın
|
|
4623
|
+
ne aradığını canlı görsün (gizli modda ek yük yok; zaten sonuç sayfasındaysa
|
|
4624
|
+
fallback reload'u yapılmaz). */
|
|
4625
|
+
if (browser.visible) {
|
|
4626
|
+
let cur = '';
|
|
4627
|
+
try { cur = wc.getURL() || ''; } catch {}
|
|
4628
|
+
if (!cur.startsWith('https://www.google.com/search')) {
|
|
4629
|
+
try {
|
|
4630
|
+
wc.loadURL('https://www.google.com/search?q=' + encodeURIComponent(q) + '&num=10&hl=tr&pws=0&aep=1').catch(() => {});
|
|
4631
|
+
} catch {}
|
|
4632
|
+
}
|
|
4633
|
+
}
|
|
4592
4634
|
flushBrowserStorage();
|
|
4593
4635
|
const out = { ok: true, engine: 'browser-google', query: q, results };
|
|
4594
4636
|
if (parsed.ai) out.ai = parsed.ai;
|
|
@@ -4931,6 +4973,10 @@ function createSplash() {
|
|
|
4931
4973
|
const bg = dark ? '#0d0d0f' : '#f7f7f8';
|
|
4932
4974
|
const fg = dark ? '#f2f2f4' : '#17171a';
|
|
4933
4975
|
const muted = dark ? '#9a9aa2' : '#707078';
|
|
4976
|
+
let logoUri = '';
|
|
4977
|
+
try {
|
|
4978
|
+
logoUri = 'data:image/png;base64,' + fs.readFileSync(path.join(__dirname, '..', 'assets', 'logo.png')).toString('base64');
|
|
4979
|
+
} catch {}
|
|
4934
4980
|
splash = new BrowserWindow({
|
|
4935
4981
|
width: 420,
|
|
4936
4982
|
height: 352,
|
|
@@ -4944,7 +4990,9 @@ function createSplash() {
|
|
|
4944
4990
|
});
|
|
4945
4991
|
const html = `<!doctype html><html><head><meta charset="utf-8"><style>
|
|
4946
4992
|
body{margin:0;height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;background:${bg};font-family:'Segoe UI',sans-serif;color:${fg}}
|
|
4947
|
-
.logo{width:
|
|
4993
|
+
.logo{width:96px;height:96px;display:flex;align-items:center;justify-content:center}
|
|
4994
|
+
.logo img{width:100%;height:100%;object-fit:contain;border-radius:22px}
|
|
4995
|
+
.logo-fb{width:84px;height:84px;border-radius:20px;background:${fg};color:${bg};display:flex;align-items:center;justify-content:center;font-weight:900;font-size:44px}
|
|
4948
4996
|
.t{margin-top:16px;font-size:20px;color:${fg}}.t b{font-weight:900}
|
|
4949
4997
|
.v{margin-top:8px;font-size:12.5px;font-weight:800;letter-spacing:.6px;color:${muted};background:${muted}22;padding:2px 12px;border-radius:9px}
|
|
4950
4998
|
.s{margin-top:6px;font-size:12px;color:${muted}}
|
|
@@ -4955,7 +5003,7 @@ function createSplash() {
|
|
|
4955
5003
|
.bar>i{display:block;height:100%;width:40%;background:${fg};border-radius:2px;animation:sw 1.1s ease-in-out infinite}
|
|
4956
5004
|
@keyframes sw{0%{transform:translateX(-100%)}100%{transform:translateX(260%)}}
|
|
4957
5005
|
</style></head><body>
|
|
4958
|
-
<div class="logo">B</div>
|
|
5006
|
+
${logoUri ? `<div class="logo"><img src="${logoUri}" alt="Beast Agent"></div>` : '<div class="logo-fb">B</div>'}
|
|
4959
5007
|
<div class="t"><b>BEAST</b> Agent</div>
|
|
4960
5008
|
<div class="v">v${beastVersion()}</div>
|
|
4961
5009
|
<div class="s">hızlı · hafif · becerikli</div>
|
package/src/renderer/index.html
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta http-equiv="Content-Security-Policy"
|
|
6
|
-
content="default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; media-src 'self' blob: file:; script-src 'self'" />
|
|
6
|
+
content="default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: file:; media-src 'self' blob: file:; script-src 'self'" />
|
|
7
7
|
<title>Beast Agent</title>
|
|
8
8
|
<link rel="stylesheet" href="style.css" />
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="app">
|
|
12
12
|
<aside id="sidebar">
|
|
13
|
-
<div id="brand"><span class="brand-beast">BEAST</span><span class="brand-sub">Agent</span></div>
|
|
13
|
+
<div id="brand"><img id="brandLogo" src="../../assets/logo.png" alt="Beast Agent" draggable="false" /><span class="brand-beast">BEAST</span><span class="brand-sub">Agent</span></div>
|
|
14
14
|
<button id="newChat" title="Yeni sohbet" data-i18n="newChat">+ Yeni Sohbet</button>
|
|
15
15
|
<div id="sessList"></div>
|
|
16
16
|
<div id="watchPane">
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
|
|
122
122
|
<div id="chatScroll">
|
|
123
123
|
<div id="empty">
|
|
124
|
-
<div id="emptyLogo"
|
|
124
|
+
<div id="emptyLogo"><img src="../../assets/logo.png" alt="Beast Agent" draggable="false" /></div>
|
|
125
125
|
<div id="emptyHint" data-i18n="emptyHint">Hızlı · hafif · becerikli. Ne yapalım?</div>
|
|
126
126
|
</div>
|
|
127
127
|
<div id="msgs"></div>
|
package/src/renderer/style.css
CHANGED
|
@@ -88,14 +88,26 @@ body {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
#brand {
|
|
91
|
-
padding:
|
|
91
|
+
padding: 14px 16px 12px;
|
|
92
92
|
letter-spacing: 3px;
|
|
93
93
|
font-weight: 800;
|
|
94
94
|
text-align: center;
|
|
95
95
|
-webkit-app-region: drag;
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
gap: 7px;
|
|
100
|
+
}
|
|
101
|
+
#brandLogo {
|
|
102
|
+
width: 26px;
|
|
103
|
+
height: 26px;
|
|
104
|
+
display: block;
|
|
105
|
+
flex: none;
|
|
106
|
+
box-shadow: 0 0 0 1px var(--border);
|
|
107
|
+
border-radius: 6px;
|
|
96
108
|
}
|
|
97
109
|
.brand-beast { color: var(--accent); font-size: 17px; }
|
|
98
|
-
.brand-sub { color: var(--muted); font-size: 11px;
|
|
110
|
+
.brand-sub { color: var(--muted); font-size: 11px; letter-spacing: 2px; }
|
|
99
111
|
|
|
100
112
|
#newChat {
|
|
101
113
|
margin: 4px 12px 10px;
|
|
@@ -860,12 +872,18 @@ body.term-dragging * { cursor: row-resize !important; }
|
|
|
860
872
|
gap: 10px;
|
|
861
873
|
}
|
|
862
874
|
#emptyLogo {
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
875
|
+
width: 132px;
|
|
876
|
+
height: 132px;
|
|
877
|
+
opacity: 0.95;
|
|
878
|
+
}
|
|
879
|
+
#emptyLogo img {
|
|
880
|
+
width: 100%;
|
|
881
|
+
height: 100%;
|
|
882
|
+
object-fit: contain;
|
|
883
|
+
display: block;
|
|
884
|
+
box-shadow: 0 0 0 1px var(--border);
|
|
885
|
+
border-radius: 26px;
|
|
886
|
+
filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.28));
|
|
869
887
|
}
|
|
870
888
|
#emptyHint { color: var(--muted); }
|
|
871
889
|
|