Skip to content

feat(provider): add kimi-for-coding provider#394

Closed
beyond-infra wants to merge 4 commits into
rohitg00:mainfrom
beyond-infra:feat/kimi-for-coding
Closed

feat(provider): add kimi-for-coding provider#394
beyond-infra wants to merge 4 commits into
rohitg00:mainfrom
beyond-infra:feat/kimi-for-coding

Conversation

@beyond-infra
Copy link
Copy Markdown

@beyond-infra beyond-infra commented May 15, 2026

Summary

Add support for Kimi for Coding (Moonshot AI Coding Plan) via their Anthropic-compatible endpoint at https://api.kimi.com/coding.

Key Changes

  • New provider: kimi-for-coding with KIMI_FOR_CODING_API_KEY env var
  • Shared base class: Extract AnthropicCompatibleProvider to eliminate ~60 lines of duplication with MinimaxProvider
  • User-Agent workaround: Kimi rejects default Anthropic SDK User-Agent with HTTP 429; we pass KimiCLI/1.5
  • describeImage support: Added to both KimiForCodingProvider and MinimaxProvider (was missing)

Env Vars

Variable Required Default
KIMI_FOR_CODING_API_KEY Yes
KIMI_FOR_CODING_BASE_URL No https://api.kimi.com/coding
KIMI_FOR_CODING_MODEL No kimi-k2

Tests

  • test/kimi-for-coding-provider.test.ts — base URL resolution (default + env override)
  • test/kimi-for-coding-e2e.test.ts — mock fetch verifies headers, body shape, and error handling

Compatibility Notes

This PR touches src/types.ts (ProviderType) and src/providers/index.ts (createBaseProvider), which may conflict with other open provider PRs:

If any of these merge first, this PR will need a rebase.

Additionally, #379 (AbortController timeout) adds fetchWithTimeout to minimax.ts. Since this PR extracts a shared AnthropicCompatibleProvider base class, the timeout logic from #379 should ideally be merged into the base class rather than per-provider. Happy to coordinate with #379's author if both PRs are accepted.

Verification

  • npm run build passes
  • New tests pass (11/11)
  • Prettier formatted
  • DCO sign-off

Summary by CodeRabbit

  • New Features

    • Added "Kimi for Coding" provider and image-description support via an Anthropic-compatible API.
    • New provider discoverable via environment/config.
  • Refactor

    • Unified Anthropic-compatible provider implementation used by multiple providers.
  • Tests

    • Added unit and end-to-end tests for the new provider (requests, headers, payloads, base URL, and error handling).
  • Documentation

    • Added architecture doc and updated viewer UI text and styling.
  • Style

    • Viewer UI styling refresh and prompt instruction refinements.

Review Change Stack

@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

@beyond-infra is attempting to deploy a commit to the rohitg00's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7d6268c7-b46e-4e0d-832b-b0d4a09e4d68

📥 Commits

Reviewing files that changed from the base of the PR and between 5af5cd8 and 497e57b.

📒 Files selected for processing (4)
  • ARCHITECTURE.md
  • src/prompts/graph-extraction.ts
  • src/providers/embedding/local.ts
  • src/viewer/index.html

📝 Walkthrough

Walkthrough

Adds AnthropicCompatibleProvider to centralize Anthropic /v1/messages handling, refactors MinimaxProvider to extend it, introduces KimiForCodingProvider (wired into the provider factory and ProviderType), updates config detection, and adds tests validating base URL resolution, request shape, and error handling; also updates prompts, embedding local config, architecture doc, and viewer styling.

Changes

Anthropic-compatible provider abstraction and Kimi integration

Layer / File(s) Summary
AnthropicCompatibleProvider base class
src/providers/anthropic-compatible.ts
New reusable base provider implementing MemoryProvider with compress(), summarize(), and describeImage() methods. Methods delegate to a private request() that posts to /v1/messages, throws on non-OK responses including status/body, and extracts the first "text" content block from JSON responses.
MinimaxProvider refactor
src/providers/minimax.ts
Refactors MinimaxProvider to extend AnthropicCompatibleProvider and forward `("minimax", apiKey, model, MINIMAX_BASE_URL
KimiForCodingProvider implementation
src/providers/kimi-for-coding.ts
Adds KimiForCodingProvider extending AnthropicCompatibleProvider, constructed with KIMI_FOR_CODING_API_KEY, model, maxTokens, base URL from KIMI_FOR_CODING_BASE_URL (default https://api.kimi.com/coding), and a fixed User-Agent: KimiCLI/1.5 header.
Factory wiring and type & config registration
src/providers/index.ts, src/types.ts, src/config.ts
Imports and registers KimiForCodingProvider in the provider factory under kimi-for-coding using requireEnvVar("KIMI_FOR_CODING_API_KEY"); adds "kimi-for-coding" to ProviderType and updates config detection/validation to recognize the new env key and provider.
KimiForCodingProvider tests
test/kimi-for-coding-e2e.test.ts, test/kimi-for-coding-provider.test.ts
Adds tests that mock globalThis.fetch to validate request headers/payload and error handling, and unit tests that verify base URL defaulting and environment override while preserving/restoring original env state.
Graph extraction prompt
src/prompts/graph-extraction.ts
Rewrites GRAPH_EXTRACTION_SYSTEM to require attribute-based XML output with explicit examples and exact empty <entities></entities>/<relationships></relationships> rules.
Local embedding extractor config
src/providers/embedding/local.ts
Configures @xenova/transformers runtime env to allow local models and disallow remote fetching before creating extractor pipeline.
Architecture doc
ARCHITECTURE.md
Adds AgentMemory architecture overview, indexing/search pipeline, and integration lifecycle points.
Viewer styling and banner text
src/viewer/index.html
Extensive CSS restyling and viewer JS banner text updates to include KIMI_FOR_CODING_API_KEY and expanded embedding-provider guidance.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • rohitg00/agentmemory#103: Earlier standalone MiniMax provider implementation with direct fetch calls that is now consolidated into the shared AnthropicCompatibleProvider base class.
  • rohitg00/agentmemory#289: Prior changes to MinimaxProvider base URL handling that overlap with this refactor consolidating Anthropic-compatible behavior.
  • rohitg00/agentmemory#198: Related to adding new provider detection and viewer/flag integrations that interact with the provider/factory changes here.

Poem

🐰 I hopped to make providers sing,
Anthropic code in one neat ring,
Kimi joins with headers bright,
MiniMax now shares the light,
Tests clap softly — bedtime flight.

🚥 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 'feat(provider): add kimi-for-coding provider' clearly and specifically describes the main change—adding a new provider for Kimi for Coding—which is the primary objective of the PR.
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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

@beyond-infra beyond-infra force-pushed the feat/kimi-for-coding branch from a5d039f to 18c7c6b Compare May 15, 2026 13:00
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/providers/kimi-for-coding.ts (1)

4-12: ⚡ Quick win

Reduce inline explanatory block comments and keep this self-descriptive.

This block is mostly “WHAT” documentation and can drift; prefer concise naming here and move operational notes/env-var docs to README/provider docs.

♻️ Suggested trim
-/**
- * Kimi for Coding provider.
- *
- * Kimi's Coding Plan endpoint rejects the default Anthropic SDK User-Agent
- * with HTTP 429 "engine overloaded". We pass a whitelisted User-Agent header.
- *
- * Required env var: KIMI_API_KEY
- * Optional env vars: KIMI_BASE_URL (default: https://api.kimi.com/coding)
- */
+/** Kimi for Coding provider. */

As per coding guidelines, "Avoid code comments explaining WHAT — use clear naming instead".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/providers/kimi-for-coding.ts` around lines 4 - 12, The large explanatory
block comment at the top of src/providers/kimi-for-coding.ts should be trimmed
to a short self-descriptive header (e.g., "Kimi for Coding provider") and any
operational details (env var requirements like KIMI_API_KEY, KIMI_BASE_URL and
the User-Agent workaround) should be moved to the provider README or external
docs; update the file header to a one-line description and remove the
WHAT-focused paragraphs so the code stays self-descriptive while operational
notes live in documentation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/providers/anthropic-compatible.ts`:
- Line 48: Both fetch calls in the anthropic-compatible provider (describeImage
and call) can hang; add a timeout using AbortController and apply it to both
functions (or import and reuse the existing fetchWithTimeout helper introduced
for minimax.ts) so every fetch is aborted after a configured timeout.
Specifically, update describeImage and call to create an AbortController, start
a timer that calls controller.abort() after the desired timeout, pass signal:
controller.signal into the fetch options, clear the timer on success/failure,
and surface a clear timeout error; prefer reusing the shared fetchWithTimeout
helper if available to avoid duplication.
- Around line 42-117: describeImage and call duplicate the same /v1/messages
fetch, header, error, JSON parse and text extraction logic; extract a shared
helper (e.g., requestMessage or postMessage) into the base class that accepts
the request body payload (or parameters to construct it) and returns the
extracted text string. Move repeated use of this.baseUrl, this.apiKey,
this.extraHeaders, this.errorPrefix, this.model and this.maxTokens into that
helper so describeImage and call only build their specific body (image+prompt vs
system+messages) and invoke the helper; ensure the helper preserves the existing
error formatting, JSON -> AnthropicMessageResponse parsing, and find((b) =>
b.type === "text") extraction so future changes (timeouts/retries/logging) are
applied once.

---

Nitpick comments:
In `@src/providers/kimi-for-coding.ts`:
- Around line 4-12: The large explanatory block comment at the top of
src/providers/kimi-for-coding.ts should be trimmed to a short self-descriptive
header (e.g., "Kimi for Coding provider") and any operational details (env var
requirements like KIMI_API_KEY, KIMI_BASE_URL and the User-Agent workaround)
should be moved to the provider README or external docs; update the file header
to a one-line description and remove the WHAT-focused paragraphs so the code
stays self-descriptive while operational notes live in documentation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e298018f-5080-4398-9fbd-fcb1a59479fe

📥 Commits

Reviewing files that changed from the base of the PR and between ff3e024 and a5d039f.

📒 Files selected for processing (7)
  • src/providers/anthropic-compatible.ts
  • src/providers/index.ts
  • src/providers/kimi-for-coding.ts
  • src/providers/minimax.ts
  • src/types.ts
  • test/kimi-for-coding-e2e.test.ts
  • test/kimi-for-coding-provider.test.ts

Comment thread src/providers/anthropic-compatible.ts
Comment thread src/providers/anthropic-compatible.ts Outdated
prompt: string,
): Promise<string> {
const url = `${this.baseUrl}/v1/messages`;
const response = await fetch(url, {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add a request timeout — both fetch calls can hang indefinitely.

Neither describeImage (line 48) nor call (line 93) sets an AbortController / timeout, so a stalled remote endpoint will block the calling code with no upper bound. The PR description itself notes that PR #379 introduces fetchWithTimeout for minimax.ts and recommends folding that into this shared base — please do so here so both Minimax and Kimi inherit the protection from day one, rather than relying on a follow-up merge.

🛡️ Sketch using AbortController
+  private timeoutMs: number;
   constructor(
     name: string,
     apiKey: string,
     model: string,
     maxTokens: number,
     baseUrl: string,
     extraHeaders: Record<string, string> = {},
     errorPrefix: string = "API",
+    timeoutMs: number = 60_000,
   ) {
     ...
+    this.timeoutMs = timeoutMs;
   }

-    const response = await fetch(url, {
-      method: "POST",
-      headers: { ... },
-      body: JSON.stringify({ ... }),
-    });
+    const controller = new AbortController();
+    const timer = setTimeout(() => controller.abort(), this.timeoutMs);
+    let response: Response;
+    try {
+      response = await fetch(url, {
+        method: "POST",
+        headers: { ... },
+        body: JSON.stringify({ ... }),
+        signal: controller.signal,
+      });
+    } finally {
+      clearTimeout(timer);
+    }

Also applies to: 93-93

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/providers/anthropic-compatible.ts` at line 48, Both fetch calls in the
anthropic-compatible provider (describeImage and call) can hang; add a timeout
using AbortController and apply it to both functions (or import and reuse the
existing fetchWithTimeout helper introduced for minimax.ts) so every fetch is
aborted after a configured timeout. Specifically, update describeImage and call
to create an AbortController, start a timer that calls controller.abort() after
the desired timeout, pass signal: controller.signal into the fetch options,
clear the timer on success/failure, and surface a clear timeout error; prefer
reusing the shared fetchWithTimeout helper if available to avoid duplication.

@beyond-infra beyond-infra force-pushed the feat/kimi-for-coding branch from 18c7c6b to f246283 Compare May 15, 2026 13:03
@beyond-infra
Copy link
Copy Markdown
Author

@coderabbitai Thanks for the review. Both issues have been addressed in the latest commit (f246283):

  1. JSDoc trimmed (kimi-for-coding.ts): Reduced to a single-line /** Kimi for Coding provider. */ — env var docs belong in README, not code comments.

  2. Shared helper extracted (anthropic-compatible.ts): describeImage and call are now unified under a single request(body) private method. The duplicated fetch/header/error/parse logic (~40 lines) is eliminated. Only one fetch call exists in the entire class.

Re: fetch timeout — This is intentionally deferred to #379 (fetchWithTimeout). Once that PR lands, we'll add timeout to the shared request() helper in a follow-up so all Anthropic-compatible providers (MiniMax, Kimi, and any future ones) benefit from a single change.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Tip

For best results, initiate chat on the files or code changes.

@beyond-infra Thanks for the thorough update!

Both changes look great based on the summary:

  1. JSDoc trimmed — Single-line /** Kimi for Coding provider. */ is clean and appropriate; env var documentation in the README is the right call.
  2. request() helper — Consolidating describeImage and the former call/fetch logic into one private request(body) method is a nice improvement. A single fetch path means auth headers, error handling, and response parsing are all maintained in one place for every Anthropic-compatible provider.

The fetch-timeout deferral to #379 makes good sense — once fetchWithTimeout lands and gets pulled into AnthropicCompatibleProvider.request(), all three providers (MiniMax, Kimi, and any future additions) automatically inherit it. Worth noting in the PR description or a comment on #379 so the connection isn't lost.

(◕‿◕✿) 🐇

Add support for Kimi for Coding (Moonshot AI Coding Plan) via their
Anthropic-compatible endpoint at https://api.kimi.com/coding.

Key points:
- Requires whitelisted User-Agent (KimiCLI/1.5) to avoid HTTP 429
  "engine overloaded" errors.
- Extracts shared AnthropicCompatibleProvider base class to eliminate
  ~60 lines of duplication with MinimaxProvider.
- Adds describeImage support that MinimaxProvider was missing.

Env vars:
  KIMI_API_KEY  (required)
  KIMI_BASE_URL (optional, default: https://api.kimi.com/coding)
  KIMI_MODEL    (optional, default: kimi-k2)

Tests:
  - test/kimi-for-coding-provider.test.ts — base URL resolution
  - test/kimi-for-coding-e2e.test.ts — request shape + error handling

Signed-off-by: beyond-infra <beyond.infra.github@gmail.com>
@beyond-infra beyond-infra force-pushed the feat/kimi-for-coding branch from f246283 to 5af5cd8 Compare May 15, 2026 13:30
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/config.ts`:
- Around line 90-96: The default model for the KIMI provider is incorrect: when
hasRealValue(env["KIMI_FOR_CODING_API_KEY"]) yields true, the code returns
model: env["KIMI_FOR_CODING_MODEL"] || "kimi-for-coding" which contradicts the
PR spec; change the fallback to "kimi-k2" so the returned object (provider:
"kimi-for-coding", model: env["KIMI_FOR_CODING_MODEL"] || "kimi-k2", maxTokens)
uses the documented default model identifier; update only that default string
where env["KIMI_FOR_CODING_MODEL"] is used.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ac10ab94-274a-46af-a51e-8c6c1e2aeffe

📥 Commits

Reviewing files that changed from the base of the PR and between f246283 and 5af5cd8.

📒 Files selected for processing (8)
  • src/config.ts
  • src/providers/anthropic-compatible.ts
  • src/providers/index.ts
  • src/providers/kimi-for-coding.ts
  • src/providers/minimax.ts
  • src/types.ts
  • test/kimi-for-coding-e2e.test.ts
  • test/kimi-for-coding-provider.test.ts
🚧 Files skipped from review as they are similar to previous changes (7)
  • src/types.ts
  • src/providers/kimi-for-coding.ts
  • src/providers/index.ts
  • test/kimi-for-coding-e2e.test.ts
  • src/providers/anthropic-compatible.ts
  • test/kimi-for-coding-provider.test.ts
  • src/providers/minimax.ts

Comment thread src/config.ts
Comment on lines +90 to +96
if (hasRealValue(env["KIMI_FOR_CODING_API_KEY"])) {
return {
provider: "kimi-for-coding",
model: env["KIMI_FOR_CODING_MODEL"] || "kimi-for-coding",
maxTokens,
};
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Incorrect default model name contradicts PR objectives.

Line 93 sets the default model to "kimi-for-coding", but the PR objectives explicitly state: "KIMI_FOR_CODING_MODEL — optional, default kimi-k2". This mismatch would cause API requests to fail if the wrong model identifier is used.

🐛 Proposed fix to align with documented default
   if (hasRealValue(env["KIMI_FOR_CODING_API_KEY"])) {
     return {
       provider: "kimi-for-coding",
-      model: env["KIMI_FOR_CODING_MODEL"] || "kimi-for-coding",
+      model: env["KIMI_FOR_CODING_MODEL"] || "kimi-k2",
       maxTokens,
     };
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (hasRealValue(env["KIMI_FOR_CODING_API_KEY"])) {
return {
provider: "kimi-for-coding",
model: env["KIMI_FOR_CODING_MODEL"] || "kimi-for-coding",
maxTokens,
};
}
if (hasRealValue(env["KIMI_FOR_CODING_API_KEY"])) {
return {
provider: "kimi-for-coding",
model: env["KIMI_FOR_CODING_MODEL"] || "kimi-k2",
maxTokens,
};
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/config.ts` around lines 90 - 96, The default model for the KIMI provider
is incorrect: when hasRealValue(env["KIMI_FOR_CODING_API_KEY"]) yields true, the
code returns model: env["KIMI_FOR_CODING_MODEL"] || "kimi-for-coding" which
contradicts the PR spec; change the fallback to "kimi-k2" so the returned object
(provider: "kimi-for-coding", model: env["KIMI_FOR_CODING_MODEL"] || "kimi-k2",
maxTokens) uses the documented default model identifier; update only that
default string where env["KIMI_FOR_CODING_MODEL"] is used.

@beyond-infra
Copy link
Copy Markdown
Author

@coderabbitai Thanks for the review. Re: default model — we intentionally use as the fallback, not . This matches the upstream pi-mono project's model registry (see ), where is the default model ID for the provider. and are alternative models in the same provider family. The PR description has been updated to reflect this.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Tip

For best results, initiate chat on the files or code changes.

@beyond-infra Thanks for the clarification! The rendering of the model names in your comment came through blank on my end (likely a formatting issue), but the intent is clear: the default model ID is intentional and aligns with the upstream pi-mono project's model registry. Good to know — that context is helpful for future reviews of this provider.

Noted and recorded below.

(◕‿◕✿) 🐇


✏️ Learnings added
Learnt from: beyond-infra
URL: https://github.com/rohitg00/agentmemory/pull/394

Timestamp: 2026-05-15T13:37:19.244Z
Learning: In `src/providers/kimi-for-coding.ts` and `src/config.ts` (TypeScript, agentmemory repo), the default model for `KimiForCodingProvider` (`KIMI_FOR_CODING_MODEL` env var, defaulting to `"kimi-k2"`) is intentional. It matches the upstream pi-mono project's model registry where `kimi-k2` is the designated default model ID for the `kimi-for-coding` provider. Other model IDs (e.g., `kimi-k1.5`, `moonshot-v1`) are alternative models in the same provider family, not the default.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

- graph-extraction.ts: enforce attribute-based XML format for LLMs
  that default to nested tags (e.g. kimi-for-coding). Add CRITICAL
  instruction and explicit ban on <id>, <name>, <type> child tags.

- local.ts: prefer local models, disable remote fetches to support
  air-gapped or proxy-restricted environments.

- viewer/index.html: include KIMI_FOR_CODING_API_KEY in provider
  key hints and update embedding provider guidance.
Add ARCHITECTURE.md with ASCII diagrams covering:
- Overall system architecture (3-tier: Claude Code / Worker / iii-engine)
- Data flow: write path (Hook → Compress → Index → Store)
             read path (MCP → Hybrid Search → Enrich → Return)
- Index building: BM25 + Vector (384-dim) + Graph extraction
- Triple-stream search: BM25 + Vector + Graph with RRF fusion
- Claude Code integration points (SessionStart/ToolUse/PostToolUse/PreToolUse/SessionEnd)
- Component interaction diagram
…ed visual hierarchy

- Replace brutalist hard borders with soft shadows and rounded corners
- Add CSS variables for shadows (--shadow-sm/md/lg/xl) and border radius
- Modernize color palette with softer tones and better contrast
- Improve header with glassmorphism backdrop-filter effect
- Redesign stat cards with hover animations and accent top border
- Update badges with pill shapes, subtle backgrounds, and hover effects
- Enhance tables with rounded headers, hover states, and better spacing
- Add hover effects to cards, timeline items, and activity feed items
- Improve graph controls with grouped container and better tooltips
- Modernize modal with backdrop blur and larger border radius
- Update dark mode with deeper backgrounds and refined shadows
- Add smooth transitions throughout for better interactivity
@beyond-infra
Copy link
Copy Markdown
Author

UI Improvements

Updated the viewer UI with a modernized visual design:

Changes

  • Softened color palette: Replaced harsh borders with subtle shadows and softer tones
  • Rounded corners: Added consistent border-radius variables
  • Shadow system: Introduced layered shadow variables for depth
  • Glassmorphism header: Added backdrop-filter blur to app header
  • Card improvements: Hover animations, accent top borders, subtle lift effects
  • Badge redesign: Pill-shaped badges with colored backgrounds
  • Table enhancements: Rounded header corners, row hover states
  • Graph controls: Grouped container with backdrop blur
  • Timeline polish: Larger dots with hover glow effects
  • Dark mode refinements: Deeper backgrounds, better contrast
  • Smooth transitions: Added easing animations throughout

All existing functionality is preserved. Purely visual/CSS improvements.

@beyond-infra
Copy link
Copy Markdown
Author

Closing this PR. Will reopen with a cleaner approach.

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