feat(settings): move IM bot to top-level menu

Remove the legacy Plugins-tab registrations, keep the channel-logo navigation, and harden upgrade/package verification.
This commit is contained in:
xmanrui 2026-08-25 22:42:41 +08:00
parent 892e18db77
commit 1ce8126edb
30 changed files with 815 additions and 842 deletions

View file

@ -159,7 +159,7 @@ function artifactFailureText(fileName, error) {
const name = String(fileName ?? t('结果文件')).replace(/[\r\n]+/g, ' ').trim() || t('结果文件');
switch (error?.code) {
case 'artifact-permission-required':
return t('结果文件「{name}」已生成,但机器人缺少飞书文件上传权限 im:resource。请私聊机器人执行 /repair 命令,或者在插件页面点击“补全权限”按钮并扫码。完成飞书要求的发布审批后重试。', { name });
return t('结果文件「{name}」已生成,但机器人缺少飞书文件上传权限 im:resource。请私聊机器人执行 /repair 命令,或者在「IM机器人」设置页点击“补全权限”按钮并扫码。完成飞书要求的发布审批后重试。', { name });
case 'artifact-too-large':
return t('结果文件「{name}」超过飞书 30 MB 上限,未发送。', { name });
case 'artifact-empty':

View file

@ -5,7 +5,7 @@ const FEISHU_MISSING_MESSAGE_SCOPE_CODE = 99991672;
const FEISHU_ERROR_BODY_LIMIT = 64 * 1024;
const FEISHU_ERROR_BODY_TIMEOUT_MS = 1_000;
const FEISHU_IMAGE_PERMISSION_MESSAGE =
'飞书机器人缺少图片读取权限 im:message:readonly(飞书显示为“获取单聊、群组消息”)。请私聊机器人执行 /repair 命令,或者在插件页面点击“补全权限”按钮并扫码。按飞书提示发布新版本、完成必要审批后,再重新发送图片。';
'飞书机器人缺少图片读取权限 im:message:readonly(飞书显示为“获取单聊、群组消息”)。请私聊机器人执行 /repair 命令,或者在「IM机器人」设置页点击“补全权限”按钮并扫码。按飞书提示发布新版本、完成必要审批后,再重新发送图片。';
export function conversationKey(event) {
const chatType = event?.message?.chat_type;

View file

@ -29,7 +29,7 @@ export function connectionTestTarget(state) {
export function connectionTestMessage(botName, channelLabel = t('机器人')) {
const name = cleanText(botName) ?? channelLabel;
return `${t('✅ DeepSeek Harness 连接测试成功')}\n${t('这条消息由插件页面中的“{name}”机器人卡片发出。', { name })}`;
return `${t('✅ DeepSeek Harness 连接测试成功')}\n${t('这条消息由「IM机器人」设置页中的“{name}”机器人卡片发出。', { name })}`;
}
export function connectionTestTargetUnavailable(channelLabel = t('机器人')) {

View file

@ -18,8 +18,8 @@ export default {
'机器人正在移除或已重新接入,无法操作原会话的工作区。':
'The bot is being removed or has been reconnected; the original session’s workspace cannot be changed.',
'操作失败,请稍后重试。': 'The operation failed. Please try again later.',
'结果文件「{name}」已生成,但机器人缺少飞书文件上传权限 im:resource。请私聊机器人执行 /repair 命令,或者在插件页面点击“补全权限”按钮并扫码。完成飞书要求的发布审批后重试。':
'The result file "{name}" was generated, but the bot lacks the Feishu file-upload scope im:resource. Run /repair in a direct chat with the bot, or click the “Complete permissions” button on the plugin page and scan the QR code. Complete any publishing approval Feishu requires, then try again.',
'结果文件「{name}」已生成,但机器人缺少飞书文件上传权限 im:resource。请私聊机器人执行 /repair 命令,或者在「IM机器人」设置页点击“补全权限”按钮并扫码。完成飞书要求的发布审批后重试。':
'The result file "{name}" was generated, but the bot lacks the Feishu file-upload scope im:resource. Run /repair in a direct chat with the bot, or click the “Complete permissions” button on the IM Bot settings page and scan the QR code. Complete any publishing approval Feishu requires, then try again.',
'结果文件「{name}」超过飞书 30 MB 上限,未发送。':
'The result file "{name}" exceeds the Feishu 30 MB limit and was not sent.',
'结果文件「{name}」为空,飞书不允许发送空文件。':
@ -28,8 +28,8 @@ export default {
'The result file "{name}" was temporarily rate-limited by Feishu and could not be sent. Please try again later.',
'结果文件「{name}」已生成,但暂时未能发送,请稍后重试。':
'The result file "{name}" was generated but could not be sent right now. Please try again later.',
'处理失败,请稍后重试。如果问题持续,请在 DeepSeek Harness 的飞书插件页面检查连接状态。':
'Message processing failed. Please try again later. If the problem persists, check the connection status on the Feishu plugin page in DeepSeek Harness.',
'处理失败,请稍后重试。如果问题持续,请在 DeepSeek Harness 的「IM机器人」设置页检查飞书连接状态。':
'Message processing failed. Please try again later. If the problem persists, check the Feishu connection status on the IM Bot settings page in DeepSeek Harness.',
'已开启全新 Harness 会话。': 'A brand-new Harness session has started.',
'飞书机器人与 DeepSeek Harness 连接正常。':
'The Feishu bot is connected to DeepSeek Harness and working normally.',
@ -338,8 +338,8 @@ export default {
'飞书机器人': 'Feishu bot',
// feishu/message-utils.mjs
'飞书机器人缺少图片读取权限 im:message:readonly(飞书显示为“获取单聊、群组消息”)。请私聊机器人执行 /repair 命令,或者在插件页面点击“补全权限”按钮并扫码。按飞书提示发布新版本、完成必要审批后,再重新发送图片。':
'The Feishu bot is missing the image-read scope im:message:readonly, shown by Feishu as “Read direct and group messages.” Run /repair in a direct chat with the bot, or click the “Complete permissions” button on the plugin page and scan the QR code. Publish a new version and complete any approval requested by Feishu, then resend the image.',
'飞书机器人缺少图片读取权限 im:message:readonly(飞书显示为“获取单聊、群组消息”)。请私聊机器人执行 /repair 命令,或者在「IM机器人」设置页点击“补全权限”按钮并扫码。按飞书提示发布新版本、完成必要审批后,再重新发送图片。':
'The Feishu bot is missing the image-read scope im:message:readonly, shown by Feishu as “Read direct and group messages.” Run /repair in a direct chat with the bot, or click the “Complete permissions” button on the IM Bot settings page and scan the QR code. Publish a new version and complete any approval requested by Feishu, then resend the image.',
// feishu/feishu-runtime.mjs — callback probe notices
'✅ 修复完成:已实测收到 card.action.trigger,菜单按钮现在可用。':

View file

@ -73,8 +73,8 @@ export default {
// connection-test.mjs
'✅ DeepSeek Harness 连接测试成功':
'✅ DeepSeek Harness connection test succeeded',
'这条消息由插件页面中的“{name}”机器人卡片发出。':
'This message was sent from the "{name}" bot card on the plugin page.',
'这条消息由「IM机器人」设置页中的“{name}”机器人卡片发出。':
'This message was sent from the "{name}" bot card on the IM Bot settings page.',
'{channelLabel}尚未收到可用于测试的私聊消息。':
'The {channelLabel} has not received a direct message that can be used for testing yet.',
'机器人': 'bot',