Skip to content

Docs update mcp models - #331

Closed
thesteganos wants to merge 2 commits into
anomalyco:devfrom
thesteganos:docs-update-mcp-models
Closed

thesteganos wants to merge 2 commits into
anomalyco:devfrom
thesteganos:docs-update-mcp-models

Conversation

@thesteganos

Copy link
Copy Markdown

docs: improve documentation for models and MCP servers

Updated README.md to better direct users to the detailed documentation.

Enhanced models.mdx with instructions and examples for configuring Google Gemini 2.5-flash.

Improved mcp-servers.mdx by clarifying the placement of opencode.json and ensuring comprehensive examples for local and remote

  • Added a comprehensive opencode.json example to mcp-servers.mdx, showcasing configuration for both local and remote MCP servers.
  • Added a new section to mcp-servers.mdx detailing how to configure MetaMCP, including a specific opencode.json example and explanation of necessary environment variables. MetaMCP can suggest other MPC servers to actual application.
  • Restructured mcp-servers.mdx slightly for better flow and clarity between generic examples and the specific MetaMCP example.

Updated README.md to better direct users to the detailed documentation.

Enhanced models.mdx with instructions and examples for configuring Google Gemini 2.5-flash.

Improved mcp-servers.mdx by clarifying the placement of opencode.json and ensuring comprehensive examples for local and remote MCP server configurations.
- Added a comprehensive opencode.json example to mcp-servers.mdx, showcasing configuration for both local and remote MCP servers.
- Added a new section to mcp-servers.mdx detailing how to configure MetaMCP, including a specific opencode.json example and explanation of necessary environment variables.
- Restructured mcp-servers.mdx slightly for better flow and clarity between generic examples and the specific MetaMCP example.
@thdxr thdxr self-assigned this Jul 2, 2025
@github-actions
github-actions Bot force-pushed the dev branch 3 times, most recently from f1dc981 to 3e15a39 Compare November 22, 2025 18:07
@github-actions
github-actions Bot force-pushed the dev branch 3 times, most recently from f8ee907 to 6a9856d Compare November 27, 2025 01:29
@thesteganos thesteganos closed this by deleting the head repository Jan 18, 2026
bussard76 pushed a commit to bussard76/openwork that referenced this pull request May 12, 2026
…te-settings

Split remote settings into OpenWork and OpenCode sections
terrxo added a commit to grunt-it/gruntcode that referenced this pull request Jun 1, 2026
…mouse overlay (anomalyco#331)

PR #24 fixed #N rendering by rewriting refs to markdown links fed through
<markdown>, but that killed the hover-card preview: OpenTUI inline link
chunks are TextNodes that can't hold mouse listeners (only block-level
Box/Text are on the mouse hit-grid).

Restore hover (Model A) without touching PR #24's rendering: wrap the
existing TextPart <box> with onMouseMove/onMouseOut, translate absolute
mouse coords -> local row/col via the box's screenX/Y + width, then map to
the nearest ticket ref using a source-text scan. Drives the existing
(intact-but-untriggered) TicketHoverCard context. No change to wrap layout,
so the anomalyco#250 fix is preserved.

New: ticket-ref-scan.ts (scanTicketRefs + resolveRefAt + nearestRefId).
terrxo added a commit to grunt-it/gruntcode that referenced this pull request Jun 1, 2026
…overlay (anomalyco#331)

Nik reported two bugs on the prior approach: (1) the markdown rewrite
[#N](url) leaked the literal URL into the visible text, (2) hover was 'all
over the place'.

Root cause confirmed by build-test (test harness, no tree-sitter — same as
the real app's <markdown>): a [#N](url) link renders its URL literally; NO
markup form (link/bold/code) conceals it. Only PLAIN #N is leak-free. The
hover drift came from estimating wrap geometry against the rewritten content,
whose [#N](url) strings were far longer than the visible text.

Fix (Option 1 — keep PR #24's wrap-correct <markdown> flow, drop the rewrite):
- Render source text directly as plain #N. No URL leak, wrap unchanged.
- Line-based hover resolver: cursor row -> source line -> ref on that line
  (single = exact; multi = nearest by column). Now accurate because the
  scanned/estimated text IS the visible text.
- Click-to-open via overlay onMouseUp (replaces the lost OSC-8 click).
- HIVEMIND_UI_BASE default -> https://hivemind.grunt.si.

Tests: 13 resolver unit tests + full TUI suite (146 pass) green; typecheck clean.
terrxo added a commit to grunt-it/gruntcode that referenced this pull request Jun 1, 2026
…cursor leaves ref (anomalyco#331)

Reported: hover card never closed (snapped to nearest ref) and moving far
just switched to a neighbor ticket, even ~30cm from the actual #N.

Cause: resolveRefAt unconditionally returned the nearest ref (incl. a global
fallback for ref-free lines), so onMouseMove never got null → never closed.

Fix (Option b — strict tolerance everywhere):
- Vertical: ref-free line → null (no cross-line snapping). Wrapped ref lines
  stay hoverable across their visual rows.
- Horizontal: gate the cursor's VISIBLE column against each on-line ref's
  visible span ±HOVER_COL_TOLERANCE (2). Beyond tolerance → null → card closes.
- Accurate columns: subtract the concealed leading-marker length (- , ## , > )
  so a ref's visible column on list items/headings matches the rendered text.

17 resolver unit tests (incl. far-on-line→null, ref-free→null, between-refs→
null, list-prefix shift, wrapped 2nd row) + TUI suite (150 pass) + typecheck green.
terrxo added a commit to grunt-it/gruntcode that referenced this pull request Jun 1, 2026
…ate native hover+click (anomalyco#331)

The estimate-based mouse overlay (cursor→char column math) was fundamentally
fragile: hover drifted and the proximity gate made it close/misfire. OpenTUI
exposes no public coord→char API, so any JS-side estimate drifts.

Switch to the accurate path: render each #N as an inline <a href> LinkRenderable.
Build-verified: renders a clean 'anomalyco#331' label with the URL carried as OSC-8
hyperlink metadata (NO url leak, unlike markdown [#N](url)). The terminal owns
the link geometry, so hover-highlight + ⌘-click are pixel-accurate with zero
estimation.

To honor OpenTUI's inline-flow-vs-markdown tradeoff with minimal loss, split the
message into paragraph blocks: ref-free paragraphs (and all headings/lists/code)
keep full <markdown>; only a paragraph that mentions a #N renders as inline
<text> of <span> prose + <TicketRef> (<a>) refs (correct char-wrap per anomalyco#250).
Fenced code is never split or linkified.

- ticket-ref.tsx: clean inline <a href> (theme link color, OSC-8 url).
- ticket-ref-scan.ts: splitTextIntoBlocks (paragraph + fence-aware) + splitOnTicketRefs.
- TextPart: per-block markdown-or-inline rendering; removed the overlay + scan resolver.
- Dead-but-inert: TicketHoverCard/hivemind hover context no longer triggered.

12 scan unit tests + TUI suite (145 pass) + typecheck green.
terrxo added a commit to grunt-it/gruntcode that referenced this pull request Jun 1, 2026
…gle <markdown> (no flicker) (anomalyco#331)

Definitive fix after exhausting the alternatives (all build-tested):
- single <markdown> is the ONLY flicker-free renderer; per-block split flickered
  on stream + lost formatting.
- markdown [#N](url) links always leak the URL in this app (no tree-sitter);
  inline <a> can't live inside <markdown>.
- JS-side column estimation drifted (hover 'all over the place').

So: keep ONE <markdown> rendering plain  (clean, full formatting, wrap-correct,
flicker-free), and resolve hover/click by reading the renderer's actual FRAMEBUFFER —
renderer.currentRenderBuffer.buffers.char is a public Uint32Array indexed y*width+x.
ticketIdAtCell() inspects the characters painted under the cursor and returns the
#N id (with the same boundary rules as the text regex: rejects foo#12, ##12, #fff).
Pixel-accurate (uses rendered cells, not a reconstruction), null off-ref so the
hover card closes. Drives the existing TicketHoverCard; onMouseUp opens hivemind-ui.

10 framebuffer hit-test unit tests + TUI suite (143 pass) + typecheck green.
terrxo added a commit to grunt-it/gruntcode that referenced this pull request Jun 1, 2026
terrxo added a commit to grunt-it/gruntcode that referenced this pull request Jun 1, 2026
…-process (anomalyco#331)

Refs render as plain #N inside <markdown> (a markdown link leaks its URL), so
they were base text color. Recolor the painted #N cells in a renderer
post-process (renderer.addPostProcessFn): single buffer scan re-drawing matched
#N runs in theme.markdownLink + underline. Same boundary rules as the hit-test
(skips foo#12 / ##12 / #fff). Theme proxy is read each frame so it tracks theme
switches.

4 recolor unit tests (+ existing 10 hit-test) + TUI suite (147 pass) + typecheck green.
terrxo added a commit to grunt-it/gruntcode that referenced this pull request Jun 1, 2026
….md (anomalyco#331)

Add a 'TUI enhancements' section covering the clickable/hoverable/colored #N
ticket refs, the framebuffer-hit-test + post-process-recolor implementation, and
why refs aren't markdown links (URL leak / inline-<a>-in-markdown limitation).
Refresh the 'two buckets' framing + rebase-chain example to include the TUI patch
and the loop-primitive patch.
terrxo added a commit to grunt-it/gruntcode that referenced this pull request Jun 1, 2026
terrxo added a commit to grunt-it/gruntcode that referenced this pull request Jun 1, 2026
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.

2 participants