mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
feat(servers): run Manager automation on linked servers
This commit is contained in:
1 parent
c591c15743
commit
a9bdb8358f
131 files changed
+6568
-949
No files matched your search
@@ -236,7 +236,23 @@ describe('OpenCodeEventStream', () => {
|
||||
|
||||
expect(transport.posts).toContainEqual({
|
||||
path: '/api/sse/visibility',
|
||||
body: { clientId: 'client-1', visible: true, activeSessionId: 'session-1' },
|
||||
body: { clientId: 'client-1', visible: true, activeSessionId: 'session-1', activeServerId: 'local' },
|
||||
})
|
||||
})
|
||||
|
||||
it('reports the active server id for a remote server route', async () => {
|
||||
const transport = new TestEventStreamTransport()
|
||||
const stream = new OpenCodeEventStream({ transport })
|
||||
|
||||
const subscription = stream.subscribeGlobalMonitor({ directories: ['srv_a|/repo'], onEvent: vi.fn() })
|
||||
transport.openConnection()
|
||||
transport.connected('client-1')
|
||||
subscription.reportVisibility(true, 'session-1', 'srv_a')
|
||||
await Promise.resolve()
|
||||
|
||||
expect(transport.posts).toContainEqual({
|
||||
path: '/api/sse/visibility',
|
||||
body: { clientId: 'client-1', visible: true, activeSessionId: 'session-1', activeServerId: 'srv_a' },
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user