mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
remove , using instead
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* - No E2E encryption; data is stored as JSON in SQLite
|
||||
*/
|
||||
|
||||
import type { DecryptedMessage, ModelMode, PermissionMode, Session, SyncEvent } from '@hapi/protocol/types'
|
||||
import type { DecryptedMessage, PermissionMode, Session, SyncEvent } from '@hapi/protocol/types'
|
||||
import type { Server } from 'socket.io'
|
||||
import type { Store } from '../store'
|
||||
import type { RpcRegistry } from '../socket/rpcRegistry'
|
||||
@@ -187,7 +187,7 @@ export class SyncEngine {
|
||||
thinking?: boolean
|
||||
mode?: 'local' | 'remote'
|
||||
permissionMode?: PermissionMode
|
||||
modelMode?: ModelMode
|
||||
model?: string | null
|
||||
}): void {
|
||||
this.sessionCache.handleSessionAlive(payload)
|
||||
}
|
||||
@@ -281,14 +281,14 @@ export class SyncEngine {
|
||||
sessionId: string,
|
||||
config: {
|
||||
permissionMode?: PermissionMode
|
||||
modelMode?: ModelMode
|
||||
model?: string | null
|
||||
}
|
||||
): Promise<void> {
|
||||
const result = await this.rpcGateway.requestSessionConfig(sessionId, config)
|
||||
if (!result || typeof result !== 'object') {
|
||||
throw new Error('Invalid response from session config RPC')
|
||||
}
|
||||
const obj = result as { applied?: { permissionMode?: Session['permissionMode']; modelMode?: Session['modelMode'] } }
|
||||
const obj = result as { applied?: { permissionMode?: Session['permissionMode']; model?: Session['model'] } }
|
||||
const applied = obj.applied
|
||||
if (!applied || typeof applied !== 'object') {
|
||||
throw new Error('Missing applied session config')
|
||||
@@ -372,7 +372,7 @@ export class SyncEngine {
|
||||
targetMachine.id,
|
||||
metadata.path,
|
||||
flavor,
|
||||
session.model,
|
||||
session.model ?? undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
|
||||
Reference in New Issue
Block a user