chore: drop unreachable external knowledge states and helpers
Remove code with no production path: the probeStatus value 'healthy' that no probe can produce, the external.transportConfirm string and the remote-missing and config-invalid state strings that nothing renders, KnowledgeService.searchHybridMany which lost its last caller when chat search moved to retrieveMany, and the sourceUrl field that no provider parser populates. Keep sourceUrl in externalKnowledgeLocatorSchema because that schema parses already-persisted citations. Point the affected fixtures at catalog-ready, the status testInstance actually writes. Document why ProjectActivity adjusts state during render: the guarded call is the recommended pattern for resetting state on prop changes here, and the repository lint rule rejects the useEffect alternative.
This commit is contained in:
@@ -8459,7 +8459,7 @@ describe('registerIpcHandlers agent terminal state', () => {
|
||||
})
|
||||
|
||||
it('returns no results for an explicitly empty knowledge search scope', async () => {
|
||||
const searchHybridMany = vi.fn(() => {
|
||||
const retrieveMany = vi.fn(() => {
|
||||
throw new Error('must not search')
|
||||
})
|
||||
const harness = createHarness(
|
||||
@@ -8474,7 +8474,7 @@ describe('registerIpcHandlers agent terminal state', () => {
|
||||
undefined,
|
||||
{
|
||||
database: { listKnowledgeBases: vi.fn(() => []) },
|
||||
searchHybridMany
|
||||
retrieveMany
|
||||
}
|
||||
)
|
||||
await expect(
|
||||
@@ -8483,7 +8483,7 @@ describe('registerIpcHandlers agent terminal state', () => {
|
||||
{ libraryIds: [], query: 'anything' }
|
||||
)
|
||||
).resolves.toEqual([])
|
||||
expect(searchHybridMany).not.toHaveBeenCalled()
|
||||
expect(retrieveMany).not.toHaveBeenCalled()
|
||||
await harness.dispose()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user