Remove Ask/Execute modes and general product tool approvals so requests use the selected runtime, enabled capabilities, and execution account permissions. Migrate retired application metadata while preserving user content. Retire the Results page while retaining conversation images and stored artifacts. Add local and remote workspace file imports, timestamps and sorting, improve image discovery and saving, and refine workspace navigation and supervision responsiveness. Include the accompanying web-search changes, tests, probes, and product documentation. Remote imports require an updated Agent. Existing artifacts are not automatically copied into project directories. Validation evidence and outstanding failures remain documented in feature progress files; no full test suite or real-model calls were rerun for this commit. Release note: Run requests without switching work modes, import files into a selected local or remote workspace folder, sort workspace files by date, and keep using conversation images after removal of the Results page.
53 lines
2.8 KiB
TypeScript
53 lines
2.8 KiB
TypeScript
import { useState } from 'react'
|
|
import { createRoot } from 'react-dom/client'
|
|
import { WorkspaceFilesPanel } from '../../src/renderer/src/WorkspaceFilesPanel'
|
|
import { UiLocaleProvider } from '../../src/renderer/src/i18n/UiLocaleProvider'
|
|
import { changeUiLocale } from '../../src/renderer/src/i18n'
|
|
import { applyAppearanceTheme } from '../../src/renderer/src/theme'
|
|
import { installBundledUiFonts } from '../../src/renderer/src/fonts'
|
|
import type { DesktopApi } from '../../src/shared/contracts'
|
|
import type { WorkspaceDirectoryListing } from '../../src/shared/assistant-contracts'
|
|
import '../../src/renderer/src/styles.css'
|
|
|
|
const query = new URLSearchParams(location.search)
|
|
const listDirectory = async (path: string): Promise<WorkspaceDirectoryListing> => ({
|
|
path, truncated: false, entries: [
|
|
...(!path ? [{ name: 'documents', path: 'documents', type: 'directory' as const }] : []),
|
|
...Array.from({ length: 120 }, (_, index) => {
|
|
const name = `file-${String(index + 1).padStart(3, '0')}-workspace-notes.md`
|
|
return { name, path: path ? `${path}/${name}` : name, type: 'file' as const, modifiedAt: '2026-10-04T10:00:00.000Z', createdAt: '2026-10-01T10:00:00.000Z' }
|
|
})
|
|
]
|
|
})
|
|
Object.defineProperty(window, 'goodbuddy', { value: {
|
|
workspace: { manage: async (_projectId: string, action: { kind: string }) => {
|
|
if (action.kind === 'branches') return { kind: 'branches', current: 'main', branches: [] }
|
|
throw new Error(`Unexpected fixture action: ${action.kind}`)
|
|
} }
|
|
} as unknown as DesktopApi })
|
|
|
|
function Fixture(): React.JSX.Element {
|
|
const [preview, setPreview] = useState<string>()
|
|
return <UiLocaleProvider initialPreference="en-US">
|
|
<aside className="assistant-sidebar assistant-sidebar--open"
|
|
style={{ width: Number(query.get('sidebar')), flexBasis: Number(query.get('sidebar')), height: '100vh' }}>
|
|
<div className="assistant-sidebar__body">
|
|
<section className="assistant-sidebar__section workspace-files__navigation" hidden={Boolean(preview)}>
|
|
<WorkspaceFilesPanel projectId="files-layout" rootPath="/fixture/workspace"
|
|
isRepository={query.get('git') === 'true'} changedFiles={[]}
|
|
onListDirectory={listDirectory} onOpenFile={setPreview}
|
|
onLoadDiff={async () => { throw new Error('Unused diff fixture') }} />
|
|
</section>
|
|
{preview && <section className="assistant-sidebar__section">
|
|
<button id="return-to-files" onClick={() => setPreview(undefined)}>Return to Files</button>
|
|
<p>{preview}</p>
|
|
</section>}
|
|
</div>
|
|
</aside>
|
|
</UiLocaleProvider>
|
|
}
|
|
|
|
installBundledUiFonts()
|
|
applyAppearanceTheme(query.get('theme') === 'dark' ? 'dark' : 'light')
|
|
void changeUiLocale('en-US').then(() => createRoot(document.getElementById('root')!).render(<Fixture />))
|