@semiont/react-ui 0.3.7 → 0.4.0
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/dist/{EventBusContext-CLnb2LmB.d.mts → EventBusContext-DUIMowqQ.d.mts} +5 -2
- package/dist/index.d.mts +7 -13
- package/dist/index.mjs +47 -3
- package/dist/index.mjs.map +1 -1
- package/dist/test-utils.d.mts +2 -2
- package/package.json +1 -1
- package/src/components/modals/ConfigureGenerationStep.tsx +22 -0
- package/src/components/navigation/SortableResourceTab.tsx +4 -1
- package/src/features/resource-compose/__tests__/ResourceComposePage.test.tsx +12 -5
- package/src/features/resource-compose/components/ResourceComposePage.tsx +25 -0
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +2 -1
- package/src/styles/core/inputs.css +66 -0
|
@@ -43,6 +43,8 @@ interface OpenResource {
|
|
|
43
43
|
order?: number;
|
|
44
44
|
/** Media type for icon display (e.g., 'application/pdf', 'text/plain') */
|
|
45
45
|
mediaType?: string;
|
|
46
|
+
/** Working-tree URI (e.g. "file://docs/overview.md") — used as tooltip in navigation */
|
|
47
|
+
storageUri?: string;
|
|
46
48
|
}
|
|
47
49
|
interface OpenResourcesManager {
|
|
48
50
|
/** List of currently open resources */
|
|
@@ -52,8 +54,9 @@ interface OpenResourcesManager {
|
|
|
52
54
|
* @param id - Unique resource identifier
|
|
53
55
|
* @param name - Display name of the resource
|
|
54
56
|
* @param mediaType - Optional media type for icon display
|
|
57
|
+
* @param storageUri - Optional working-tree URI (e.g. "file://docs/overview.md")
|
|
55
58
|
*/
|
|
56
|
-
addResource: (id: string, name: string, mediaType?: string) => void;
|
|
59
|
+
addResource: (id: string, name: string, mediaType?: string, storageUri?: string) => void;
|
|
57
60
|
/**
|
|
58
61
|
* Remove a resource from the open list
|
|
59
62
|
* @param id - Resource identifier to remove
|
|
@@ -174,4 +177,4 @@ declare function EventBusProvider({ children }: EventBusProviderProps): react_js
|
|
|
174
177
|
*/
|
|
175
178
|
declare function useEventBus(): EventBus;
|
|
176
179
|
|
|
177
|
-
export { EventBusProvider as E, type OpenResourcesManager as O, type SessionManager as S, type TranslationManager as T, type
|
|
180
|
+
export { EventBusProvider as E, type OpenResourcesManager as O, type SessionManager as S, type TranslationManager as T, type OpenResource as a, type EventBusProviderProps as b, type SessionState as c, resetEventBusForTesting as r, useEventBus as u };
|
package/dist/index.d.mts
CHANGED
|
@@ -3,8 +3,8 @@ import { components, ResourceId, Selector, AnnotationId, ResourceEvent, EventMap
|
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import React__default, { ComponentType, ReactNode, KeyboardEvent as KeyboardEvent$1, Component, ErrorInfo, Ref } from 'react';
|
|
6
|
-
import { O as OpenResourcesManager, S as SessionManager, T as TranslationManager } from './EventBusContext-
|
|
7
|
-
export { E as EventBusProvider,
|
|
6
|
+
import { O as OpenResourcesManager, S as SessionManager, T as TranslationManager, a as OpenResource } from './EventBusContext-DUIMowqQ.mjs';
|
|
7
|
+
export { E as EventBusProvider, b as EventBusProviderProps, c as SessionState, r as resetEventBusForTesting, u as useEventBus } from './EventBusContext-DUIMowqQ.mjs';
|
|
8
8
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
9
9
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
10
10
|
import { SemiontApiClient, ValidationResult } from '@semiont/api-client';
|
|
@@ -398,6 +398,7 @@ declare function useResources(): {
|
|
|
398
398
|
creationMethod?: string;
|
|
399
399
|
sourceAnnotationId?: string;
|
|
400
400
|
sourceResourceId?: string;
|
|
401
|
+
storageUri: string;
|
|
401
402
|
}, unknown>;
|
|
402
403
|
};
|
|
403
404
|
update: {
|
|
@@ -2654,16 +2655,6 @@ interface SimpleNavigationProps$1 {
|
|
|
2654
2655
|
*/
|
|
2655
2656
|
declare function SimpleNavigation({ title, items, currentPath, LinkComponent, dropdownContent, isCollapsed, icons, collapseSidebarLabel, expandSidebarLabel }: SimpleNavigationProps$1): react_jsx_runtime.JSX.Element;
|
|
2656
2657
|
|
|
2657
|
-
/**
|
|
2658
|
-
* Represents an open resource/document in the navigation
|
|
2659
|
-
*/
|
|
2660
|
-
interface OpenResource {
|
|
2661
|
-
id: string;
|
|
2662
|
-
name: string;
|
|
2663
|
-
openedAt: number;
|
|
2664
|
-
mediaType?: string;
|
|
2665
|
-
order?: number;
|
|
2666
|
-
}
|
|
2667
2658
|
/**
|
|
2668
2659
|
* Props for the sortable resource tab component
|
|
2669
2660
|
*/
|
|
@@ -2754,6 +2745,7 @@ interface SimpleNavigationProps {
|
|
|
2754
2745
|
|
|
2755
2746
|
interface GenerationConfig {
|
|
2756
2747
|
title: string;
|
|
2748
|
+
storagePath: string;
|
|
2757
2749
|
prompt?: string;
|
|
2758
2750
|
language: string;
|
|
2759
2751
|
temperature: number;
|
|
@@ -3858,6 +3850,7 @@ interface ResourceComposePageProps {
|
|
|
3858
3850
|
interface SaveResourceParams {
|
|
3859
3851
|
mode: 'new' | 'clone' | 'reference';
|
|
3860
3852
|
name: string;
|
|
3853
|
+
storageUri: string;
|
|
3861
3854
|
content?: string;
|
|
3862
3855
|
file?: File;
|
|
3863
3856
|
format?: string;
|
|
@@ -4148,6 +4141,7 @@ interface YieldFlowState {
|
|
|
4148
4141
|
generationProgress: YieldProgress | null;
|
|
4149
4142
|
onGenerateDocument: (referenceId: string, options: {
|
|
4150
4143
|
title: string;
|
|
4144
|
+
storageUri: string;
|
|
4151
4145
|
prompt?: string;
|
|
4152
4146
|
language?: string;
|
|
4153
4147
|
temperature?: number;
|
|
@@ -4219,4 +4213,4 @@ declare function useContextGatherFlow(eventBus: EventBus, config: ContextGatherF
|
|
|
4219
4213
|
|
|
4220
4214
|
declare function useBindFlow(rUri: ResourceId): void;
|
|
4221
4215
|
|
|
4222
|
-
export { ANNOTATORS, AUTH_EVENTS, AVAILABLE_LOCALES, AdminDevOpsPage, type AdminDevOpsPageProps, AdminExchangePage, type AdminExchangePageProps, type AdminExchangePageTranslations, AdminSecurityPage, type AdminSecurityPageProps, type AdminUser, type AdminUserStats, AdminUsersPage, type AdminUsersPageProps, AnnotateReferencesProgressWidget, AnnotateToolbar, AnnotateView, type Annotation$k as Annotation, type AnnotationConfig, type AnnotationCreationHandler, type AnnotationHandlers, AnnotationHistory, type AnnotationManager, AnnotationOverlay, AnnotationProvider, type AnnotationProviderProps, type AnnotationUIState, type AnnotationsCollection, type Annotator, ApiClientProvider, type ApiClientProviderProps, AssessmentEntry, AssessmentPanel, AssistSection, AsyncErrorBoundary, AuthErrorDisplay, type AuthErrorDisplayProps, type AuthEventDetail, type AuthEventType, AuthTokenProvider, type AuthTokenProviderProps, type AvailableLocale, type BeckonFlowState, type BorderRadiusToken, BrowseView, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, COMMON_PANELS, type CacheManager, CacheProvider, type CacheProviderProps, type ClickAction, CodeMirrorRenderer, CollaborationPanel, CollapsibleResourceNavigation, type CollapsibleResourceNavigationProps, type ColorToken, CommentEntry, CommentsPanel, ComposeLoadingState, type ComposeLoadingStateProps, type ContextGatherFlowConfig, type ContextGatherFlowState, type CreateAnnotationParams, type CreateConfig, type DeleteAnnotationParams, type DetectionConfig, type DevOpsFeature, type DrawingMode, EntityTagsPage, type EntityTagsPageProps, EntityTypeBadges, ErrorBoundary, ExportCard, type ExportCardProps, type ExportCardTranslations, Footer, HOVER_DELAY_MS, HighlightEntry, HighlightPanel, HistoryEvent, type HoverEmitterProps, type HoverHandlers, ImageURLSchema, ImageViewer, ImportCard, type ImportCardProps, type ImportCardTranslations, type ImportPreview, ImportProgress, type ImportProgressProps, type ImportProgressTranslations, JsonLdPanel, JsonLdView, type KeyboardShortcut, KeyboardShortcutsHelpModal, LeftSidebar, type LinkComponentProps, LinkedDataPage, type LinkedDataPageProps, type LinkedDataPageTranslations, LiveRegionProvider, type MarkFlowState, type Motivation$8 as Motivation, type NavigationItem, NavigationMenu, type NavigationMenuHelper, type NavigationProps, type OAuthProvider, type OAuthUser, OAuthUserSchema, ObservableLink, type ObservableLinkProps,
|
|
4216
|
+
export { ANNOTATORS, AUTH_EVENTS, AVAILABLE_LOCALES, AdminDevOpsPage, type AdminDevOpsPageProps, AdminExchangePage, type AdminExchangePageProps, type AdminExchangePageTranslations, AdminSecurityPage, type AdminSecurityPageProps, type AdminUser, type AdminUserStats, AdminUsersPage, type AdminUsersPageProps, AnnotateReferencesProgressWidget, AnnotateToolbar, AnnotateView, type Annotation$k as Annotation, type AnnotationConfig, type AnnotationCreationHandler, type AnnotationHandlers, AnnotationHistory, type AnnotationManager, AnnotationOverlay, AnnotationProvider, type AnnotationProviderProps, type AnnotationUIState, type AnnotationsCollection, type Annotator, ApiClientProvider, type ApiClientProviderProps, AssessmentEntry, AssessmentPanel, AssistSection, AsyncErrorBoundary, AuthErrorDisplay, type AuthErrorDisplayProps, type AuthEventDetail, type AuthEventType, AuthTokenProvider, type AuthTokenProviderProps, type AvailableLocale, type BeckonFlowState, type BorderRadiusToken, BrowseView, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, COMMON_PANELS, type CacheManager, CacheProvider, type CacheProviderProps, type ClickAction, CodeMirrorRenderer, CollaborationPanel, CollapsibleResourceNavigation, type CollapsibleResourceNavigationProps, type ColorToken, CommentEntry, CommentsPanel, ComposeLoadingState, type ComposeLoadingStateProps, type ContextGatherFlowConfig, type ContextGatherFlowState, type CreateAnnotationParams, type CreateConfig, type DeleteAnnotationParams, type DetectionConfig, type DevOpsFeature, type DrawingMode, EntityTagsPage, type EntityTagsPageProps, EntityTypeBadges, ErrorBoundary, ExportCard, type ExportCardProps, type ExportCardTranslations, Footer, HOVER_DELAY_MS, HighlightEntry, HighlightPanel, HistoryEvent, type HoverEmitterProps, type HoverHandlers, ImageURLSchema, ImageViewer, ImportCard, type ImportCardProps, type ImportCardTranslations, type ImportPreview, ImportProgress, type ImportProgressProps, type ImportProgressTranslations, JsonLdPanel, JsonLdView, type KeyboardShortcut, KeyboardShortcutsHelpModal, LeftSidebar, type LinkComponentProps, LinkedDataPage, type LinkedDataPageProps, type LinkedDataPageTranslations, LiveRegionProvider, type MarkFlowState, type Motivation$8 as Motivation, type NavigationItem, NavigationMenu, type NavigationMenuHelper, type NavigationProps, type OAuthProvider, type OAuthUser, OAuthUserSchema, ObservableLink, type ObservableLinkProps, OpenResource, OpenResourcesManager, OpenResourcesProvider, type OverlayAnnotation, PageLayout, type PanelBrowseState, PanelHeader, PopupContainer, PopupHeader, ProposeEntitiesModal, QUERY_KEYS, RESOURCE_PANELS, RecentDocumentsPage, type RecentDocumentsPageProps, ReferenceEntry, ReferenceResolutionWidget, ReferenceWizardModal, type ReferenceWizardModalProps, ReferencesPanel, ResizeHandle, type ResolvedTheme, ResourceAnnotationsProvider, ResourceCard, type ResourceCardProps, ResourceComposePage, type ResourceComposePageProps, ResourceDiscoveryPage, type ResourceDiscoveryPageProps, ResourceErrorState, type ResourceErrorStateProps, ResourceInfoPanel, ResourceLoadingState, ResourceSearchModal, type ResourceSearchModalProps, ResourceTagsInline, ResourceViewer, ResourceViewerPage, type ResourceViewerPageProps, type RouteBuilder, type SaveResourceParams, SearchModal, type SearchModalProps, SelectedTextDisplay, type SelectionMotivation, type SelectorType, SemiontBranding, SemiontFavicon, type SemiontResource$4 as SemiontResource, SessionExpiryBanner, SessionManager, SessionProvider, SessionTimer, SettingsPanel, type ShadowToken, type ShapeType, SignInForm, type SignInFormProps, SignUpForm, type SignUpFormProps, SimpleNavigation, type SimpleNavigationItem, type SimpleNavigationProps, SkipLinks, SortableResourceTab, type SortableResourceTabProps, type SpacingToken, StatisticsPanel, StatusDisplay, type StreamStatus, SvgDrawingCanvas, TagEntry, TagSchemasPage, type TagSchemasPageProps, TaggingPanel, type TextSegment, type TextSelection, type Theme, ThemeProvider, ToastContainer, type ToastMessage, ToastProvider, type ToastType, Toolbar, type ToolbarPanelType, type TransitionToken, TranslationManager, TranslationProvider, type TranslationProviderProps, type TypographyToken, type UICreateAnnotationParams, UnifiedAnnotationsPanel, UnifiedHeader, type UseResourceContentResult, UserMenuSkeleton, WelcomePage, type WelcomePageProps, type YieldFlowState, applyHighlights, buildSourceToRenderedMap, buildTextNodeIndex, buttonStyles, clearHighlights, createHoverHandlers, cssVariables, dispatch401Error, dispatch403Error, dispatchAuthEvent, faviconPaths, formatTime, generateCSSVariables, getResourceIcon, getSelectedShapeForSelectorType, getSelectorType, getShortcutDisplay, getSupportedShapes, hideWidgetPreview, isShapeSupported, jsonLightHighlightStyle, jsonLightTheme, onAuthEvent, resolveAnnotationRanges, sanitizeImageURL, saveSelectedShapeForSelectorType, showWidgetPreview, supportsDetection, toOverlayAnnotations, tokens, useAdmin, useAnnotationManager, useAnnotations, useApiClient, useAuthApi, useAuthToken, useBeckonFlow, useBindFlow, useCacheManager, useContextGatherFlow, useDebounce, useDebouncedCallback, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEntityTypes, useEventSubscription, useEventSubscriptions, useFormAnnouncements, useGlobalEvents, useHealth, useHoverDelay, useHoverEmitter, useIsTyping, useKeyboardShortcuts, useLanguageChangeAnnouncements, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useMarkFlow, useModeration, useObservableExternalNavigation, useObservableRouter, useOpenResources, usePanelBrowse, usePanelWidth, usePreloadTranslations, useResourceAnnotations, useResourceContent, useResourceEvents, useResourceLoadingAnnouncements, useResources, useRovingTabIndex, useSearchAnnouncements, useSessionContext, useSessionExpiry, useTheme, useToast, useTranslations, useYieldFlow };
|
package/dist/index.mjs
CHANGED
|
@@ -52878,6 +52878,7 @@ function SortableResourceTab({
|
|
|
52878
52878
|
};
|
|
52879
52879
|
const iconEmoji = getResourceIcon(resource.mediaType);
|
|
52880
52880
|
const isCurrentlyDragging = isSortableDragging || isDragging;
|
|
52881
|
+
const tooltipText = resource.storageUri ? resource.storageUri.replace(/^file:\/\//, "") : resource.name;
|
|
52881
52882
|
const handleKeyDown = useCallback28((e6) => {
|
|
52882
52883
|
if (onReorderRef.current && e6.altKey) {
|
|
52883
52884
|
if (e6.key === "ArrowUp") {
|
|
@@ -52907,7 +52908,7 @@ function SortableResourceTab({
|
|
|
52907
52908
|
{
|
|
52908
52909
|
href,
|
|
52909
52910
|
className: "semiont-resource-tab__link",
|
|
52910
|
-
title:
|
|
52911
|
+
title: tooltipText,
|
|
52911
52912
|
children: [
|
|
52912
52913
|
/* @__PURE__ */ jsx49("span", { className: "semiont-resource-tab__icon", "aria-hidden": "true", children: iconEmoji }),
|
|
52913
52914
|
!isCollapsed && /* @__PURE__ */ jsx49("span", { className: "semiont-resource-tab__text", children: resource.name })
|
|
@@ -53418,6 +53419,7 @@ function ConfigureGenerationStep({
|
|
|
53418
53419
|
translations: t12
|
|
53419
53420
|
}) {
|
|
53420
53421
|
const [title, setTitle] = useState33(defaultTitle);
|
|
53422
|
+
const [storagePath, setStoragePath] = useState33("");
|
|
53421
53423
|
const [prompt, setPrompt] = useState33("");
|
|
53422
53424
|
const [language2, setLanguage] = useState33(locale);
|
|
53423
53425
|
const [temperature, setTemperature] = useState33(0.7);
|
|
@@ -53427,6 +53429,7 @@ function ConfigureGenerationStep({
|
|
|
53427
53429
|
const trimmedPrompt = prompt.trim();
|
|
53428
53430
|
onGenerate({
|
|
53429
53431
|
title,
|
|
53432
|
+
storagePath: `file://${storagePath}`,
|
|
53430
53433
|
...trimmedPrompt ? { prompt: trimmedPrompt } : {},
|
|
53431
53434
|
language: language2,
|
|
53432
53435
|
temperature,
|
|
@@ -53450,6 +53453,24 @@ function ConfigureGenerationStep({
|
|
|
53450
53453
|
}
|
|
53451
53454
|
)
|
|
53452
53455
|
] }),
|
|
53456
|
+
/* @__PURE__ */ jsxs43("div", { className: "semiont-form__field", children: [
|
|
53457
|
+
/* @__PURE__ */ jsx53("label", { htmlFor: "wizard-storagePath", className: "semiont-form__label", children: "Save location" }),
|
|
53458
|
+
/* @__PURE__ */ jsxs43("div", { className: "semiont-input-addon", children: [
|
|
53459
|
+
/* @__PURE__ */ jsx53("span", { className: "semiont-input-addon__prefix", children: "file://" }),
|
|
53460
|
+
/* @__PURE__ */ jsx53(
|
|
53461
|
+
"input",
|
|
53462
|
+
{
|
|
53463
|
+
id: "wizard-storagePath",
|
|
53464
|
+
type: "text",
|
|
53465
|
+
value: storagePath,
|
|
53466
|
+
onChange: (e6) => setStoragePath(e6.target.value),
|
|
53467
|
+
required: true,
|
|
53468
|
+
className: "semiont-input semiont-input--addon",
|
|
53469
|
+
placeholder: "generated/my-resource.md"
|
|
53470
|
+
}
|
|
53471
|
+
)
|
|
53472
|
+
] })
|
|
53473
|
+
] }),
|
|
53453
53474
|
/* @__PURE__ */ jsxs43("div", { className: "semiont-form__field", children: [
|
|
53454
53475
|
/* @__PURE__ */ jsx53("label", { htmlFor: "wizard-prompt", className: "semiont-form__label", children: t12.additionalInstructions }),
|
|
53455
53476
|
/* @__PURE__ */ jsx53(
|
|
@@ -57217,6 +57238,7 @@ function ResourceComposePage({
|
|
|
57217
57238
|
const [selectedFormat, setSelectedFormat] = useState44("text/markdown");
|
|
57218
57239
|
const [selectedLanguage, setSelectedLanguage] = useState44(initialLocale);
|
|
57219
57240
|
const [selectedCharset, setSelectedCharset] = useState44("");
|
|
57241
|
+
const [storagePath, setStoragePath] = useState44("");
|
|
57220
57242
|
const [archiveOriginal, setArchiveOriginal] = useState44(true);
|
|
57221
57243
|
useEffect46(() => {
|
|
57222
57244
|
if (mode === "clone" && cloneData) {
|
|
@@ -57267,6 +57289,7 @@ function ResourceComposePage({
|
|
|
57267
57289
|
const params = {
|
|
57268
57290
|
mode,
|
|
57269
57291
|
name: newResourceName,
|
|
57292
|
+
storageUri: `file://${storagePath}`,
|
|
57270
57293
|
content: newResourceContent,
|
|
57271
57294
|
format: uploadedFile ? fileMimeType : selectedFormat,
|
|
57272
57295
|
entityTypes: selectedEntityTypes,
|
|
@@ -57358,6 +57381,25 @@ function ResourceComposePage({
|
|
|
57358
57381
|
}
|
|
57359
57382
|
)
|
|
57360
57383
|
] }),
|
|
57384
|
+
/* @__PURE__ */ jsxs75("div", { className: "semiont-form__field", children: [
|
|
57385
|
+
/* @__PURE__ */ jsx87("label", { htmlFor: "storagePath", className: "semiont-form__label", children: "Save location" }),
|
|
57386
|
+
/* @__PURE__ */ jsxs75("div", { className: "semiont-input-addon", children: [
|
|
57387
|
+
/* @__PURE__ */ jsx87("span", { className: "semiont-input-addon__prefix", children: "file://" }),
|
|
57388
|
+
/* @__PURE__ */ jsx87(
|
|
57389
|
+
"input",
|
|
57390
|
+
{
|
|
57391
|
+
id: "storagePath",
|
|
57392
|
+
type: "text",
|
|
57393
|
+
value: storagePath,
|
|
57394
|
+
onChange: (e6) => setStoragePath(e6.target.value),
|
|
57395
|
+
placeholder: "docs/my-resource.md",
|
|
57396
|
+
required: true,
|
|
57397
|
+
className: "semiont-input semiont-input--addon",
|
|
57398
|
+
disabled: isCreating
|
|
57399
|
+
}
|
|
57400
|
+
)
|
|
57401
|
+
] })
|
|
57402
|
+
] }),
|
|
57361
57403
|
(!isReferenceCompletion || selectedEntityTypes.length === 0) && /* @__PURE__ */ jsxs75("div", { className: "semiont-form__field semiont-form__entity-types", children: [
|
|
57362
57404
|
/* @__PURE__ */ jsx87("div", { className: "semiont-form__label", children: t12.entityTypes }),
|
|
57363
57405
|
/* @__PURE__ */ jsx87(
|
|
@@ -58236,7 +58278,8 @@ function useYieldFlow(locale, resourceId2, clearNewAnnotationId) {
|
|
|
58236
58278
|
options: {
|
|
58237
58279
|
...options,
|
|
58238
58280
|
language: options.language || locale,
|
|
58239
|
-
context: options.context
|
|
58281
|
+
context: options.context,
|
|
58282
|
+
storageUri: options.storageUri
|
|
58240
58283
|
}
|
|
58241
58284
|
});
|
|
58242
58285
|
}, [resourceId2, clearNewAnnotationId, locale]);
|
|
@@ -58420,6 +58463,7 @@ function ResourceViewerPage({
|
|
|
58420
58463
|
const handleWizardGenerateSubmit = useCallback38((referenceId, config) => {
|
|
58421
58464
|
onGenerateDocument(referenceId, {
|
|
58422
58465
|
title: config.title,
|
|
58466
|
+
storageUri: config.storagePath,
|
|
58423
58467
|
prompt: config.prompt,
|
|
58424
58468
|
language: config.language,
|
|
58425
58469
|
temperature: config.temperature,
|
|
@@ -58465,7 +58509,7 @@ function ResourceViewerPage({
|
|
|
58465
58509
|
useEffect51(() => {
|
|
58466
58510
|
if (resource && rUri) {
|
|
58467
58511
|
const mediaType = getPrimaryMediaType2(resource);
|
|
58468
|
-
addResource(rUri, resource.name, mediaType || void 0);
|
|
58512
|
+
addResource(rUri, resource.name, mediaType || void 0, resource.storageUri);
|
|
58469
58513
|
if (typeof localStorage !== "undefined") {
|
|
58470
58514
|
localStorage.setItem("lastViewedDocumentId", rUri);
|
|
58471
58515
|
}
|