Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

Merge remote-tracking branch 'origin/dev' into feat/ux-improvements-33

Mfb20f536f70a
diff --cc desktop-app/ui/src/components/GfsImagePreview/index.tsx
index 1ec8faa80,c19e9838d..5c4603839
--- a/desktop-app/ui/src/components/GfsImagePreview/index.tsx
+++ b/desktop-app/ui/src/components/GfsImagePreview/index.tsx
@@@ -16,9 -16,10 +16,11 @@@ export function GfsImagePreview(
byteLength,
fileName,
gfsUri,
+ dataBase64,
mimeType,
onClose,
+ reloadVersion,
+ unavailable = false,
onDownloadError,
}: GfsImagePreviewProps) {
const titleId = useId()
@@@ -49,28 -64,30 +65,31 @@@
aria-modal="true"
aria-labelledby={titleId}
>
- <GfsImagePreviewBody
- byteLength={byteLength}
- fileName={fileName}
- gfsUri={gfsUri}
- dataBase64={dataBase64}
- mimeType={mimeType}
- onDownloadError={onDownloadError}
- titleId={titleId}
- headerActions={
- <Button
- className="da-gfs-image-preview-dialog__close"
- data-preview-close
- ref={closeButtonRef}
- aria-label="Close image preview"
- color="neutral"
- onClick={onClose}
- variant="ghost"
- >
- <IconClose width={18} height={18} />
- </Button>
- }
- />
+ {unavailable ? (
+ <>
+ <header className="da-gfs-image-preview-dialog__header">
+ <h3 id={titleId}>File unavailable</h3>
+ {closeButton}
+ </header>
+ <div className="da-gfs-image-preview-dialog__body">
+ <div className="empty-state">
+ <p className="muted">This item is no longer available.</p>
+ </div>
+ </div>
+ </>
+ ) : (
+ <GfsImagePreviewBody
+ key={`${gfsUri}:${reloadVersion ?? 0}`}
+ byteLength={byteLength}
+ fileName={fileName}
+ gfsUri={gfsUri}
++ dataBase64={dataBase64}
+ mimeType={mimeType}
+ onDownloadError={onDownloadError}
+ titleId={titleId}
+ headerActions={closeButton}
+ />
+ )}
</section>
</div>,
document.body
diff --cc desktop-app/ui/src/components/GfsImagePreview/types.ts
index f6b7d9253,8e2827353..21255a7fb
--- a/desktop-app/ui/src/components/GfsImagePreview/types.ts
+++ b/desktop-app/ui/src/components/GfsImagePreview/types.ts
@@@ -18,10 -3,13 +18,12 @@@ export type GfsImagePreviewSource =
export type GfsImagePreviewProps = {
byteLength: number
fileName: string
- gfsUri: string
mimeType: string
onClose: () => void
+ reloadVersion?: number
+ unavailable?: boolean
onDownloadError?: (error: unknown) => void
-}
+} & GfsImagePreviewSource
/**
* The de-modalized image preview (spec 18 §3.B.2): the `<img>` + its fetch,
diff --cc desktop-app/ui/src/components/agents/ChatThread.tsx
index b3f08de7a,67a5b75f4..7448c10bd
--- a/desktop-app/ui/src/components/agents/ChatThread.tsx
+++ b/desktop-app/ui/src/components/agents/ChatThread.tsx
@@@ -7,8 -7,10 +7,11 @@@ import
useRef,
useState,
} from 'react'
- import { useAgentChatActionsContext } from '@contexts/AgentChatActionsContext'
+ import {
+ type QueuedChatDelete,
+ useAgentChatActionsContext,
+ } from '@contexts/AgentChatActionsContext'
+import { useChatComposerStateContext } from '@contexts/ChatComposerStateContext'
import { useChatListContext } from '@contexts/ChatListContext'
import { useChatThreadStateContext } from '@contexts/ChatThreadStateContext'
import { useMcpRuntimeContext } from '@contexts/McpRuntimeContext'
@@@ -300,9 -242,8 +303,10 @@@ export function ChatThread({ showAgentL
chatEndRef,
handleSelectChat: onSelectChat,
handleRenameChat: onRenameChat,
+ captureChatDeleteFence,
handleDeleteChat: onDeleteChat,
+ handleAddComposerImageAttachments: onAddComposerImageAttachments,
+ handleAddComposerReferenceAttachments: onAddComposerReferenceAttachments,
} = useAgentChatActionsContext()
const { cancelTask: onCancelTask } = useMcpRuntimeContext()