mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-12 19:12:34 +08:00
Classify IM turn failures instead of falling back to INTERNAL_UNKNOWN.
Map PI_AI_ERROR/UNKNOWN/TLS wording and Host RPC internals so WhatsApp shows an actionable code, and treat missing sessions as recreateable. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
45f430fb28
commit
2723e94541
5 changed files with 397 additions and 220 deletions
|
|
@ -11320,7 +11320,8 @@ var ACCESS_GRANT_COPY = Object.freeze({
|
|||
approvedGroup: "\u672C\u7FA4\u8BBF\u95EE\u5DF2\u6279\u51C6\uFF0C\u8BF7\u5728\u672C\u7FA4 @ \u673A\u5668\u4EBA\u7EE7\u7EED\u3002",
|
||||
denied: "\u8BBF\u95EE\u7533\u8BF7\u672A\u901A\u8FC7\u3002",
|
||||
adminApproved: "\u5DF2\u6279\u51C6\u8BE5\u8BBF\u95EE\u7533\u8BF7\u3002",
|
||||
adminDenied: "\u5DF2\u62D2\u7EDD\u8BE5\u8BBF\u95EE\u7533\u8BF7\u3002"
|
||||
adminDenied: "\u5DF2\u62D2\u7EDD\u8BE5\u8BBF\u95EE\u7533\u8BF7\u3002",
|
||||
processFailed: "\u65E0\u6CD5\u5904\u7406\u8BE5\u5BA1\u6279\u3002"
|
||||
});
|
||||
|
||||
// src/channels/shared/session-scope.mjs
|
||||
|
|
@ -15670,6 +15671,15 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
|
|||
var name = "im-settings";
|
||||
var inject = ["slots", "connection", "locale", "workspaces"];
|
||||
var IM_PLUGIN_VERSION = package_default.version;
|
||||
function syncHostChatLanguage(ctx, language) {
|
||||
if (typeof language !== "string" || !language.trim()) return;
|
||||
void ctx.connection.rpc.call(
|
||||
UPDATE_RPC_CHANNEL,
|
||||
"host.language.set",
|
||||
{ language }
|
||||
).catch(() => {
|
||||
});
|
||||
}
|
||||
function callWorkspaceDirectoryApi(ctx, method, ...args) {
|
||||
const uiWorkspace = typeof ctx.get === "function" ? ctx.get("uiWorkspace") : void 0;
|
||||
const service = typeof uiWorkspace?.[method] === "function" ? uiWorkspace : ctx.workspaces;
|
||||
|
|
@ -15965,6 +15975,12 @@ function apply(ctx) {
|
|||
);
|
||||
const t = ctx.locale.bind(IM_LOCALE_NAMESPACE);
|
||||
setImTranslator(t);
|
||||
ctx.effect(() => {
|
||||
syncHostChatLanguage(ctx, ctx.locale.getLocale().active);
|
||||
return ctx.on("locale/change", (snapshot) => {
|
||||
syncHostChatLanguage(ctx, snapshot?.active);
|
||||
});
|
||||
}, "im-settings: sync host chat language with DSH locale");
|
||||
ctx.effect(() => {
|
||||
const disposers = [
|
||||
installFeishuStyles(),
|
||||
|
|
|
|||
420
lib/index.js
420
lib/index.js
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue