@veluai/velu 0.2.19 → 0.2.20

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.
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
- {
2
- "name": "@veluai/velu",
3
- "version": "0.2.19",
4
- "type": "module",
5
- "bin": "./dist/cli.js",
6
- "publishConfig": {
7
- "access": "public"
8
- },
9
- "files": [
10
- "dist/**",
11
- "src/runtime/**",
12
- "src/navigation.js",
13
- "src/template.html",
14
- "src/lib/issues.js",
15
- "src/lib/extract-mdx-error.js",
16
- "src/lib/known-components.js",
17
- "runtime/velu-ui/**",
18
- "schema/**",
19
- "templates/**"
20
- ],
21
- "scripts": {
22
- "build": "node scripts/build.mjs",
23
- "prepack": "node scripts/build.mjs",
24
- "build:preview-runtime": "vite build -c vite.preview.config.mjs",
25
- "test:parity": "node scripts/parity-test.mjs"
26
- },
27
- "dependencies": {
28
- "@apidevtools/swagger-parser": "^10.1.0",
29
- "@icons-pack/react-simple-icons": ">=13.0.0 <13.13.0",
30
- "@mdx-js/mdx": "^3.1.1",
31
- "@mdx-js/react": "^3.1.1",
32
- "@mdx-js/rollup": "^3.1.1",
33
- "@tailwindcss/vite": "^4.1.0",
34
- "@vitejs/plugin-react": "^4.3.4",
35
- "chokidar": "^3.6.0",
36
- "estree-util-value-to-estree": "^3.5.0",
37
- "express": "^4.21.1",
38
- "github-slugger": "^2.0.0",
39
- "iso-639-1": "^3.1.5",
40
- "js-yaml": "^4.1.0",
41
- "lucide-react": "^0.460.0",
42
- "mdast-util-to-string": "^4.0.0",
43
- "prism-react-renderer": "^2.4.0",
44
- "prismjs": "^1.29.0",
45
- "react": "^18.3.1",
46
- "react-dom": "^18.3.1",
47
- "react-router-dom": "^6.28.0",
48
- "rehype-slug": "^6.0.0",
49
- "remark-frontmatter": "^5.0.0",
50
- "remark-gfm": "^4.0.1",
51
- "remark-mdx-frontmatter": "^5.2.0",
52
- "tailwindcss": "^4.1.0",
53
- "unist-util-visit": "^5.1.0",
54
- "vite": "^5.4.11"
55
- },
56
- "devDependencies": {
57
- "@fontsource/outfit": "^5.0.0",
58
- "@resvg/resvg-js": "^2.6.2",
59
- "esbuild": "^0.28.0",
60
- "pagefind": "^1.3.0",
61
- "playwright": "^1.48.0",
62
- "satori": "^0.12.0"
63
- }
64
- }
1
+ {
2
+ "name": "@veluai/velu",
3
+ "version": "0.2.20",
4
+ "type": "module",
5
+ "bin": "./dist/cli.js",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "files": [
10
+ "dist/**",
11
+ "src/runtime/**",
12
+ "src/navigation.js",
13
+ "src/template.html",
14
+ "src/lib/issues.js",
15
+ "src/lib/extract-mdx-error.js",
16
+ "src/lib/known-components.js",
17
+ "runtime/velu-ui/**",
18
+ "schema/**",
19
+ "templates/**"
20
+ ],
21
+ "scripts": {
22
+ "build": "node scripts/build.mjs",
23
+ "prepack": "node scripts/build.mjs",
24
+ "build:preview-runtime": "vite build -c vite.preview.config.mjs",
25
+ "test:parity": "node scripts/parity-test.mjs"
26
+ },
27
+ "dependencies": {
28
+ "@apidevtools/swagger-parser": "^10.1.0",
29
+ "@icons-pack/react-simple-icons": ">=13.0.0 <13.13.0",
30
+ "@mdx-js/mdx": "^3.1.1",
31
+ "@mdx-js/react": "^3.1.1",
32
+ "@mdx-js/rollup": "^3.1.1",
33
+ "@tailwindcss/vite": "^4.1.0",
34
+ "@vitejs/plugin-react": "^4.3.4",
35
+ "chokidar": "^3.6.0",
36
+ "estree-util-value-to-estree": "^3.5.0",
37
+ "express": "^4.21.1",
38
+ "github-slugger": "^2.0.0",
39
+ "iso-639-1": "^3.1.5",
40
+ "js-yaml": "^4.1.0",
41
+ "lucide-react": "^0.460.0",
42
+ "mdast-util-to-string": "^4.0.0",
43
+ "prism-react-renderer": "^2.4.0",
44
+ "prismjs": "^1.29.0",
45
+ "react": "^18.3.1",
46
+ "react-dom": "^18.3.1",
47
+ "react-router-dom": "^6.28.0",
48
+ "rehype-slug": "^6.0.0",
49
+ "remark-frontmatter": "^5.0.0",
50
+ "remark-gfm": "^4.0.1",
51
+ "remark-mdx-frontmatter": "^5.2.0",
52
+ "tailwindcss": "^4.1.0",
53
+ "unist-util-visit": "^5.1.0",
54
+ "vite": "^5.4.11"
55
+ },
56
+ "devDependencies": {
57
+ "@fontsource/outfit": "^5.0.0",
58
+ "@resvg/resvg-js": "^2.6.2",
59
+ "esbuild": "^0.28.0",
60
+ "pagefind": "^1.3.0",
61
+ "playwright": "^1.48.0",
62
+ "satori": "^0.12.0"
63
+ }
64
+ }
@@ -61,11 +61,11 @@ const REGISTRY = {
61
61
  aistudio: { icon: Sparkles, label: 'Open in AI Studio', desc: 'Ask questions about this page', kind: 'ai', external: true, url: (q) => `https://aistudio.google.com/app/prompts/new_chat?prompt=${q}` },
62
62
  devin: { icon: Bot, label: 'Open in Devin', desc: 'Ask questions about this page', kind: 'ai', external: true, url: (q) => `https://app.devin.ai/?prompt=${q}` },
63
63
  windsurf: { icon: Wind, label: 'Open in Windsurf', desc: 'Ask questions about this page', kind: 'ai', external: true, url: (q) => `https://windsurf.com/?q=${q}` },
64
- mcp: { icon: Terminal, label: 'Copy MCP install command', desc: 'Copy npx command to install MCP server', kind: 'mcp' },
64
+ mcp: { icon: Terminal, label: 'Copy MCP install command', desc: 'Copy command to install the MCP server', kind: 'mcp' },
65
65
  'add-mcp': { icon: Terminal, label: 'Add MCP server', desc: 'Copy command to add the MCP server', kind: 'mcp' },
66
66
  cursor: { icon: CursorIcon, label: 'Connect to Cursor', desc: 'Install MCP Server on Cursor', kind: 'cursor', external: true },
67
67
  vscode: { icon: VscodeIcon, label: 'Connect to VS Code', desc: 'Install MCP Server on VS Code', kind: 'vscode', external: true },
68
- 'devin-mcp': { icon: Terminal, label: 'Connect to Devin', desc: 'Install MCP Server on Devin', kind: 'cursor', external: true },
68
+ 'devin-mcp': { icon: Terminal, label: 'Connect to Devin', desc: 'Copy command to add the MCP server on Devin', kind: 'devin' },
69
69
  };
70
70
 
71
71
  export default function ContextMenu({
@@ -166,6 +166,9 @@ export default function ContextMenu({
166
166
  setOpen(false);
167
167
  const origin = window.location.origin;
168
168
  const absMd = origin + mdUrl;
169
+ const mcpUrl = `${origin}/mcp`;
170
+ // CLI-safe server name (siteName may contain spaces).
171
+ const serverName = (siteName || 'docs').trim().replace(/\s+/g, '-').toLowerCase() || 'docs';
169
172
  switch (it.kind) {
170
173
  case 'copy':
171
174
  return copyPage();
@@ -192,12 +195,12 @@ export default function ContextMenu({
192
195
  return void window.open(it.url(q), '_blank', 'noopener');
193
196
  }
194
197
  case 'mcp':
195
- // Stubbed: the Velu MCP server isn't hosted yet this is the intended
196
- // command, wired to <origin>/mcp once it exists.
197
- return copyText(`npx -y @veluai/mcp@latest ${origin}/mcp`);
198
+ // Hosted HTTP MCP server lives at <origin>/mcp. Copy a client-neutral
199
+ // command: `mcp-remote` bridges the HTTP server to stdio, so it works
200
+ // in any MCP client config (Claude, Cursor, VS Code, Windsurf, …).
201
+ return copyText(`npx mcp-remote ${mcpUrl}`);
198
202
  case 'cursor': {
199
- const cfg =
200
- typeof btoa === 'function' ? btoa(JSON.stringify({ url: `${origin}/mcp` })) : '';
203
+ const cfg = typeof btoa === 'function' ? btoa(JSON.stringify({ url: mcpUrl })) : '';
201
204
  return void window.open(
202
205
  `cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(siteName)}&config=${cfg}`,
203
206
  '_blank',
@@ -205,13 +208,16 @@ export default function ContextMenu({
205
208
  );
206
209
  }
207
210
  case 'vscode': {
208
- const cfg = encodeURIComponent(JSON.stringify({ name: siteName, url: `${origin}/mcp` }));
209
- return void window.open(
210
- `https://insiders.vscode.dev/redirect/mcp/install?${cfg}`,
211
- '_blank',
212
- 'noopener',
211
+ // Official VS Code install URI: `vscode:mcp/install?<urlencoded JSON>`,
212
+ // with the transport `type` inside the payload.
213
+ const cfg = encodeURIComponent(
214
+ JSON.stringify({ name: siteName, type: 'http', url: mcpUrl }),
213
215
  );
216
+ return void window.open(`vscode:mcp/install?${cfg}`, '_blank', 'noopener');
214
217
  }
218
+ case 'devin':
219
+ // Devin has no install deep-link — copy its CLI add command instead.
220
+ return copyText(`devin mcp add ${serverName} ${mcpUrl}`);
215
221
  case 'custom':
216
222
  return void window.open(it.href, '_blank', 'noopener');
217
223
  default:
@@ -510,7 +510,10 @@
510
510
  opacity: 0;
511
511
  transition: opacity 0.12s ease;
512
512
  }
513
- .velu-chatbot__msg--ai:hover .velu-chatbot__msg-actions {
513
+ .velu-chatbot__msg--ai:hover .velu-chatbot__msg-actions,
514
+ /* Keep the row visible once a vote is cast, so the selection stays
515
+ confirmed after the pointer leaves the message. */
516
+ .velu-chatbot__msg-actions:has(.is-active) {
514
517
  opacity: 1;
515
518
  }
516
519
  .velu-chatbot__msg-action {
@@ -530,6 +533,11 @@
530
533
  background: var(--surface-color);
531
534
  color: var(--text-color);
532
535
  }
536
+ /* Chosen thumb (up/down) — accent tint so the click is clearly registered. */
537
+ .velu-chatbot__msg-action.is-active {
538
+ background: color-mix(in srgb, var(--accent-color) 12%, transparent);
539
+ color: var(--accent-color);
540
+ }
533
541
 
534
542
  /* ── Composer ───────────────────────────────────────────────────────── */
535
543
  .velu-chatbot__composer {