kingkont 0.7.21 → 0.7.23
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/index.html +4 -4
- package/package.json +1 -1
- package/server.js +2 -2
- package/settings.html +2 -1
- package/updates.html +8 -7
package/index.html
CHANGED
|
@@ -1837,19 +1837,19 @@ async function plannedProvider(kind) {
|
|
|
1837
1837
|
switch (kind) {
|
|
1838
1838
|
case 'text':
|
|
1839
1839
|
if (hasChatium) return 'kingkont';
|
|
1840
|
-
if (s.useOpenrouter
|
|
1840
|
+
if (s.useOpenrouter === true) return 'openrouter';
|
|
1841
1841
|
return 'none';
|
|
1842
1842
|
case 'audio': case 'tts': case 'sfx': case 'music':
|
|
1843
1843
|
if (hasChatium) return 'kingkont';
|
|
1844
|
-
if (s.useElevenlabs
|
|
1844
|
+
if (s.useElevenlabs === true) return 'elevenlabs';
|
|
1845
1845
|
return 'none';
|
|
1846
1846
|
case 'video':
|
|
1847
1847
|
if (hasChatium) return 'kingkont';
|
|
1848
|
-
if (s.useKie
|
|
1848
|
+
if (s.useKie === true) return 'kie';
|
|
1849
1849
|
return 'none';
|
|
1850
1850
|
case 'image':
|
|
1851
1851
|
if (hasChatium) return 'kingkont';
|
|
1852
|
-
if (s.useKie
|
|
1852
|
+
if (s.useKie === true) return 'kie';
|
|
1853
1853
|
return 'none';
|
|
1854
1854
|
default:
|
|
1855
1855
|
return '?';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kingkont",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.23",
|
|
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;
|
|
@@ -904,7 +904,7 @@ function start(port = PORT, opts = {}) {
|
|
|
904
904
|
console.log(` KIE_API_KEY: ${process.env.KIE_API_KEY ? '✓' : '✗ missing'}`);
|
|
905
905
|
console.log(` ELEVENLABS_API_KEY: ${process.env.ELEVENLABS_API_KEY ? '✓' : '✗ missing'}`);
|
|
906
906
|
const s = getSettings();
|
|
907
|
-
console.log(` providers: chatium=${s.useChatium
|
|
907
|
+
console.log(` providers: chatium=${s.useChatium === true ? '✓' : '✗'} openrouter=${s.useOpenrouter === true ? '✓' : '✗'} elevenlabs=${s.useElevenlabs === true ? '✓' : '✗'} kie=${s.useKie === true ? '✓' : '✗'}`);
|
|
908
908
|
resolveOk(addr.port);
|
|
909
909
|
});
|
|
910
910
|
});
|
package/settings.html
CHANGED
|
@@ -166,7 +166,8 @@ const $ = (id) => document.getElementById(id);
|
|
|
166
166
|
|
|
167
167
|
// Дефолт для use*-флагов: если в settings нет — true (back-compat для старых
|
|
168
168
|
// users, которые до этой версии просто пользовались всеми коннекторами).
|
|
169
|
-
|
|
169
|
+
// Default: ВЫКЛЮЧЕНО. Юзер явно включает нужный коннектор.
|
|
170
|
+
const useDefault = (v) => v === true;
|
|
170
171
|
|
|
171
172
|
// ---------- load ----------
|
|
172
173
|
async function loadSettings() {
|
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)}`;
|