|
@@ -1,7 +1,7 @@
|
|
|
/** Existing changed-file chips and explicitly declared files for a closing turn. */
|
|
/** Existing changed-file chips and explicitly declared files for a closing turn. */
|
|
|
import type { TurnTailOwnerProps } from '@deepseek-ai/dsh-client-ui-chat/client'
|
|
import type { TurnTailOwnerProps } from '@deepseek-ai/dsh-client-ui-chat/client'
|
|
|
import { Button } from '@deepseek-ai/dsh-client-ui-primitives'
|
|
import { Button } from '@deepseek-ai/dsh-client-ui-primitives'
|
|
|
-import type { InjectFace, PropsLocale, SessionStandardProps } from '@deepseek-ai/dsh-client-ui-slots'
|
|
|
|
|
|
|
+import type { GlobalStandardProps, InjectFace, PropsLocale, SessionStandardProps } from '@deepseek-ai/dsh-client-ui-slots'
|
|
|
import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'
|
|
import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store'
|
|
|
import type { PresentedOpenController } from './present-open.ts'
|
|
import type { PresentedOpenController } from './present-open.ts'
|
|
|
import { ProducedFiles } from './ProducedFiles.tsx'
|
|
import { ProducedFiles } from './ProducedFiles.tsx'
|
|
@@ -39,9 +39,10 @@ export function selectDeliverables(owner: TurnTailOwnerProps): DeliverablesMatch
|
|
|
* @param props - matched files, workspace opener, and localized copy.
|
|
* @param props - matched files, workspace opener, and localized copy.
|
|
|
* @returns the closing turn's file rows.
|
|
* @returns the closing turn's file rows.
|
|
|
*/
|
|
*/
|
|
|
-export function Deliverables({ matched, openFile, t, sessionId, openPresented, usePresentedOpen, usePresentedHost, reloadPresentedHost }: Pick<TurnTailOwnerProps, 'openFile'> & {
|
|
|
|
|
|
|
+export function Deliverables({ matched, openFile, t, sessionId, useSessions, openPresented, usePresentedOpen, usePresentedHost, reloadPresentedHost }: Pick<TurnTailOwnerProps, 'openFile'> & {
|
|
|
matched: DeliverablesMatch
|
|
matched: DeliverablesMatch
|
|
|
-} & PropsLocale<typeof NS> & Pick<SessionStandardProps, 'sessionId'> & InjectFace<DeliverablesInjected>) {
|
|
|
|
|
|
|
+} & PropsLocale<typeof NS> & Pick<SessionStandardProps, 'sessionId'> & Pick<GlobalStandardProps, 'useSessions'> & InjectFace<DeliverablesInjected>) {
|
|
|
|
|
+ const cwd = useSessions(state => state.byId[sessionId]?.cwd)
|
|
|
const states = usePresentedOpen(value => value)
|
|
const states = usePresentedOpen(value => value)
|
|
|
const host = usePresentedHost(value => value)
|
|
const host = usePresentedHost(value => value)
|
|
|
return <>
|
|
return <>
|
|
@@ -57,7 +58,7 @@ export function Deliverables({ matched, openFile, t, sessionId, openPresented, u
|
|
|
</div>}
|
|
</div>}
|
|
|
{host !== null && host !== 'error' && !host.available && <span className={css.hostStatus}>{t('presented.unavailable')}</span>}
|
|
{host !== null && host !== 'error' && !host.available && <span className={css.hostStatus}>{t('presented.unavailable')}</span>}
|
|
|
<div className={css.presented} data-presented-files-row>
|
|
<div className={css.presented} data-presented-files-row>
|
|
|
- {matched.presented.map(file => <PresentedFileCard key={file.path} file={file}
|
|
|
|
|
|
|
+ {matched.presented.map(file => <PresentedFileCard key={file.path} file={file} cwd={cwd}
|
|
|
phase={states[presentedFileUrl(sessionId, file.seq, file.index)]}
|
|
phase={states[presentedFileUrl(sessionId, file.seq, file.index)]}
|
|
|
host={host === 'error' ? null : host} t={t}
|
|
host={host === 'error' ? null : host} t={t}
|
|
|
onAction={(action) => { void openPresented(sessionId, file.seq, file.index, action) }} />)}
|
|
onAction={(action) => { void openPresented(sessionId, file.seq, file.index, action) }} />)}
|