MCPcopy Create free account
hub / github.com/clawbot7/cli-gateway / updateSessionAgentConfig

Function updateSessionAgentConfig

src/gateway/sessionStore.ts:151–175  ·  view source on GitHub ↗
(
  db: Db,
  params: {
    sessionKey: string;
    agentCommand: string;
    agentArgs: string[];
  },
)

Source from the content-addressed store, hash-verified

149}
150
151export function updateSessionAgentConfig(
152 db: Db,
153 params: {
154 sessionKey: string;
155 agentCommand: string;
156 agentArgs: string[];
157 },
158): void {
159 const now = Date.now();
160 db.prepare(
161 `
162 UPDATE sessions
163 SET agent_command = ?,
164 agent_args_json = ?,
165 acp_session_id = NULL,
166 updated_at = ?
167 WHERE session_key = ?
168 `,
169 ).run(
170 params.agentCommand,
171 JSON.stringify(params.agentArgs),
172 now,
173 params.sessionKey,
174 );
175}
176
177export function getSession(
178 db: Db,

Callers 1

handleCommandMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected