mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-14 02:51:43 +00:00
fix(hub,cli): keep inactive file previews available through runner (#1727)
* fix(hub,cli): keep inactive file previews available through runner * fix(cli): bound runner workspace file reads * fix(cli): constrain runner git fallback pathspecs * fix(cli): allow dot-prefixed workspace paths
This commit is contained in:
@@ -29,6 +29,7 @@ import { backoff } from '@/utils/time'
|
||||
import { getInvokedCwd } from '@/utils/invokedCwd'
|
||||
import { RpcHandlerManager } from './rpc/RpcHandlerManager'
|
||||
import { registerCommonHandlers } from '../modules/common/registerCommonHandlers'
|
||||
import { registerWorkspaceFileHandlers } from '../modules/common/workspaceFileHandlers'
|
||||
import { setAgyCatalogChangeListener } from '../modules/common/agyModels'
|
||||
import {
|
||||
listOpencodeModelsForCwd,
|
||||
@@ -133,6 +134,10 @@ export class ApiMachineClient {
|
||||
})
|
||||
|
||||
registerCommonHandlers(this.rpcHandlerManager, getInvokedCwd())
|
||||
registerWorkspaceFileHandlers(this.rpcHandlerManager, {
|
||||
resolveForCheck: (path) => this.pathPolicy.resolveForCheck(path),
|
||||
isWithinSpawnRoots: (path) => this.pathPolicy.isWithinSpawnRoots(path),
|
||||
})
|
||||
|
||||
// Only the machine daemon answers `<machineId>:listAgyModels`, so it is
|
||||
// the one process that can tell the hub its catalog moved.
|
||||
|
||||
Reference in New Issue
Block a user