|
|
@@ -37,6 +37,7 @@ import { PaasGeneratedFiles } from "./generated-files"
|
|
|
import type { PaasPreviewFile } from "./preview"
|
|
|
import { buildProjectInbox, type InboxItem } from "./inbox"
|
|
|
import { inboxSeenKey, markInboxSeen, readInboxSeen } from "./inbox-seen"
|
|
|
+import { InboxPanel } from "./inbox-panel"
|
|
|
|
|
|
export function PaasChat(props: {
|
|
|
api?: PaasPlatform
|
|
|
@@ -62,6 +63,7 @@ export function PaasChat(props: {
|
|
|
onTaskOpened?: () => void
|
|
|
historyMount?: HTMLElement
|
|
|
actionsMount?: HTMLElement
|
|
|
+ inboxMount?: HTMLElement
|
|
|
registerNewSession?: (create: (() => void) | undefined) => void
|
|
|
registerRename?: (rename: ((title: string) => void) | undefined) => void
|
|
|
onTitle?: (title: string) => void
|
|
|
@@ -126,9 +128,7 @@ export function PaasChat(props: {
|
|
|
})
|
|
|
const { state, setState, current } = model
|
|
|
const [seenVersion, setSeenVersion] = createSignal(0)
|
|
|
- const seenKey = createMemo(() =>
|
|
|
- inboxSeenKey(props.scope || "local", platform.windowID || "main", props.projectID),
|
|
|
- )
|
|
|
+ const seenKey = createMemo(() => inboxSeenKey(props.scope || "local", platform.windowID || "main", props.projectID))
|
|
|
const seen = createMemo(() => {
|
|
|
seenVersion()
|
|
|
return readInboxSeen(localStorage, seenKey())
|
|
|
@@ -669,6 +669,13 @@ export function PaasChat(props: {
|
|
|
</Portal>
|
|
|
)}
|
|
|
</Show>
|
|
|
+ <Show when={props.inboxMount}>
|
|
|
+ {(mount) => (
|
|
|
+ <Portal mount={mount()}>
|
|
|
+ <InboxPanel items={inbox()} onOpen={openInboxItem} />
|
|
|
+ </Portal>
|
|
|
+ )}
|
|
|
+ </Show>
|
|
|
<div class="paas-conversation" classList={{ "paas-conversation-empty": !current()?.messages.length }}>
|
|
|
<Show when={props.visible && props.actionsMount}>
|
|
|
{(mount) => (
|