@uniqbit/mate-core 1.0.0-canary.2 → 1.0.0-canary.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mate-companion-mentions",
3
- "version": "1.0.0-canary.2",
3
+ "version": "1.0.0-canary.3",
4
4
  "description": "@mate:<path> mentions: find and attach files from the mate companion repo in the @ menu.",
5
5
  "author": {
6
6
  "name": "Kevin Tornquist"
@@ -1,3 +1,3 @@
1
1
  /** @jsxRuntime automatic */
2
2
  /** @jsxImportSource @opentui/solid */
3
- export { default } from "../../src/opencode/tui";
3
+ export { default } from "../../src/opencode/tui.tsx";
@@ -1,4 +1,5 @@
1
1
  /** @jsxRuntime automatic */
2
2
  /** @jsxImportSource @opentui/solid */
3
3
  /** Root entry for a plugin bound by directory path; see `server.ts`. */
4
- export { default } from "./src/tui";
4
+ // Explicit extensions let OpenTUI prescan the re-export chain in node_modules.
5
+ export { default } from "./src/tui.tsx";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniqbit/mate-core",
3
- "version": "1.0.0-canary.2",
3
+ "version": "1.0.0-canary.3",
4
4
  "description": "Core framework and plugin APIs for Mate.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,13 +1,7 @@
1
1
  /** @jsxRuntime automatic */
2
2
  /** @jsxImportSource @opentui/solid */
3
- /* oxlint-disable react/no-unknown-property, react/react-in-jsx-scope, react/jsx-key, react-doctor/jsx-key */
4
- /**
5
- * OpenCode V2 TUI plugin module (`{ id, setup }`), OpenCode 2.x only.
6
- * Solid JSX, not React: `key` is not a reconciliation prop here and `TextProps`
7
- * does not accept it, so the jsx-key rules cannot be satisfied — only suppressed.
8
- * The line list is a function child: Solid re-runs its `.map` whole on a store change, fine for a few lines.
9
- */
10
- import type { JSX } from "@opentui/solid";
3
+ // OpenCode scans source imports to bind host modules; implicit JSX imports are missed in node_modules.
4
+ import { jsx } from "@opentui/solid/jsx-runtime";
11
5
 
12
6
  import { BRAND_ACCENT } from "../brand/palette";
13
7
  import { mateVersion } from "../runtime/install";
@@ -68,25 +62,21 @@ function SessionContext({
68
62
  const text = api.theme.text;
69
63
  const warning = text.feedback?.warning?.base ?? text.muted;
70
64
 
71
- return (
72
- <box
73
- width="100%"
74
- maxWidth={sidebar ? undefined : 75}
75
- paddingLeft={sidebar ? 0 : 2}
76
- paddingRight={sidebar ? 0 : 2}
77
- paddingBottom={sidebar ? 1 : 0}
78
- flexShrink={0}
79
- >
80
- <text fg={MATE_VERSION_COLOR}>mate v{MATE_VERSION}</text>
81
- <text fg={text.muted}>repo: {context.repositoryPath}</text>
82
- <text fg={text.muted}>mate: {context.companionPath}</text>
83
- {/* OpenTUI's Solid transform skips node_modules, so only a function child stays reactive; its children types omit functions. */}
84
- {
85
- (() =>
86
- notes.lines.map((note) => <text fg={warning}>{note}</text>)) as unknown as JSX.Element
87
- }
88
- </box>
89
- );
65
+ return jsx("box", {
66
+ width: "100%",
67
+ maxWidth: sidebar ? undefined : 75,
68
+ paddingLeft: sidebar ? 0 : 2,
69
+ paddingRight: sidebar ? 0 : 2,
70
+ paddingBottom: sidebar ? 1 : 0,
71
+ flexShrink: 0,
72
+ children: [
73
+ jsx("text", { fg: MATE_VERSION_COLOR, children: `mate v${MATE_VERSION}` }),
74
+ jsx("text", { fg: text.muted, children: `repo: ${context.repositoryPath}` }),
75
+ jsx("text", { fg: text.muted, children: `mate: ${context.companionPath}` }),
76
+ // A function child keeps late staleness updates reactive without the Solid transform.
77
+ () => notes.lines.map((note) => jsx("text", { fg: warning, children: note })),
78
+ ],
79
+ });
90
80
  }
91
81
 
92
82
  /** Polls the session lines; a line that appears after startup is also raised as a toast. */
@@ -116,11 +106,11 @@ function setup(api: MateTuiApi): (() => void) | undefined {
116
106
 
117
107
  api.ui.slot({
118
108
  prepend: "home.footer",
119
- render: () => <SessionContext api={api} notes={notes} />,
109
+ render: () => SessionContext({ api, notes }),
120
110
  });
121
111
  api.ui.slot({
122
112
  append: "sidebar.content",
123
- render: () => <SessionContext api={api} notes={notes} sidebar />,
113
+ render: () => SessionContext({ api, notes, sidebar: true }),
124
114
  });
125
115
  return () => clearInterval(timer);
126
116
  }