fix: remove all showAlert dialogs, use visual feedback only
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
12887a3177
commit
ff38deb470
1 changed files with 3 additions and 6 deletions
|
|
@ -404,7 +404,6 @@ async function sendCommand(cmd) {
|
||||||
if (!res.ok) throw new Error('API error: ' + res.status);
|
if (!res.ok) throw new Error('API error: ' + res.status);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
tg.showAlert('Failed to send command');
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -414,10 +413,7 @@ async function sendCustomCmd() {
|
||||||
const btn = input.nextElementSibling;
|
const btn = input.nextElementSibling;
|
||||||
const cmd = input.value.trim();
|
const cmd = input.value.trim();
|
||||||
if (!cmd) return;
|
if (!cmd) return;
|
||||||
if (!cmd.startsWith('/')) {
|
if (!cmd.startsWith('/')) return;
|
||||||
tg.showAlert('Command must start with /');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const ok = await sendCommand(cmd);
|
const ok = await sendCommand(cmd);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
input.value = '';
|
input.value = '';
|
||||||
|
|
@ -436,12 +432,13 @@ async function sendSkillCommand() {
|
||||||
|
|
||||||
async function startPlan() {
|
async function startPlan() {
|
||||||
const input = document.getElementById('plan-task');
|
const input = document.getElementById('plan-task');
|
||||||
|
const btn = input.nextElementSibling;
|
||||||
const task = input.value.trim();
|
const task = input.value.trim();
|
||||||
if (!task) return;
|
if (!task) return;
|
||||||
const ok = await sendCommand('/plan ' + task);
|
const ok = await sendCommand('/plan ' + task);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
input.value = '';
|
input.value = '';
|
||||||
tg.showAlert('Plan started!');
|
flashSent(btn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue