mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
Feat/mobile session actions (#206)
* feat: improve mobile session actions * feat(frontend): improve mobile session actions Replace inline file search in MoreDrawer with FileBrowserSheet for mention-file interactions. Add activePromptFileBasePath state to track workspace context, normalize file paths on selection, and improve command sorting with relevance ranking (exact > prefix > partial match). * refactor(frontend): remove dead state and deduplicate event reconciliation Remove unused activePromptDirectory from uiStateStore and its writers in SessionDetail and PromptInput. Consolidate duplicated permission and question reconciliation helpers in EventContext behind a generic session-scoped helper. --------- Co-authored-by: Chris Scott <>
This commit is contained in:
1 parent
389120559f
commit
04400c91cc
17 files changed
+709
-132
No files matched your search
@@ -676,4 +676,39 @@ describe('MessagePart', () => {
|
||||
expect(screen.getByText('Reasoning')).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
||||
describe('synthetic text parts', () => {
|
||||
const createTextPart = (overrides: Partial<MessagePartType>): MessagePartType => ({
|
||||
type: 'text',
|
||||
text: 'hello',
|
||||
sessionID: 'test-session',
|
||||
messageID: 'm1',
|
||||
...overrides,
|
||||
} as MessagePartType)
|
||||
|
||||
it('does not render synthetic text parts', () => {
|
||||
setup()
|
||||
const part = createTextPart({
|
||||
text: 'Called the Read tool with the following input: {"filePath":"/x/README.md"}',
|
||||
synthetic: true,
|
||||
} as Partial<MessagePartType>)
|
||||
|
||||
const { container } = render(
|
||||
<MessagePart part={part} role="user" allParts={[part]} partIndex={0} />,
|
||||
)
|
||||
|
||||
expect(container.firstChild).toBeNull()
|
||||
})
|
||||
|
||||
it('renders non-synthetic text parts normally', () => {
|
||||
setup()
|
||||
const part = createTextPart({ text: 'Just a normal user message' })
|
||||
|
||||
render(
|
||||
<MessagePart part={part} role="user" allParts={[part]} partIndex={0} />,
|
||||
)
|
||||
|
||||
expect(screen.getByText('Just a normal user message')).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user