Personal Telegram developer console for GitHub
feat(ops): add in-context provider live probe
davoodmehraban89 committed
Oct 4, 2026 at 17:51 UTC
6a077144e3846b54c5c7d5b1d0b55ff4ba7e2870
1 file changed
+9
-5
src/ops-menu.js
+9
-5
@@ -173,15 +173,15 @@ ${lines}
173
};
174
}
175
176
- async getGitHubProbeView() {
176
+ async getGitHubProbeView(backCallback = 'menu:tools', refreshCallback = 'ops:github') {
177
const probe = await this.diagnostics.probeGitHub();
178
return {
179
text: probe.ok
180
? `🐙 <b>تست اتصال GitHub</b>\n➖➖➖➖➖➖➖➖➖➖\n✅ READ زنده موفق بود.\nمالک: <code>${escapeHtml(probe.owner)}</code>\nRepositoryهای قابل مشاهده: <b>${probe.repositoryCount}</b>\n\nهیچ WRITEای انجام نشد.`
181
: `🐙 <b>تست اتصال GitHub</b>\n➖➖➖➖➖➖➖➖➖➖\n❌ READ زنده ناموفق بود.\n${escapeHtml(probe.error || 'خطای نامشخص')}\n\nهیچ وضعیت موفق ساختگی نمایش داده نمیشود.`,
182
reply_markup: { inline_keyboard: [
183
- [{ text: '🔄 تست دوباره', callback_data: 'ops:github' }],
184
- backRow('🔙 ابزارها', 'menu:tools')
183
+ [{ text: '🔄 تست دوباره', callback_data: refreshCallback }],
184
+ backRow(backCallback === 'menu:settings' ? '🔙 پیکربندی' : '🔙 ابزارها', backCallback)
185
] }
186
};
187
}
@@ -263,8 +263,11 @@ WRITE فقط بعد از تأیید معتبر اجرا میشود و Approva
263
• Telegram Bot credential: ${configuredText(snapshot.telegramConfigured)}
264
• Telegram Webhook secret: ${configuredText(snapshot.webhookSecretConfigured)}
265
266
-مقادیر Credential نمایش داده نمیشوند. اتصال زنده GitHub را از «ابزارها → تست اتصال GitHub» بررسی کنید.`,
267
- reply_markup: { inline_keyboard: [backRow('🔙 پیکربندی', 'menu:settings')] }
266
+مقادیر Credential نمایش داده نمیشوند. برای اعتبارسنجی Provider، تست READ زنده GitHub را مستقیماً اجرا کنید.`,
267
+ reply_markup: { inline_keyboard: [
268
+ [{ text: '🐙 تست زنده GitHub', callback_data: 'config:github' }],
269
+ backRow('🔙 پیکربندی', 'menu:settings')
270
+ ] }
271
};
272
}
273
@@ -308,6 +311,7 @@ WRITE فقط بعد از تأیید معتبر اجرا میشود و Approva
311
if (action === 'config') {
312
if (target === 'runtime') return this.getRuntimeView('menu:settings');
313
if (target === 'providers') return this.getProvidersView();
314
+ if (target === 'github') return this.getGitHubProbeView('menu:settings', 'config:github');
315
if (target === 'editor') return this.getEditorConfigView();
316
if (target === 'plugins') return this.getPluginsView('menu:settings');
317
}