kingkont 0.7.21 → 0.7.22
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/server.js +1 -1
- package/updates.html +8 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kingkont",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.22",
|
|
4
4
|
"description": "KingKont \u00b7 Chatium \u2014 \u043d\u043e\u0434-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0441\u0446\u0435\u043d \u0441 AI-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 (\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438/\u0432\u0438\u0434\u0435\u043e/\u0433\u043e\u043b\u043e\u0441/SFX/\u043c\u0443\u0437\u044b\u043a\u0430/\u0442\u0435\u043a\u0441\u0442)",
|
|
5
5
|
"main": "main.js",
|
|
6
6
|
"bin": {
|
package/server.js
CHANGED
|
@@ -100,7 +100,7 @@ async function chatiumStart(s, kind, body) {
|
|
|
100
100
|
let data; try { data = JSON.parse(text); } catch { data = { raw: text }; }
|
|
101
101
|
if (!r.ok) {
|
|
102
102
|
const reason = data?.reason || data?.error || data?.raw || `HTTP ${r.status}`;
|
|
103
|
-
throw new Error(`Chatium /api/${kind} HTTP ${r.status}: ${String(reason).slice(0,
|
|
103
|
+
throw new Error(`Chatium /api/${kind} HTTP ${r.status}: ${String(reason).slice(0, 800)}`);
|
|
104
104
|
}
|
|
105
105
|
if (!data.taskId) throw new Error(`Chatium /api/${kind} вернул без taskId: ${text.slice(0, 200)}`);
|
|
106
106
|
return data.taskId;
|
package/updates.html
CHANGED
|
@@ -89,22 +89,22 @@
|
|
|
89
89
|
</div>
|
|
90
90
|
</div>
|
|
91
91
|
<div id="updateBlock" style="display:none;">
|
|
92
|
-
<div style="display:flex; gap:8px; align-items:center; margin-top:6px;">
|
|
92
|
+
<div style="display:flex; gap:8px; align-items:center; margin-top:6px; flex-wrap:wrap;">
|
|
93
93
|
<button class="primary" id="installBtn" style="padding:8px 16px;">⬇ Установить и перезапустить</button>
|
|
94
|
+
<button class="primary" id="relaunchBtn" style="padding:8px 16px; display:none; background: var(--ok); border-color: var(--ok);">↻ Перезапустить сейчас</button>
|
|
94
95
|
<span style="color:#888; font-size:11px;">или вручную:</span>
|
|
95
96
|
</div>
|
|
96
97
|
<div class="install-cmd">
|
|
97
98
|
<code id="installCmd">npm i -g kingkont@latest</code>
|
|
98
99
|
<button class="copy" id="copyBtn">Скопировать</button>
|
|
99
100
|
</div>
|
|
100
|
-
<
|
|
101
|
+
<div id="installDone" style="display:none; color: var(--ok); margin-top: 8px; font-size: 12px;">
|
|
102
|
+
✓ Установлено. Кнопка «Перезапустить сейчас» — выше.
|
|
103
|
+
</div>
|
|
104
|
+
<pre id="installLog" style="display:none; max-height:200px; overflow-y:auto; margin-top:10px;
|
|
101
105
|
font-family: ui-monospace, monospace; font-size: 11px; line-height: 1.4;
|
|
102
106
|
background: #0e0e0e; border: 1px solid #2a2a2a; border-radius: 4px;
|
|
103
107
|
padding: 8px 10px; color: #aaa; white-space: pre-wrap; word-break: break-all;"></pre>
|
|
104
|
-
<div id="installDone" style="display:none; color: var(--ok); margin-top: 10px; font-size: 12px;">
|
|
105
|
-
✓ Установлено! Можно перезапустить:
|
|
106
|
-
<button class="primary" id="relaunchBtn" style="padding:5px 12px; font-size:12px; margin-left:6px;">Перезапустить</button>
|
|
107
|
-
</div>
|
|
108
108
|
</div>
|
|
109
109
|
<div id="upToDate" style="display:none; color: var(--ok); font-size: 12px; margin-top: 6px;">
|
|
110
110
|
✓ У вас последняя версия.
|
|
@@ -185,7 +185,8 @@ $('installBtn').addEventListener('click', async () => {
|
|
|
185
185
|
try {
|
|
186
186
|
await window.appUpdates.install(target);
|
|
187
187
|
done.style.display = '';
|
|
188
|
-
installBtn.
|
|
188
|
+
installBtn.style.display = 'none';
|
|
189
|
+
$('relaunchBtn').style.display = '';
|
|
189
190
|
} catch (e) {
|
|
190
191
|
log.style.color = '#f88';
|
|
191
192
|
log.textContent += `\n[error] ${e?.message || String(e)}`;
|