Skip to content

feat(uteke-status): v2 — cross-namespace stats + agent memory injection - #80

Merged
ajianaz merged 1 commit into
developfrom
feat/uteke-status-extension-v2
May 30, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/uteke-status-extension-v2

Conversation

@ajianaz

@ajianaz ajianaz commented May 30, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

Bug Fix

  • Stats now query all namespaces via SQLite directly (before: only showed default namespace — showed 3 hot instead of 4, 0 cold instead of 63)

Features

  • System prompt injection — via before_agent_start, reminds the agent to actively use uteke:
    • Save important context proactively (decisions, progress, architecture)
    • Recall relevant memories before starting tasks
    • Use namespaces and tags for organization
    • Save session summaries when ending
  • Better spacing — 🧠 uteke: 🔥 4 hot 🟡 0 warm ❄️ 63 cold (67 total)

How it works

  • Queries ~/.uteke/uteke.db via sqlite3 CLI (pre-installed on macOS/Linux)
  • No npm dependencies needed
  • Updates on session start and after each turn

Summary by CodeRabbit

  • Refactor

    • Improved Uteke memory stats retrieval with optimized direct database queries for better performance.
  • New Features

    • Enhanced status bar display with emoji indicators for memory counts.
    • Added system prompt reminders describing Uteke memory commands and usage guidelines.
  • Changes

    • Updated refresh timing to occur at session start and turn completion.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@ajianaz, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 54 minutes and 26 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cee1a9e0-fc42-43f9-a986-07291be61e77

📥 Commits

Reviewing files that changed from the base of the PR and between 5e40e88 and 416bcb9.

📒 Files selected for processing (3)
  • extensions/uteke-status/index.ts
  • website/src/routes/docs/+layout.svelte
  • website/src/routes/docs/extensions/+page.svelte
📝 Walkthrough

Walkthrough

The uteke-status extension is rewritten to query memory stats directly from a local SQLite database instead of invoking the uteke CLI. It introduces an availability flag that gates system prompt injection, refresh lifecycle, and display. Status updates now occur on session start and turn end rather than tool call completion.

Changes

SQLite-based memory stats and system prompt integration

Layer / File(s) Summary
SQLite stats retrieval
extensions/uteke-status/index.ts
Stats type and getAllStats() function locate ~/.uteke/uteke.db, execute a single SQL query to compute hot/warm/cold memory counts, and return null on any failure.
Status bar display and availability tracking
extensions/uteke-status/index.ts
updateStatus() helper tracks an available flag and sets status text to emoji-formatted hot/warm/cold/total counts when database is accessible, or "not found" when unavailable.
System prompt memory reminder
extensions/uteke-status/index.ts
before_agent_start event handler conditionally appends a "## uteke Memory" section to the system prompt with example commands and usage rules only when the database query succeeds.
Event-driven refresh triggers
extensions/uteke-status/index.ts
Status refreshes are triggered on session_start and turn_end events rather than tool invocations, both guarded by the availability flag.
Manual stats command
extensions/uteke-status/index.ts
uteke-stats command now calls the SQLite-backed updateStatus() implementation.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A rabbit's refactor, swift and clean,
From CLI calls to database lean—
Stats now whisper from SQLite's store,
System prompts remind what's in the drawer! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: rewriting the extension to query SQLite for cross-namespace stats and injecting system prompts for agent memory usage.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/uteke-status-extension-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Query SQLite directly for cross-namespace totals (was only showing
  default namespace before)
- Add proper spacing between icons and numbers
- Inject system prompt via before_agent_start to remind agent to use
  uteke actively (remember, recall, search, save summaries)
- Simplified: removed /uteke command, kept /uteke-stats
- Uses sqlite3 CLI (pre-installed on macOS/Linux)
@ajianaz
ajianaz force-pushed the feat/uteke-status-extension-v2 branch from 5e40e88 to 416bcb9 Compare May 30, 2026 04:47
@ajianaz
ajianaz merged commit ddbe55b into develop May 30, 2026
6 checks passed
@ajianaz
ajianaz deleted the feat/uteke-status-extension-v2 branch May 30, 2026 04:55
ajianaz added a commit that referenced this pull request Aug 13, 2026
feat(uteke-status): v2 — cross-namespace stats + agent memory injection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant