beast-agent 0.24.3 → 0.24.5
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/package.json +1 -1
- package/src/main.js +21 -5
- package/src/renderer/renderer.js +8 -2
- package/src/renderer/style.css +2 -1
package/package.json
CHANGED
package/src/main.js
CHANGED
|
@@ -2285,11 +2285,24 @@ function ensureDesktopShortcut() {
|
|
|
2285
2285
|
try {
|
|
2286
2286
|
const desktop = app.getPath('desktop');
|
|
2287
2287
|
const lnk = path.join(desktop, 'Beast Agent.lnk');
|
|
2288
|
-
|
|
2288
|
+
/* çalışma klasörü kullanıcı home'u olsun: paket klasöründe başlarsa güncelleme
|
|
2289
|
+
cmd'si orada açılır ve npm install -g klasör kilidi (EBUSY) yemek zorunda kalır */
|
|
2290
|
+
const goodCwd = app.getPath('home');
|
|
2291
|
+
if (fs.existsSync(lnk)) {
|
|
2292
|
+
/* eski kısayollar paket klasörünü çalışma klasörü olarak taşıyordu — onar */
|
|
2293
|
+
try {
|
|
2294
|
+
const cur = shell.readShortcutLink(lnk);
|
|
2295
|
+
if (cur && cur.cwd && /node_modules[\\/]beast-agent/i.test(cur.cwd)) {
|
|
2296
|
+
shell.writeShortcutLink(lnk, 'update', { ...cur, cwd: goodCwd });
|
|
2297
|
+
log.info('main', 'Masaüstü kısayolu çalışma klasörü home\u2019a taşındı');
|
|
2298
|
+
}
|
|
2299
|
+
} catch {}
|
|
2300
|
+
return;
|
|
2301
|
+
}
|
|
2289
2302
|
const ok = shell.writeShortcutLink(lnk, 'create', {
|
|
2290
2303
|
target: process.execPath,
|
|
2291
2304
|
args: app.getAppPath(),
|
|
2292
|
-
cwd:
|
|
2305
|
+
cwd: goodCwd,
|
|
2293
2306
|
description: 'Beast Agent — hızlı, hafif ve becerikli',
|
|
2294
2307
|
icon: path.join(__dirname, '..', 'assets', 'app.ico'),
|
|
2295
2308
|
iconIndex: 0,
|
|
@@ -4105,11 +4118,14 @@ const NPM_ONLY_TEXT =
|
|
|
4105
4118
|
/* buton akışı: görünür cmd + "beast update" + uygulama kapanışı */
|
|
4106
4119
|
function npmUpdateViaCmd() {
|
|
4107
4120
|
try {
|
|
4108
|
-
|
|
4109
|
-
|
|
4121
|
+
/* cmd KULLANICININ kendi klasöründe açılır (cd /d %USERPROFILE%): Electron kısayoldan
|
|
4122
|
+
paket klasörü (node_modules\beast-agent) içinde başlatıldıysa cmd orada açılır ve
|
|
4123
|
+
npm install -g değiştirmeye çalıştığı paketi KİLİTLER (EBUSY) — 5 denemede de
|
|
4124
|
+
patlar. Home'da açılınca kurulum sorunsuz akar; "beast" PATH'te %APPDATA%\npm'de.
|
|
4125
|
+
NOT: spawn argümanlarında ÇİFT TIRNAK kullanma — node \" olarak escape'ler ve cmd bozar. */
|
|
4110
4126
|
spawn(
|
|
4111
4127
|
'cmd.exe',
|
|
4112
|
-
['/c', 'start', 'Beast Guncelleme', 'cmd', '/k',
|
|
4128
|
+
['/c', 'start', 'Beast Guncelleme', 'cmd', '/k', 'cd /d %USERPROFILE% && beast update'],
|
|
4113
4129
|
{ detached: true, stdio: 'ignore', windowsHide: false }
|
|
4114
4130
|
).unref();
|
|
4115
4131
|
} catch {}
|
package/src/renderer/renderer.js
CHANGED
|
@@ -1820,7 +1820,7 @@ async function renderUpdatePane(autoCheck) {
|
|
|
1820
1820
|
if (st.npm) {
|
|
1821
1821
|
actions = `<div class="form-grid" style="grid-template-columns:auto auto;gap:8px;margin-top:12px">
|
|
1822
1822
|
<button id="upCheck" class="btn ghost">${_t('up_check_now')}</button>
|
|
1823
|
-
<button id="upInstall" class="btn"
|
|
1823
|
+
<button id="upInstall" class="btn"><svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:-2px;margin-right:5px"><path d="M21 12a9 9 0 1 1-2.64-6.36"/><path d="M21 3v6h-6"/></svg>${_t('up_install_now')}</button>
|
|
1824
1824
|
</div>
|
|
1825
1825
|
<div class="sub" style="margin-top:8px">${_t('up_npm_only')}</div>`;
|
|
1826
1826
|
} else if (isDev) {
|
|
@@ -2478,7 +2478,13 @@ function renderGuestBotMenu() {
|
|
|
2478
2478
|
const candidates = botsCache.filter((b) => !b.admin && b.vis !== false);
|
|
2479
2479
|
menu.innerHTML = '';
|
|
2480
2480
|
if (!candidates.length) {
|
|
2481
|
-
|
|
2481
|
+
/* bot hiç yoksa yönlendir + tek tıkla oluştur; bot varsa da davet edilebilir değilse bilgi ver */
|
|
2482
|
+
const nonAdmin = botsCache.filter((b) => !b.admin).length;
|
|
2483
|
+
menu.innerHTML = nonAdmin
|
|
2484
|
+
? '<div class="dd-empty">Davet edilebilir görünür bot yok</div>'
|
|
2485
|
+
: '<div class="dd-empty">Henüz bot yok — <a href="#" id="gbCreate" style="color:var(--accent);font-weight:700">bot oluştur</a></div>';
|
|
2486
|
+
const cr = menu.querySelector('#gbCreate');
|
|
2487
|
+
if (cr) cr.addEventListener('click', (e) => { e.preventDefault(); menu.hidden = true; botAddClick(); });
|
|
2482
2488
|
return;
|
|
2483
2489
|
}
|
|
2484
2490
|
for (const b of candidates) {
|
package/src/renderer/style.css
CHANGED
|
@@ -1013,7 +1013,8 @@ body.term-open #settingsOverlay { right: var(--tw, 520px); }
|
|
|
1013
1013
|
padding: 0;
|
|
1014
1014
|
}
|
|
1015
1015
|
#guestBotBtn:hover { background: var(--panel); color: var(--accent); }
|
|
1016
|
-
|
|
1016
|
+
/* composer en altta olduğu için menü YUKARI açılır (aşağı açılırsa ekran dışına taşar) */
|
|
1017
|
+
#guestBotMenu { width: 260px; left: 0; top: auto; bottom: calc(100% + 5px); }
|
|
1017
1018
|
|
|
1018
1019
|
#micBtn {
|
|
1019
1020
|
width: 32px; height: 32px;
|