@jini-ai/admin 0.7.3-next.4 → 0.7.4
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/CHANGELOG.md +7 -0
- package/dist/core/i18n-common-base.d.ts +443 -1
- package/dist/core/i18n-common.js +1 -36
- package/dist/core/i18n-types.d.ts +8 -0
- package/dist/core/i18n-types.js +2 -0
- package/dist/core/manifest/rules.js +1 -2
- package/dist/pages/PageEditorChrome.js +1 -1
- package/dist/pages/hooks/page-editor-actions.hooks.d.ts +2 -2
- package/dist/pages/hooks/page-editor-load.hooks.d.ts +1 -1
- package/dist/pages/hooks/page-editor-preview.hooks.d.ts +3 -3
- package/dist/pages/hooks/page-editor-recovery.hooks.d.ts +2 -2
- package/dist/pages/hooks/page-editor-recovery.hooks.js +1 -1
- package/dist/pages/hooks/page-editor-workspace.hooks.d.ts +4 -4
- package/dist/pages/lib/page-preview-youtube.js +1 -3
- package/dist/pages/lib/prettify-html.js +1 -1
- package/dist/pages/page-editor-i18n.d.ts +191 -1
- package/dist/pages/page-editor-i18n.js +2 -2
- package/dist/pages/page-route-rules.d.ts +3 -2
- package/dist/pages/page-route-rules.js +3 -2
- package/dist/react/kit-chat-component-types.d.ts +13 -1
- package/dist/react/kit-chat-types.d.ts +2 -0
- package/dist/screens/auth/auth-i18n.js +1 -1
- package/dist/screens/consent/consent-i18n.js +1 -1
- package/dist/screens/content-analysis/content-analysis-i18n-rows-rtl-asia.d.ts +2 -1
- package/dist/screens/content-analysis/content-analysis-i18n.d.ts +3 -1
- package/dist/screens/content-analysis/content-analysis-i18n.js +3 -7
- package/dist/screens/email/email-tabs-i18n.d.ts +2 -1
- package/dist/screens/email/email-tabs-i18n.js +1 -9
- package/dist/screens/media/MediaEditPanel.js +2 -1
- package/dist/screens/media/MediaGenerationFacts.d.ts +8 -0
- package/dist/screens/media/MediaGenerationFacts.js +10 -0
- package/dist/screens/media/hooks/use-media.hooks.js +4 -1
- package/dist/screens/media/media-i18n/media-addons-i18n.js +21 -21
- package/dist/screens/media/rules.d.ts +7 -0
- package/dist/screens/media/rules.js +12 -1
- package/dist/screens/menus/hooks/use-menu-editor.hooks.js +1 -1
- package/dist/screens/plugins/PluginLists.d.ts +3 -3
- package/dist/screens/plugins/PluginLists.js +10 -8
- package/dist/screens/plugins/rules.js +4 -10
- package/dist/screens/routines/Routines.hooks.js +3 -2
- package/dist/screens/sites/AllSitesTab.js +1 -2
- package/dist/screens/sites/use-local-sites.hooks.js +4 -3
- package/dist/screens/skills/SkillInstallConfirmation.d.ts +1 -1
- package/dist/screens/skills/SkillInstallConfirmation.js +9 -4
- package/dist/screens/skills/skill-failure.js +4 -1
- package/dist/screens/skills/skill-upload.d.ts +10 -0
- package/dist/screens/skills/skill-upload.js +27 -9
- package/dist/screens/skills/skills-page-dictionary.js +1 -8
- package/dist/screens/storage/hooks/use-storage.hooks.js +2 -1
- package/dist/screens/storage/storage-screen-bindings.js +1 -1
- package/dist/screens/taxonomy/TaxonomyTermList.js +2 -13
- package/dist/screens/taxonomy/TermPicker.js +8 -24
- package/dist/screens/taxonomy/hooks/use-merge-term-section.hooks.js +0 -2
- package/dist/screens/taxonomy/hooks/use-term-detail-panel.hooks.js +0 -2
- package/dist/screens/webmcp/webmcp-i18n.js +1 -1
- package/dist/security/controllers/root-key-reveal.js +3 -2
- package/dist/security/controllers/shared-keys.controller.js +3 -2
- package/dist/security/credential-forms.rules.js +4 -1
- package/dist/security/host/AccessTokensGroups.js +1 -1
- package/dist/security/host/hooks/access-token-actions.d.ts +1 -1
- package/dist/security/host/hooks/access-token-actions.js +10 -7
- package/dist/security/host/hooks/access-token-add-actions.js +1 -1
- package/dist/security/host/hooks/access-token-groups.hooks.js +6 -4
- package/dist/security/host/hooks/access-token-refresh.hooks.d.ts +1 -1
- package/dist/security/host/hooks/access-token-refresh.hooks.js +4 -3
- package/dist/security/host/hooks/access-token-replace-actions.js +1 -1
- package/dist/security/host/hooks/access-token-stores.hooks.d.ts +19 -24
- package/dist/security/host/hooks/access-token-stores.hooks.js +7 -0
- package/dist/security/host/hooks/use-access-tokens.hooks.d.ts +2 -0
- package/dist/shell/components/AssistantDock/DockCleanupHeader.d.ts +3 -1
- package/dist/shell/components/AssistantDock/DockCleanupHeader.js +2 -1
- package/dist/shell/components/AssistantDock/DockHeader.d.ts +1 -1
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-es-id-de.js +12 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-hi-ur-bn.js +12 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-hu-fr-uk.js +12 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-ja-ko-pl.js +12 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-ru-fa-ar.js +12 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-tr-th-it.js +12 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-zh-cn-zh-tw-pt-br.js +12 -0
- package/dist/shell/components/AssistantDock/hooks/execution-config.hooks.js +3 -1
- package/dist/shell/hooks/assistant-chats-port.hooks.d.ts +2 -0
- package/dist/shell/hooks/use-conversation-deep-link.js +3 -1
- package/dist/shell/hooks/use-desktop-view-release.hooks.js +2 -2
- package/dist/shell/lib/addons-routes.js +3 -3
- package/dist/shell/lib/browser-stream.js +8 -8
- package/dist/shell/lib/descriptor-i18n.js +2 -2
- package/dist/sites/transfer/use-export-password.hooks.js +1 -2
- package/dist/widgets/react/components/WidgetInstanceNotices.d.ts +1 -1
- package/dist/widgets/react/components/WidgetInstanceNotices.js +0 -2
- package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.js +1 -1
- package/package.json +9 -9
- package/src/screens/email/email.css +1 -1
- package/src/themes/default/admin.css +3 -0
|
@@ -7,7 +7,7 @@ export function useAccessTokenGroups({ context }, _optional = {}) {
|
|
|
7
7
|
const deps = context.args.deps;
|
|
8
8
|
const { ACCESS_TOKEN_PROVIDER_COPY, ACCESS_TOKEN_CATEGORIES } = deps;
|
|
9
9
|
const { providers } = context.queries;
|
|
10
|
-
const { publishCredentials, sourceControlCredentials } = context.stores;
|
|
10
|
+
const { publishCredentials, sourceControlCredentials, customCredentials } = context.stores;
|
|
11
11
|
const { rows } = context;
|
|
12
12
|
const { existingDrafts, existingBusy, addForms, query, category } = context.drafts;
|
|
13
13
|
/** One singleton group per saved custom row — no shared catalog entry to group under (this file's
|
|
@@ -22,19 +22,21 @@ export function useAccessTokenGroups({ context }, _optional = {}) {
|
|
|
22
22
|
.filter((row) => row.kind === "custom" && accessTokenCategoryMatches({ rowCategory: row.category ?? "general", activeCategory: category }) && accessTokenRowMatchesQuery({ row, info: accessTokenRowProviderInfo({ providers, copy: ACCESS_TOKEN_PROVIDER_COPY, row }), query }))
|
|
23
23
|
.map((row) => {
|
|
24
24
|
const info = accessTokenRowProviderInfo({ providers, copy: ACCESS_TOKEN_PROVIDER_COPY, row });
|
|
25
|
-
return { info, rows: [existingRowState({ deps, row, draft: existingDrafts[row.id], busy: existingBusy[row.id], info })], addForm: addFormState({ deps, entry: undefined, info }) };
|
|
25
|
+
return { info, stale: customCredentials.stale === true, rows: [existingRowState({ deps, row, draft: existingDrafts[row.id], busy: existingBusy[row.id], info })], addForm: addFormState({ deps, entry: undefined, info }) };
|
|
26
26
|
});
|
|
27
|
-
}, [rows, existingDrafts, existingBusy, query, category, providers]);
|
|
27
|
+
}, [rows, existingDrafts, existingBusy, query, category, providers, customCredentials.stale]);
|
|
28
28
|
const groups = useMemo(() => {
|
|
29
29
|
if (rows === undefined)
|
|
30
30
|
return undefined;
|
|
31
31
|
// A provider outside the active category is dropped here, before the query filter ever runs —
|
|
32
32
|
// see this file's header for why that keeps `totalCount`/`matchCount` a global fact instead.
|
|
33
33
|
// A saved row whose provider is not listed still gets its group, so it can be removed.
|
|
34
|
+
// Only never-loaded stores are hidden; a failed refresh keeps an ok inventory marked stale.
|
|
34
35
|
const catalogGroups = accessTokenProvidersWithSavedRows({ providers, copy: ACCESS_TOKEN_PROVIDER_COPY, rows }).filter((info) => (info.kind === "publish" ? publishCredentials.status : sourceControlCredentials.status) === "ok").filter((info) => accessTokenCategoryMatches({ rowCategory: info.category, activeCategory: category })).map((info) => {
|
|
35
36
|
const providerRows = accessTokenRowsForProvider({ rows, ref: info }).filter((row) => accessTokenRowMatchesQuery({ row, info, query }));
|
|
36
37
|
return {
|
|
37
38
|
info,
|
|
39
|
+
stale: (info.kind === "publish" ? publishCredentials : sourceControlCredentials).stale === true,
|
|
38
40
|
rows: providerRows.map((row) => existingRowState({ deps, row, draft: existingDrafts[row.id], busy: existingBusy[row.id], info })),
|
|
39
41
|
addForm: addFormState({ deps, entry: addForms[addFormKey(info)], info }),
|
|
40
42
|
};
|
|
@@ -44,7 +46,7 @@ export function useAccessTokenGroups({ context }, _optional = {}) {
|
|
|
44
46
|
// already-category-and-query-filtered list above, so it holds for the "All" chip, any single
|
|
45
47
|
// category chip, and an active search query alike.
|
|
46
48
|
return sortAccessTokenGroups({ groups: [...catalogGroups, ...customGroups], categories: ACCESS_TOKEN_CATEGORIES });
|
|
47
|
-
}, [rows, existingDrafts, existingBusy, addForms, query, category, customGroups, providers, publishCredentials
|
|
49
|
+
}, [rows, existingDrafts, existingBusy, addForms, query, category, customGroups, providers, publishCredentials, sourceControlCredentials]);
|
|
48
50
|
const totalCount = rows?.length ?? 0;
|
|
49
51
|
const matchCount = rows === undefined ? 0 : rows.filter((row) => accessTokenRowMatchesQuery({ row, info: accessTokenRowProviderInfo({ providers, copy: ACCESS_TOKEN_PROVIDER_COPY, row }), query })).length;
|
|
50
52
|
return { groups, totalCount, matchCount };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AccessTokensArgs } from "./use-access-tokens.hooks.js";
|
|
2
2
|
import type { useAccessTokenQueries } from "./access-token-queries.hooks.js";
|
|
3
|
-
import type
|
|
3
|
+
import { type useAccessTokenStores } from "./access-token-stores.hooks.js";
|
|
4
4
|
/**
|
|
5
5
|
* Re-reads all three stores directly, bypassing `useFetchQuery`'s cache — an out-of-band write
|
|
6
6
|
* (today `custom_credential_set_username`/`custom_credential_set_token`,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useCallback, useState } from "react";
|
|
2
2
|
import { accessTokensLoadErrorMessage } from "../../security-i18n.js";
|
|
3
|
+
import { settleAccessTokenInventory } from "./access-token-stores.hooks.js";
|
|
3
4
|
import { accessTokensLoadError, firstRejectionReason } from "./access-token-store-operations.js";
|
|
4
5
|
const UNKNOWN_ERROR = "unknown error";
|
|
5
6
|
// Set from a background reload (below) — merged into `loadError` so a failed refresh is as
|
|
@@ -77,9 +78,9 @@ export function useAccessTokenRefresh({ args, queries, stores }, _optional = {})
|
|
|
77
78
|
if (!settlement.isCurrent({ generation: requestGeneration }))
|
|
78
79
|
return; // superseded by a newer reload
|
|
79
80
|
const [publishResult, sourceControlResult, customResult] = results;
|
|
80
|
-
setPublishCredentials(
|
|
81
|
-
setSourceControlCredentials(
|
|
82
|
-
setCustomCredentials(
|
|
81
|
+
setPublishCredentials(previous => settleAccessTokenInventory({ previous, result: publishResult }));
|
|
82
|
+
setSourceControlCredentials(previous => settleAccessTokenInventory({ previous, result: sourceControlResult }));
|
|
83
|
+
setCustomCredentials(previous => settleAccessTokenInventory({ previous, result: customResult }));
|
|
83
84
|
const failureReason = firstRejectionReason(results);
|
|
84
85
|
setReloadError(failureReason === undefined ? null : accessTokensLoadErrorMessage({ locale, error: describeApiError({ e: failureReason, fallback: t(UNKNOWN_ERROR) }) }));
|
|
85
86
|
setHasReloadedOnce(true);
|
|
@@ -40,7 +40,7 @@ async function replaceCustomCredential({ context, row }, _optional = {}) {
|
|
|
40
40
|
try {
|
|
41
41
|
const result = await port.custom.update({ id: row.id, input: buildCustomCredentialUpdatePatch({ fields, nameChanged, hasToken, currentUsername: row.username }, { currentWorksFor: row.worksFor }) });
|
|
42
42
|
// PUT returns credential metadata; retain the latest attachment snapshot from the inventory.
|
|
43
|
-
setCustomCredentials(prev => ({ status: "ok", rows: (prev.rows ?? []).map(item => item.id === result.id
|
|
43
|
+
setCustomCredentials(prev => ({ ...prev, status: "ok", rows: (prev.rows ?? []).map(item => item.id === result.id
|
|
44
44
|
? { ...result, ...withoutUndefined({ source: { usedBy: item.usedBy, usedByThisSite: item.usedByThisSite } }) } : item) }));
|
|
45
45
|
// Reset to `result.username`, not `fields.username` or blank — `result` is the server's own
|
|
46
46
|
// post-write state, so it is correct whether the operator typed a new username, left it blank
|
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
import type { AdminCustomCredentialSummary, AdminPublishCredentialSummary } from "../../api/security-api.types.js";
|
|
2
2
|
import type { AdminSourceControlCredentialSummary } from "../../../source-control/api/source-control-api.types.js";
|
|
3
3
|
import type { useAccessTokenQueries } from "./access-token-queries.hooks.js";
|
|
4
|
+
interface AccessTokenInventory<T> {
|
|
5
|
+
status: "pending" | "ok" | "error";
|
|
6
|
+
rows?: T[];
|
|
7
|
+
/** Row mutations preserve this flag: only a full successful inventory read clears it. */
|
|
8
|
+
stale?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function settleAccessTokenInventory<T>({ previous, result }: {
|
|
11
|
+
previous: AccessTokenInventory<T>;
|
|
12
|
+
result: PromiseSettledResult<{
|
|
13
|
+
credentials: T[];
|
|
14
|
+
}>;
|
|
15
|
+
}, _optional?: {}): AccessTokenInventory<T>;
|
|
4
16
|
export declare function useAccessTokenStores({ queries }: {
|
|
5
17
|
queries: ReturnType<typeof useAccessTokenQueries>;
|
|
6
18
|
}, _optional?: {}): {
|
|
7
|
-
publishCredentials:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
rows?: AdminPublishCredentialSummary[];
|
|
14
|
-
}>>;
|
|
15
|
-
sourceControlCredentials: {
|
|
16
|
-
status: "pending" | "ok" | "error";
|
|
17
|
-
rows?: AdminSourceControlCredentialSummary[];
|
|
18
|
-
};
|
|
19
|
-
setSourceControlCredentials: import("react").Dispatch<import("react").SetStateAction<{
|
|
20
|
-
status: "pending" | "ok" | "error";
|
|
21
|
-
rows?: AdminSourceControlCredentialSummary[];
|
|
22
|
-
}>>;
|
|
23
|
-
customCredentials: {
|
|
24
|
-
status: "pending" | "ok" | "error";
|
|
25
|
-
rows?: AdminCustomCredentialSummary[];
|
|
26
|
-
};
|
|
27
|
-
setCustomCredentials: import("react").Dispatch<import("react").SetStateAction<{
|
|
28
|
-
status: "pending" | "ok" | "error";
|
|
29
|
-
rows?: AdminCustomCredentialSummary[];
|
|
30
|
-
}>>;
|
|
19
|
+
publishCredentials: AccessTokenInventory<AdminPublishCredentialSummary>;
|
|
20
|
+
setPublishCredentials: import("react").Dispatch<import("react").SetStateAction<AccessTokenInventory<AdminPublishCredentialSummary>>>;
|
|
21
|
+
sourceControlCredentials: AccessTokenInventory<AdminSourceControlCredentialSummary>;
|
|
22
|
+
setSourceControlCredentials: import("react").Dispatch<import("react").SetStateAction<AccessTokenInventory<AdminSourceControlCredentialSummary>>>;
|
|
23
|
+
customCredentials: AccessTokenInventory<AdminCustomCredentialSummary>;
|
|
24
|
+
setCustomCredentials: import("react").Dispatch<import("react").SetStateAction<AccessTokenInventory<AdminCustomCredentialSummary>>>;
|
|
31
25
|
};
|
|
26
|
+
export {};
|
|
32
27
|
//# sourceMappingURL=access-token-stores.hooks.d.ts.map
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
export function settleAccessTokenInventory({ previous, result }, _optional = {}) {
|
|
3
|
+
if (result.status === "fulfilled")
|
|
4
|
+
return { status: "ok", rows: result.value.credentials };
|
|
5
|
+
// Owner decision 2026-11-30: keep the last successful inventory on refresh failure, labelled
|
|
6
|
+
// stale alongside the reload error. An unavailable first load must never look like an empty one.
|
|
7
|
+
return previous.status === "ok" ? { ...previous, stale: true } : { status: "error" };
|
|
8
|
+
}
|
|
2
9
|
export function useAccessTokenStores({ queries }, _optional = {}) {
|
|
3
10
|
const { publishQuery, sourceControlQuery, customQuery } = queries;
|
|
4
11
|
const [publishCredentials, setPublishCredentials] = useState({ status: "pending" });
|
|
@@ -114,6 +114,8 @@ export interface AccessTokenAddFormState extends AccessTokenFormFields {
|
|
|
114
114
|
}
|
|
115
115
|
export interface AccessTokenProviderGroupState {
|
|
116
116
|
readonly info: AccessTokenProviderInfo;
|
|
117
|
+
/** Last successful inventory retained after a failed refresh; absent or false means fresh. */
|
|
118
|
+
readonly stale?: boolean;
|
|
117
119
|
/** Already filtered against the active search query — see this file's header. */
|
|
118
120
|
readonly rows: readonly AccessTokenExistingRowState[];
|
|
119
121
|
readonly addForm: AccessTokenAddFormState;
|
|
@@ -32,6 +32,8 @@ export interface DockCleanupHeaderProps<Cleanup extends DockChatCleanup> extends
|
|
|
32
32
|
readonly chatCleanup: Cleanup;
|
|
33
33
|
/** The list half: "Delete selected" and "Done" at the foot of the switcher while rows are ticked. */
|
|
34
34
|
readonly ChatCleanupSelectionActions: DockChatCleanupPanel<Cleanup>;
|
|
35
|
+
/** A host wrapper can bind desktop/site routing without replacing the shared cleanup header. */
|
|
36
|
+
readonly creationActions?: DockConversationTools["listProps"]["creationActions"];
|
|
35
37
|
}
|
|
36
38
|
/**
|
|
37
39
|
* The dock header `DockChatPane` mounts: `@jini-ai/admin`'s `DockHeader` with the P11 chat cleanup
|
|
@@ -46,5 +48,5 @@ export interface DockCleanupHeaderProps<Cleanup extends DockChatCleanup> extends
|
|
|
46
48
|
* @returns The Jini header with the cleanup mounted.
|
|
47
49
|
* @complexity O(1) beyond `DockHeader`'s own render.
|
|
48
50
|
*/
|
|
49
|
-
export declare function DockCleanupHeader<Cleanup extends DockChatCleanup>({ DockHeader, chatCleanup, ChatCleanupSelectionActions, ...header }: DockCleanupHeaderProps<Cleanup>, _optional?: {}): import("react").JSX.Element;
|
|
51
|
+
export declare function DockCleanupHeader<Cleanup extends DockChatCleanup>({ DockHeader, chatCleanup, ChatCleanupSelectionActions, creationActions, ...header }: DockCleanupHeaderProps<Cleanup>, _optional?: {}): import("react").JSX.Element;
|
|
50
52
|
//# sourceMappingURL=DockCleanupHeader.d.ts.map
|
|
@@ -12,9 +12,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
12
12
|
* @returns The Jini header with the cleanup mounted.
|
|
13
13
|
* @complexity O(1) beyond `DockHeader`'s own render.
|
|
14
14
|
*/
|
|
15
|
-
export function DockCleanupHeader({ DockHeader, chatCleanup, ChatCleanupSelectionActions, ...header }, _optional = {}) {
|
|
15
|
+
export function DockCleanupHeader({ DockHeader, chatCleanup, ChatCleanupSelectionActions, creationActions, ...header }, _optional = {}) {
|
|
16
16
|
const conversationTools = {
|
|
17
17
|
listProps: {
|
|
18
|
+
...(creationActions ? { creationActions } : {}),
|
|
18
19
|
hooks: chatCleanup.listHooks,
|
|
19
20
|
onTogglePin: chatCleanup.togglePin,
|
|
20
21
|
selectable: chatCleanup.open,
|
|
@@ -15,7 +15,7 @@ type DockConversationRow = UseAssistantChats["conversations"][number];
|
|
|
15
15
|
* the switcher: the header row holds only icon buttons (owner, 2026-11-29).
|
|
16
16
|
*/
|
|
17
17
|
export interface DockConversationTools {
|
|
18
|
-
readonly listProps: Pick<KitConversationListProps, "hooks" | "selectable" | "selectedIds" | "onTogglePin" | "onSelectionChange" | "selectionActions">;
|
|
18
|
+
readonly listProps: Pick<KitConversationListProps, "hooks" | "selectable" | "selectedIds" | "onTogglePin" | "onSelectionChange" | "selectionActions" | "creationActions" | "createDisabled">;
|
|
19
19
|
readonly visibleConversations: (required: {
|
|
20
20
|
conversations: DockConversationRow[];
|
|
21
21
|
}) => DockConversationRow[];
|
|
@@ -28,6 +28,10 @@ export const CHAT_PANE_ES_ID_DE = {
|
|
|
28
28
|
"Stop using {name}": "Dejar de usar {name}",
|
|
29
29
|
"Voice input (coming soon)": "Entrada de voz (próximamente)",
|
|
30
30
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "Detiene el uso futuro en este chat. Las instrucciones ya cargadas permanecen en el contexto actual.",
|
|
31
|
+
"New desktop chat": "Nuevo chat de escritorio",
|
|
32
|
+
"New site chat": "Nuevo chat del sitio",
|
|
33
|
+
"Desktop chat": "Chat de escritorio",
|
|
34
|
+
"Site chat": "Chat del sitio",
|
|
31
35
|
"Rename chat": "Renombrar chat",
|
|
32
36
|
"Pin": "Fijar",
|
|
33
37
|
"Unpin": "Dejar de fijar",
|
|
@@ -83,6 +87,10 @@ export const CHAT_PANE_ES_ID_DE = {
|
|
|
83
87
|
"Stop using {name}": "Berhenti menggunakan {name}",
|
|
84
88
|
"Voice input (coming soon)": "Input suara (segera hadir)",
|
|
85
89
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "Menghentikan penggunaan berikutnya dalam obrolan ini. Panduan yang sudah dimuat tetap berada dalam konteks saat ini.",
|
|
90
|
+
"New desktop chat": "Chat desktop baru",
|
|
91
|
+
"New site chat": "Chat situs baru",
|
|
92
|
+
"Desktop chat": "Chat desktop",
|
|
93
|
+
"Site chat": "Chat situs",
|
|
86
94
|
"Rename chat": "Ganti nama obrolan",
|
|
87
95
|
"Pin": "Sematkan",
|
|
88
96
|
"Unpin": "Lepas sematan",
|
|
@@ -138,6 +146,10 @@ export const CHAT_PANE_ES_ID_DE = {
|
|
|
138
146
|
"Stop using {name}": "{name} nicht mehr verwenden",
|
|
139
147
|
"Voice input (coming soon)": "Spracheingabe (demnächst)",
|
|
140
148
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "Beendet die künftige Verwendung in diesem Chat. Bereits geladene Anweisungen bleiben im aktuellen Kontext.",
|
|
149
|
+
"New desktop chat": "Neuer Desktop-Chat",
|
|
150
|
+
"New site chat": "Neuer Website-Chat",
|
|
151
|
+
"Desktop chat": "Desktop-Chat",
|
|
152
|
+
"Site chat": "Website-Chat",
|
|
141
153
|
"Rename chat": "Chat umbenennen",
|
|
142
154
|
"Pin": "Anheften",
|
|
143
155
|
"Unpin": "Lösen",
|
|
@@ -28,6 +28,10 @@ export const CHAT_PANE_HI_UR_BN = {
|
|
|
28
28
|
"Stop using {name}": "{name} का उपयोग बंद करें",
|
|
29
29
|
"Voice input (coming soon)": "वॉइस इनपुट (जल्द आ रहा है)",
|
|
30
30
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "इस चैट में आगे उपयोग बंद करता है। पहले से लोड किए गए निर्देश वर्तमान संदर्भ में बने रहते हैं।",
|
|
31
|
+
"New desktop chat": "नई डेस्कटॉप चैट",
|
|
32
|
+
"New site chat": "नई साइट चैट",
|
|
33
|
+
"Desktop chat": "डेस्कटॉप चैट",
|
|
34
|
+
"Site chat": "साइट चैट",
|
|
31
35
|
"Rename chat": "चैट का नाम बदलें",
|
|
32
36
|
"Pin": "पिन करें",
|
|
33
37
|
"Unpin": "अनपिन करें",
|
|
@@ -83,6 +87,10 @@ export const CHAT_PANE_HI_UR_BN = {
|
|
|
83
87
|
"Stop using {name}": "{name} کا استعمال بند کریں",
|
|
84
88
|
"Voice input (coming soon)": "آواز سے اندراج (جلد آ رہا ہے)",
|
|
85
89
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "اس چیٹ میں آئندہ استعمال روک دیتا ہے۔ پہلے سے لوڈ شدہ ہدایات موجودہ سیاق میں رہتی ہیں۔",
|
|
90
|
+
"New desktop chat": "نئی ڈیسک ٹاپ چیٹ",
|
|
91
|
+
"New site chat": "نئی سائٹ چیٹ",
|
|
92
|
+
"Desktop chat": "ڈیسک ٹاپ چیٹ",
|
|
93
|
+
"Site chat": "سائٹ چیٹ",
|
|
86
94
|
"Rename chat": "چیٹ کا نام تبدیل کریں",
|
|
87
95
|
"Pin": "پن کریں",
|
|
88
96
|
"Unpin": "ان پن کریں",
|
|
@@ -138,6 +146,10 @@ export const CHAT_PANE_HI_UR_BN = {
|
|
|
138
146
|
"Stop using {name}": "{name} ব্যবহার বন্ধ করুন",
|
|
139
147
|
"Voice input (coming soon)": "ভয়েস ইনপুট (শীঘ্রই আসছে)",
|
|
140
148
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "এই চ্যাটে পরবর্তী ব্যবহার বন্ধ করে। ইতিমধ্যে লোড করা নির্দেশনা বর্তমান প্রসঙ্গে থেকে যায়।",
|
|
149
|
+
"New desktop chat": "নতুন ডেস্কটপ চ্যাট",
|
|
150
|
+
"New site chat": "নতুন সাইট চ্যাট",
|
|
151
|
+
"Desktop chat": "ডেস্কটপ চ্যাট",
|
|
152
|
+
"Site chat": "সাইট চ্যাট",
|
|
141
153
|
"Rename chat": "চ্যাটের নাম পরিবর্তন করুন",
|
|
142
154
|
"Pin": "পিন করুন",
|
|
143
155
|
"Unpin": "আনপিন করুন",
|
|
@@ -28,6 +28,10 @@ export const CHAT_PANE_HU_FR_UK = {
|
|
|
28
28
|
"Stop using {name}": "{name} használatának leállítása",
|
|
29
29
|
"Voice input (coming soon)": "Hangbevitel (hamarosan)",
|
|
30
30
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "Leállítja a további használatot ebben a csevegésben. A már betöltött útmutatás megmarad az aktuális kontextusban.",
|
|
31
|
+
"New desktop chat": "Új asztali csevegés",
|
|
32
|
+
"New site chat": "Új webhelycsevegés",
|
|
33
|
+
"Desktop chat": "Asztali csevegés",
|
|
34
|
+
"Site chat": "Webhelycsevegés",
|
|
31
35
|
"Rename chat": "Csevegés átnevezése",
|
|
32
36
|
"Pin": "Rögzítés",
|
|
33
37
|
"Unpin": "Rögzítés feloldása",
|
|
@@ -83,6 +87,10 @@ export const CHAT_PANE_HU_FR_UK = {
|
|
|
83
87
|
"Stop using {name}": "Ne plus utiliser {name}",
|
|
84
88
|
"Voice input (coming soon)": "Saisie vocale (bientôt disponible)",
|
|
85
89
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "Arrête toute utilisation future dans cette discussion. Les instructions déjà chargées restent dans le contexte actuel.",
|
|
90
|
+
"New desktop chat": "Nouveau chat de bureau",
|
|
91
|
+
"New site chat": "Nouveau chat du site",
|
|
92
|
+
"Desktop chat": "Chat de bureau",
|
|
93
|
+
"Site chat": "Chat du site",
|
|
86
94
|
"Rename chat": "Renommer la discussion",
|
|
87
95
|
"Pin": "Épingler",
|
|
88
96
|
"Unpin": "Désépingler",
|
|
@@ -138,6 +146,10 @@ export const CHAT_PANE_HU_FR_UK = {
|
|
|
138
146
|
"Stop using {name}": "Не використовувати {name}",
|
|
139
147
|
"Voice input (coming soon)": "Голосове введення (незабаром)",
|
|
140
148
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "Припиняє подальше використання в цьому чаті. Уже завантажені інструкції залишаються в поточному контексті.",
|
|
149
|
+
"New desktop chat": "Новий чат застосунку",
|
|
150
|
+
"New site chat": "Новий чат сайту",
|
|
151
|
+
"Desktop chat": "Чат застосунку",
|
|
152
|
+
"Site chat": "Чат сайту",
|
|
141
153
|
"Rename chat": "Перейменувати чат",
|
|
142
154
|
"Pin": "Закріпити",
|
|
143
155
|
"Unpin": "Відкріпити",
|
|
@@ -28,6 +28,10 @@ export const CHAT_PANE_JA_KO_PL = {
|
|
|
28
28
|
"Stop using {name}": "{name} の使用をやめる",
|
|
29
29
|
"Voice input (coming soon)": "音声入力(近日公開)",
|
|
30
30
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "このチャットでの今後の使用を停止します。読み込み済みのガイダンスは現在のコンテキストに残ります。",
|
|
31
|
+
"New desktop chat": "新しいデスクトップチャット",
|
|
32
|
+
"New site chat": "新しいサイトチャット",
|
|
33
|
+
"Desktop chat": "デスクトップチャット",
|
|
34
|
+
"Site chat": "サイトチャット",
|
|
31
35
|
"Rename chat": "チャットの名前を変更",
|
|
32
36
|
"Pin": "ピン留め",
|
|
33
37
|
"Unpin": "ピン留めを解除",
|
|
@@ -83,6 +87,10 @@ export const CHAT_PANE_JA_KO_PL = {
|
|
|
83
87
|
"Stop using {name}": "{name} 사용 중지",
|
|
84
88
|
"Voice input (coming soon)": "음성 입력(출시 예정)",
|
|
85
89
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "이 채팅에서 앞으로 사용하지 않습니다. 이미 불러온 지침은 현재 컨텍스트에 남아 있습니다.",
|
|
90
|
+
"New desktop chat": "새 데스크톱 채팅",
|
|
91
|
+
"New site chat": "새 사이트 채팅",
|
|
92
|
+
"Desktop chat": "데스크톱 채팅",
|
|
93
|
+
"Site chat": "사이트 채팅",
|
|
86
94
|
"Rename chat": "채팅 이름 변경",
|
|
87
95
|
"Pin": "고정",
|
|
88
96
|
"Unpin": "고정 해제",
|
|
@@ -138,6 +146,10 @@ export const CHAT_PANE_JA_KO_PL = {
|
|
|
138
146
|
"Stop using {name}": "Przestań używać: {name}",
|
|
139
147
|
"Voice input (coming soon)": "Wprowadzanie głosowe (wkrótce)",
|
|
140
148
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "Zatrzymuje dalsze użycie w tym czacie. Już wczytane instrukcje pozostają w bieżącym kontekście.",
|
|
149
|
+
"New desktop chat": "Nowy czat aplikacji",
|
|
150
|
+
"New site chat": "Nowy czat witryny",
|
|
151
|
+
"Desktop chat": "Czat aplikacji",
|
|
152
|
+
"Site chat": "Czat witryny",
|
|
141
153
|
"Rename chat": "Zmień nazwę czatu",
|
|
142
154
|
"Pin": "Przypnij",
|
|
143
155
|
"Unpin": "Odepnij",
|
|
@@ -28,6 +28,10 @@ export const CHAT_PANE_RU_FA_AR = {
|
|
|
28
28
|
"Stop using {name}": "Не использовать {name}",
|
|
29
29
|
"Voice input (coming soon)": "Голосовой ввод (скоро)",
|
|
30
30
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "Прекращает дальнейшее использование в этом чате. Уже загруженные инструкции остаются в текущем контексте.",
|
|
31
|
+
"New desktop chat": "Новый чат приложения",
|
|
32
|
+
"New site chat": "Новый чат сайта",
|
|
33
|
+
"Desktop chat": "Чат приложения",
|
|
34
|
+
"Site chat": "Чат сайта",
|
|
31
35
|
"Rename chat": "Переименовать чат",
|
|
32
36
|
"Pin": "Закрепить",
|
|
33
37
|
"Unpin": "Открепить",
|
|
@@ -83,6 +87,10 @@ export const CHAT_PANE_RU_FA_AR = {
|
|
|
83
87
|
"Stop using {name}": "توقف استفاده از {name}",
|
|
84
88
|
"Voice input (coming soon)": "ورودی صوتی (بهزودی)",
|
|
85
89
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "استفاده در ادامهٔ این گفتگو را متوقف میکند. راهنماییهای بارگذاریشده در زمینهٔ فعلی باقی میمانند.",
|
|
90
|
+
"New desktop chat": "گفتگوی جدید برنامه",
|
|
91
|
+
"New site chat": "گفتگوی جدید سایت",
|
|
92
|
+
"Desktop chat": "گفتگوی برنامه",
|
|
93
|
+
"Site chat": "گفتگوی سایت",
|
|
86
94
|
"Rename chat": "تغییر نام گفتگو",
|
|
87
95
|
"Pin": "سنجاق کردن",
|
|
88
96
|
"Unpin": "برداشتن سنجاق",
|
|
@@ -138,6 +146,10 @@ export const CHAT_PANE_RU_FA_AR = {
|
|
|
138
146
|
"Stop using {name}": "إيقاف استخدام {name}",
|
|
139
147
|
"Voice input (coming soon)": "الإدخال الصوتي (قريبًا)",
|
|
140
148
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "يوقف الاستخدام المستقبلي في هذه المحادثة. تبقى الإرشادات المحمّلة مسبقًا في السياق الحالي.",
|
|
149
|
+
"New desktop chat": "محادثة جديدة لسطح المكتب",
|
|
150
|
+
"New site chat": "محادثة جديدة للموقع",
|
|
151
|
+
"Desktop chat": "محادثة سطح المكتب",
|
|
152
|
+
"Site chat": "محادثة الموقع",
|
|
141
153
|
"Rename chat": "إعادة تسمية المحادثة",
|
|
142
154
|
"Pin": "تثبيت",
|
|
143
155
|
"Unpin": "إلغاء التثبيت",
|
|
@@ -28,6 +28,10 @@ export const CHAT_PANE_TR_TH_IT = {
|
|
|
28
28
|
"Stop using {name}": "{name} kullanımını durdur",
|
|
29
29
|
"Voice input (coming soon)": "Sesli giriş (yakında)",
|
|
30
30
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "Bu sohbette gelecekteki kullanımı durdurur. Önceden yüklenen yönergeler mevcut bağlamda kalır.",
|
|
31
|
+
"New desktop chat": "Yeni masaüstü sohbeti",
|
|
32
|
+
"New site chat": "Yeni site sohbeti",
|
|
33
|
+
"Desktop chat": "Masaüstü sohbeti",
|
|
34
|
+
"Site chat": "Site sohbeti",
|
|
31
35
|
"Rename chat": "Sohbeti yeniden adlandır",
|
|
32
36
|
"Pin": "Sabitle",
|
|
33
37
|
"Unpin": "Sabitlemeyi kaldır",
|
|
@@ -83,6 +87,10 @@ export const CHAT_PANE_TR_TH_IT = {
|
|
|
83
87
|
"Stop using {name}": "หยุดใช้ {name}",
|
|
84
88
|
"Voice input (coming soon)": "ป้อนข้อมูลด้วยเสียง (เร็วๆ นี้)",
|
|
85
89
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "หยุดการใช้ในอนาคตสำหรับแชตนี้ คำแนะนำที่โหลดแล้วจะยังคงอยู่ในบริบทปัจจุบัน",
|
|
90
|
+
"New desktop chat": "แชตเดสก์ท็อปใหม่",
|
|
91
|
+
"New site chat": "แชตเว็บไซต์ใหม่",
|
|
92
|
+
"Desktop chat": "แชตเดสก์ท็อป",
|
|
93
|
+
"Site chat": "แชตเว็บไซต์",
|
|
86
94
|
"Rename chat": "เปลี่ยนชื่อแชต",
|
|
87
95
|
"Pin": "ปักหมุด",
|
|
88
96
|
"Unpin": "เลิกปักหมุด",
|
|
@@ -138,6 +146,10 @@ export const CHAT_PANE_TR_TH_IT = {
|
|
|
138
146
|
"Stop using {name}": "Smetti di usare {name}",
|
|
139
147
|
"Voice input (coming soon)": "Input vocale (in arrivo)",
|
|
140
148
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "Interrompe gli utilizzi futuri in questa chat. Le istruzioni già caricate restano nel contesto attuale.",
|
|
149
|
+
"New desktop chat": "Nuova chat desktop",
|
|
150
|
+
"New site chat": "Nuova chat del sito",
|
|
151
|
+
"Desktop chat": "Chat desktop",
|
|
152
|
+
"Site chat": "Chat del sito",
|
|
141
153
|
"Rename chat": "Rinomina chat",
|
|
142
154
|
"Pin": "Fissa",
|
|
143
155
|
"Unpin": "Rimuovi fissaggio",
|
package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-zh-cn-zh-tw-pt-br.js
CHANGED
|
@@ -28,6 +28,10 @@ export const CHAT_PANE_ZH_CN_ZH_TW_PT_BR = {
|
|
|
28
28
|
"Stop using {name}": "停止使用 {name}",
|
|
29
29
|
"Voice input (coming soon)": "语音输入(即将推出)",
|
|
30
30
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "停止在此聊天中继续使用。已加载的指导内容仍保留在当前上下文中。",
|
|
31
|
+
"New desktop chat": "新建桌面聊天",
|
|
32
|
+
"New site chat": "新建站点聊天",
|
|
33
|
+
"Desktop chat": "桌面聊天",
|
|
34
|
+
"Site chat": "站点聊天",
|
|
31
35
|
"Rename chat": "重命名聊天",
|
|
32
36
|
"Pin": "置顶",
|
|
33
37
|
"Unpin": "取消置顶",
|
|
@@ -83,6 +87,10 @@ export const CHAT_PANE_ZH_CN_ZH_TW_PT_BR = {
|
|
|
83
87
|
"Stop using {name}": "停止使用 {name}",
|
|
84
88
|
"Voice input (coming soon)": "語音輸入(即將推出)",
|
|
85
89
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "停止在此聊天中繼續使用。已載入的指引仍保留在目前的上下文中。",
|
|
90
|
+
"New desktop chat": "新增桌面聊天",
|
|
91
|
+
"New site chat": "新增網站聊天",
|
|
92
|
+
"Desktop chat": "桌面聊天",
|
|
93
|
+
"Site chat": "網站聊天",
|
|
86
94
|
"Rename chat": "重新命名聊天",
|
|
87
95
|
"Pin": "置頂",
|
|
88
96
|
"Unpin": "取消置頂",
|
|
@@ -138,6 +146,10 @@ export const CHAT_PANE_ZH_CN_ZH_TW_PT_BR = {
|
|
|
138
146
|
"Stop using {name}": "Parar de usar {name}",
|
|
139
147
|
"Voice input (coming soon)": "Entrada de voz (em breve)",
|
|
140
148
|
"Stops future use in this chat. Guidance already loaded stays in the current context.": "Interrompe o uso futuro neste chat. As orientações já carregadas permanecem no contexto atual.",
|
|
149
|
+
"New desktop chat": "Novo chat do desktop",
|
|
150
|
+
"New site chat": "Novo chat do site",
|
|
151
|
+
"Desktop chat": "Chat do desktop",
|
|
152
|
+
"Site chat": "Chat do site",
|
|
141
153
|
"Rename chat": "Renomear conversa",
|
|
142
154
|
"Pin": "Fixar",
|
|
143
155
|
"Unpin": "Desafixar",
|
|
@@ -28,8 +28,10 @@ export function useStoredAdminKey({ credentialLoader, invalidate, credentialKey,
|
|
|
28
28
|
setHasStoredAdminKey(view.isSet);
|
|
29
29
|
})
|
|
30
30
|
.catch((error) => {
|
|
31
|
-
if (isAbortError({ error }))
|
|
31
|
+
if (controller.signal.aborted || isAbortError({ error }))
|
|
32
32
|
return;
|
|
33
|
+
// Only a terminal failure means unavailable; a pending restart retry stays unknown.
|
|
34
|
+
setHasStoredAdminKey(false);
|
|
33
35
|
onLoadFailure(error);
|
|
34
36
|
});
|
|
35
37
|
};
|
|
@@ -2,6 +2,8 @@ import type { ChatMessage } from "../../react/kit.js";
|
|
|
2
2
|
/** Structural slice of the host chat library's conversation summary, as the chats endpoint lists it. */
|
|
3
3
|
export interface AssistantConversation {
|
|
4
4
|
id: string;
|
|
5
|
+
/** Transcript ownership supplied by the host; independent of active-site tools. */
|
|
6
|
+
kind?: 'desktop' | 'site';
|
|
5
7
|
title: string | null;
|
|
6
8
|
titleSource: "fallback" | "generated" | "manual";
|
|
7
9
|
messageCount: number;
|
|
@@ -18,6 +18,8 @@ export function useApplyConversationDeepLink({ query, chats, lookupConversation,
|
|
|
18
18
|
let current = true; // fences a lookup that resolves after the link or principal changed
|
|
19
19
|
void (async () => {
|
|
20
20
|
const ports = latest.current;
|
|
21
|
+
// A non-empty conversation id came from this render's query, which cannot be null.
|
|
22
|
+
const lookupQuery = ports.query;
|
|
21
23
|
let found;
|
|
22
24
|
try {
|
|
23
25
|
found = await ports.lookupConversation({ id: conversationId });
|
|
@@ -32,7 +34,7 @@ export function useApplyConversationDeepLink({ query, chats, lookupConversation,
|
|
|
32
34
|
latest.current.chats.select({ id: conversationId }, {});
|
|
33
35
|
return;
|
|
34
36
|
}
|
|
35
|
-
const next = new URLSearchParams(
|
|
37
|
+
const next = new URLSearchParams(lookupQuery);
|
|
36
38
|
next.delete("conversation");
|
|
37
39
|
ports.notify({ key: CONVERSATION_GONE_KEY });
|
|
38
40
|
ports.replaceQuery({ query: next });
|
|
@@ -6,8 +6,8 @@ const RELEASABLE_ROUTES = ['/', '/dashboard'];
|
|
|
6
6
|
export function useDesktopViewRelease({ routePath, signedIn }, _options = {}) {
|
|
7
7
|
useEffect(() => {
|
|
8
8
|
const onReleaseCheck = (event) => {
|
|
9
|
-
const path = routePath.split(/[?#]/, 1)
|
|
10
|
-
if (!signedIn || !RELEASABLE_ROUTES.includes(path
|
|
9
|
+
const [path = ''] = routePath.split(/[?#]/, 1);
|
|
10
|
+
if (!signedIn || !RELEASABLE_ROUTES.includes(path))
|
|
11
11
|
event.preventDefault();
|
|
12
12
|
};
|
|
13
13
|
window.addEventListener('jini:release-check', onReleaseCheck);
|
|
@@ -52,7 +52,7 @@ function legacyRedirectPath({ parts, query, policy }) {
|
|
|
52
52
|
const [section = ""] = parts;
|
|
53
53
|
const { detail, panelPaths, legacyDefaults = {} } = policy;
|
|
54
54
|
if (detail && parts.length === 2 && section === detail.legacySection)
|
|
55
|
-
return legacyDetailPath({ parts, query,
|
|
55
|
+
return legacyDetailPath({ parts, query, panelPaths, detail });
|
|
56
56
|
// `hasOwn` keeps prototype names such as `/constructor` from resolving to a destination.
|
|
57
57
|
if (parts.length !== 1 || !Object.hasOwn(panelPaths, section))
|
|
58
58
|
return undefined;
|
|
@@ -62,8 +62,8 @@ function legacyRedirectPath({ parts, query, policy }) {
|
|
|
62
62
|
return `${panelPaths[section]}${query}`;
|
|
63
63
|
}
|
|
64
64
|
/** A legacy two-segment detail URL (`/<legacySection>/<id>`) moved under its panel's path; undefined when that panel has no path. */
|
|
65
|
-
function legacyDetailPath({ parts, query,
|
|
66
|
-
const base =
|
|
65
|
+
function legacyDetailPath({ parts, query, panelPaths, detail }) {
|
|
66
|
+
const base = panelPaths[detail.panelId];
|
|
67
67
|
return base === undefined ? undefined : `${base}/${parts[1]}${query}`;
|
|
68
68
|
}
|
|
69
69
|
/** Bare legacy links keep their former default tab; explicit tabs survive. */
|
|
@@ -40,10 +40,12 @@ export function startBrowserStream({ key, connect, receive = () => { } }, { port
|
|
|
40
40
|
if (!state.away)
|
|
41
41
|
receive({ frame: event.data });
|
|
42
42
|
};
|
|
43
|
-
|
|
43
|
+
const shared = openSharedChannel({ key, scope, ports, onMessage });
|
|
44
|
+
state.channel = shared?.channel;
|
|
44
45
|
const halt = () => haltBrowserStream(state);
|
|
45
46
|
const open = () => openBrowserStreamConnection(state, { connect, receive });
|
|
46
|
-
|
|
47
|
+
// Reconciliation acquires only while the channel admitted with this lock provider is open.
|
|
48
|
+
const acquire = () => acquireBrowserStreamLock(state, { key, requestLock: shared.requestLock }, { open, halt, closeChannel, reconcile });
|
|
47
49
|
const closeChannel = () => closeBrowserStreamChannel(state, onMessage);
|
|
48
50
|
const reconcile = () => reconcileBrowserStream(state, { halt, acquire, reconcileTab });
|
|
49
51
|
const reconcileTab = () => reconcileTabStream(state, { ports, activity }, { halt, reconcile, open });
|
|
@@ -92,15 +94,13 @@ function openBrowserStreamConnection(state, { connect, receive }) {
|
|
|
92
94
|
state.stopConnection = () => { connected = false; close(); };
|
|
93
95
|
}
|
|
94
96
|
/** A pending/acquired lock owns its own cancellation; denied hosts switch to tab mode. */
|
|
95
|
-
function acquireBrowserStreamLock(state, { key,
|
|
97
|
+
function acquireBrowserStreamLock(state, { key, requestLock }, { open, halt, closeChannel, reconcile }) {
|
|
96
98
|
if (state.lock)
|
|
97
99
|
return;
|
|
98
|
-
if (!ports.requestLock)
|
|
99
|
-
throw new Error("shared browser stream has no lock provider");
|
|
100
100
|
const requested = new AbortController();
|
|
101
101
|
state.lock = requested;
|
|
102
102
|
// Disposal and pagehide both run `halt()`, which aborts this request, so its signal covers them.
|
|
103
|
-
void
|
|
103
|
+
void requestLock({ key: `browser-stream:${key}`, signal: requested.signal, hold: async () => {
|
|
104
104
|
if (requested.signal.aborted)
|
|
105
105
|
return;
|
|
106
106
|
// Set the release first so cleanup always releases even when connect throws.
|
|
@@ -186,7 +186,7 @@ function hiddenSinceNow({ ports, previous }) {
|
|
|
186
186
|
/**
|
|
187
187
|
* Opens the cross-tab fan-out channel for an origin-scoped stream and starts listening on it.
|
|
188
188
|
* @param required Stream key and scope, browser ports, and the frame listener.
|
|
189
|
-
* @returns The channel, or undefined for tab scope,
|
|
189
|
+
* @returns The channel and its admitted lock provider, or undefined for tab scope, missing capabilities or a refused channel.
|
|
190
190
|
*/
|
|
191
191
|
function openSharedChannel({ key, scope, ports, onMessage }) {
|
|
192
192
|
// Both capabilities are necessary: a lock without fan-out would silence follower tabs.
|
|
@@ -196,6 +196,6 @@ function openSharedChannel({ key, scope, ports, onMessage }) {
|
|
|
196
196
|
if (!channel)
|
|
197
197
|
return undefined; // Storage-denied hosts use the visibility-managed fallback.
|
|
198
198
|
channel.addEventListener("message", onMessage);
|
|
199
|
-
return channel;
|
|
199
|
+
return { channel, requestLock: ports.requestLock.bind(ports) };
|
|
200
200
|
}
|
|
201
201
|
//# sourceMappingURL=browser-stream.js.map
|
|
@@ -20,8 +20,8 @@ export function descriptorText({ i18n, locale, english }, _optional = {}) {
|
|
|
20
20
|
const exact = i18n[locale]?.[english];
|
|
21
21
|
if (exact !== undefined)
|
|
22
22
|
return exact;
|
|
23
|
-
// `String#split` always yields at least one element (`"".split("-")` is `[""]`)
|
|
24
|
-
const base = locale.split("-")
|
|
23
|
+
// `String#split` always yields at least one element (`"".split("-")` is `[""]`).
|
|
24
|
+
const [base = locale] = locale.split("-");
|
|
25
25
|
return (base !== locale ? i18n[base]?.[english] : undefined) ?? english;
|
|
26
26
|
}
|
|
27
27
|
function localizeField(field, text) {
|
|
@@ -54,8 +54,7 @@ export function useExportPassword({ port, labels, canManageSavedKeys, identity,
|
|
|
54
54
|
if (request !== generation.current)
|
|
55
55
|
return;
|
|
56
56
|
setPasswordCopied(copied);
|
|
57
|
-
|
|
58
|
-
setPasswordError(labels.copyFailed);
|
|
57
|
+
setPasswordError(copied ? null : labels.copyFailed);
|
|
59
58
|
}
|
|
60
59
|
return { revealedPassword: canManageSavedKeys ? revealedPassword : null, passwordError, revealingId, passwordCopied, revealPassword, copyPassword, hidePassword };
|
|
61
60
|
}
|
|
@@ -10,5 +10,5 @@ import type { WidgetInstanceGuard } from '../../rules.js';
|
|
|
10
10
|
export declare function WidgetInstanceGuardNotice({ guard, t }: {
|
|
11
11
|
guard: WidgetInstanceGuard;
|
|
12
12
|
t: (key: string) => string;
|
|
13
|
-
}): import("react").JSX.Element
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
14
|
//# sourceMappingURL=WidgetInstanceNotices.d.ts.map
|
|
@@ -20,8 +20,6 @@ export function WidgetInstanceGuardNotice({ guard, t }) {
|
|
|
20
20
|
return _jsx("div", { className: "notice error", children: t("No widget type specified.") });
|
|
21
21
|
case "unknown-type":
|
|
22
22
|
return _jsxs("div", { className: "notice error", children: [t('Unknown widget type "'), guard.widgetType, "\"."] });
|
|
23
|
-
default:
|
|
24
|
-
return null;
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
//# sourceMappingURL=WidgetInstanceNotices.js.map
|