@@ -24,6 +24,7 @@ export interface StoredAction {
2424 args: string | null;
2525 prompt_excerpt: string | null;
2626 model_raw: string | null;
27+ thinking: string | null;
2728 }
2829
2930 export interface StoredEvent {
@@ -78,7 +79,8 @@ export class MemoryStore {
7879 action TEXT NOT NULL,
7980 args TEXT,
8081 prompt_excerpt TEXT,
81- model_raw TEXT
82+ model_raw TEXT,
83+ thinking TEXT
8284 );
8385 CREATE TABLE IF NOT EXISTS action_results (
8486 id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -254,10 +256,11 @@ export class MemoryStore {
254256 args: unknown,
255257 promptExcerpt: string,
256258 modelRaw: string,
259+ thinking: string | null,
257260 ): void {
258261 this.db
259262 .query(
260- "INSERT INTO actions (ts, tick, action, args, prompt_excerpt, model_raw) VALUES (?, ?, ?, ?, ?, ?)",
263+ "INSERT INTO actions (ts, tick, action, args, prompt_excerpt, model_raw, thinking) VALUES (?, ?, ?, ?, ?, ?, ?)",
261264 )
262265 .run(
263266 nowIso(),
@@ -266,6 +269,7 @@ export class MemoryStore {
266269 toJson(args),
267270 truncate(promptExcerpt),
268271 truncate(modelRaw),
272+ thinking,
269273 );
270274 }
271275
@@ -275,10 +279,11 @@ export class MemoryStore {
275279 args: unknown,
276280 promptExcerpt: string,
277281 modelRaw: string,
282+ thinking: string | null,
278283 ): number {
279284 const result = this.db
280285 .query(
281- "INSERT INTO actions (ts, tick, action, args, prompt_excerpt, model_raw) VALUES (?, ?, ?, ?, ?, ?)",
286+ "INSERT INTO actions (ts, tick, action, args, prompt_excerpt, model_raw, thinking) VALUES (?, ?, ?, ?, ?, ?, ?)",
282287 )
283288 .run(
284289 nowIso(),
@@ -287,6 +292,7 @@ export class MemoryStore {
287292 toJson(args),
288293 truncate(promptExcerpt),
289294 truncate(modelRaw),
295+ thinking,
290296 );
291297 return Number(result.lastInsertRowid);
292298 }