(opts: AgentSessionBaseOptions<Mode>)
| 53 | protected collaborationMode?: SessionCollaborationMode; |
| 54 | |
| 55 | constructor(opts: AgentSessionBaseOptions<Mode>) { |
| 56 | this.path = opts.path; |
| 57 | this.api = opts.api; |
| 58 | this.client = opts.client; |
| 59 | this.logPath = opts.logPath; |
| 60 | this.sessionId = opts.sessionId; |
| 61 | this.queue = opts.messageQueue; |
| 62 | this._onModeChange = opts.onModeChange; |
| 63 | this.applySessionIdToMetadata = opts.applySessionIdToMetadata; |
| 64 | this.sessionLabel = opts.sessionLabel; |
| 65 | this.sessionIdLabel = opts.sessionIdLabel; |
| 66 | this.mode = opts.mode ?? 'local'; |
| 67 | this.permissionMode = opts.permissionMode; |
| 68 | this.model = opts.model; |
| 69 | this.modelReasoningEffort = opts.modelReasoningEffort; |
| 70 | this.effort = opts.effort; |
| 71 | this.collaborationMode = opts.collaborationMode; |
| 72 | |
| 73 | this.queue.onBatchConsumed = (localIds) => this.client.emitMessagesConsumed(localIds); |
| 74 | |
| 75 | this.client.keepAlive(this.thinking, this.mode, this.getKeepAliveRuntime()); |
| 76 | this.keepAliveInterval = setInterval(() => { |
| 77 | this.client.keepAlive(this.thinking, this.mode, this.getKeepAliveRuntime()); |
| 78 | }, 2000); |
| 79 | |
| 80 | } |
| 81 | |
| 82 | onThinkingChange = (thinking: boolean) => { |
| 83 | this.thinking = thinking; |
nothing calls this directly
no test coverage detected