From 7bb20f43b7bfa1adf352ff80ca11a2890b729bf8 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 19 Dec 2025 15:44:10 -0800 Subject: [PATCH] feat: add learning and meta-cognitive thinking verbs (#325) Co-authored-by: Letta --- src/cli/helpers/thinkingMessages.ts | 9 +++++++++ src/tests/cli/thinkingMessages.test.ts | 16 ++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/cli/helpers/thinkingMessages.ts b/src/cli/helpers/thinkingMessages.ts index d2d6089..fb59552 100644 --- a/src/cli/helpers/thinkingMessages.ts +++ b/src/cli/helpers/thinkingMessages.ts @@ -32,6 +32,15 @@ const THINKING_VERBS = [ "rendering", "executing", "initializing", + "absolutely right", + "thinking about thinking", + "metathinking", + "learning", + "adapting", + "evolving", + "remembering", + "absorbing", + "internalizing", ] as const; // Get a random thinking verb (e.g., "thinking", "processing") diff --git a/src/tests/cli/thinkingMessages.test.ts b/src/tests/cli/thinkingMessages.test.ts index 92a54ee..76ac67a 100644 --- a/src/tests/cli/thinkingMessages.test.ts +++ b/src/tests/cli/thinkingMessages.test.ts @@ -5,31 +5,31 @@ describe("Thinking messages", () => { test("returns formatted message with agent name", () => { const message = getRandomThinkingMessage("Letta"); - // Should be in format "Letta is ing" - expect(message).toMatch(/^Letta is \w+$/); + // Should be in format "Letta is " + expect(message).toMatch(/^Letta is .+$/); expect(message.startsWith("Letta is ")).toBe(true); }); test("returns capitalized verb without agent name", () => { const message = getRandomThinkingMessage(); - // Should be a capitalized verb (e.g., "Thinking", "Processing") - expect(message).toMatch(/^[A-Z][a-z]+$/); + // Should be a capitalized verb/phrase (e.g., "Thinking", "Processing", "Absolutely right") + expect(message).toMatch(/^[A-Z].+$/); expect(message[0]).toMatch(/[A-Z]/); }); test("handles null agent name", () => { const message = getRandomThinkingMessage(null); - // Should fall back to capitalized verb - expect(message).toMatch(/^[A-Z][a-z]+$/); + // Should fall back to capitalized verb/phrase + expect(message).toMatch(/^[A-Z].+$/); }); test("handles empty string agent name", () => { const message = getRandomThinkingMessage(""); - // Should fall back to capitalized verb (empty string is falsy) - expect(message).toMatch(/^[A-Z][a-z]+$/); + // Should fall back to capitalized verb/phrase (empty string is falsy) + expect(message).toMatch(/^[A-Z].+$/); }); test("generates different messages on multiple calls", () => {