@rawwee/interactive-mcp 1.4.1 → 1.4.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.
@@ -132,9 +132,6 @@ const App = ({ options: appOptions, onExit }) => {
132
132
  onExit();
133
133
  });
134
134
  }, [onExit, outputFile]);
135
- useEffect(() => {
136
- console.clear();
137
- }, []);
138
135
  useEffect(() => {
139
136
  setFollowInput(false);
140
137
  scrollRef.current?.scrollTo?.({ x: 0, y: 0 });
@@ -208,6 +205,9 @@ async function startUi() {
208
205
  process.exit(1);
209
206
  return;
210
207
  }
208
+ // Clear before the renderer takes over so @opentui starts with a clean slate
209
+ // and its diff engine is in sync with what's on screen.
210
+ console.clear();
211
211
  const renderer = await createCliRenderer({
212
212
  exitOnCtrlC: false,
213
213
  });
@@ -104,9 +104,6 @@ const App = ({ sessionId, title, outputDir, searchRoot, timeoutSeconds, onCloseS
104
104
  setFollowInput(true);
105
105
  scrollRef.current?.scrollTo?.({ x: 0, y: Number.MAX_SAFE_INTEGER });
106
106
  }, []);
107
- useEffect(() => {
108
- console.clear();
109
- }, []);
110
107
  useEffect(() => {
111
108
  let mounted = true;
112
109
  void resolveSearchRoot(searchRoot, { argvEntry: process.argv[1] }).then((resolvedSearchRoot) => {
@@ -234,7 +231,6 @@ const App = ({ sessionId, title, outputDir, searchRoot, timeoutSeconds, onCloseS
234
231
  };
235
232
  }, [timeLeft, currentQuestionId]);
236
233
  const addNewQuestion = async (questionId, questionText, incomingOptions, incomingSearchRoot) => {
237
- console.clear();
238
234
  if (timerRef.current) {
239
235
  clearInterval(timerRef.current);
240
236
  timerRef.current = null;
@@ -289,6 +285,9 @@ const App = ({ sessionId, title, outputDir, searchRoot, timeoutSeconds, onCloseS
289
285
  ?.text || '', questionId: currentQuestionId, predefinedOptions: currentPredefinedOptions, searchRoot: currentSearchRoot, onSubmit: handleSubmit, onInputActivity: keepInputVisible }) }))] }) }), currentQuestionId && timeLeft !== null && (_jsx("box", { paddingLeft: 1, paddingRight: 1, paddingTop: 1, children: _jsx(PromptStatus, { value: percentage, timeLeftSeconds: timeLeft, critical: timeLeft <= 10 }) }))] }));
290
286
  };
291
287
  async function startUi() {
288
+ // Clear before the renderer takes over so @opentui starts with a clean slate
289
+ // and its diff engine is in sync with what's on screen.
290
+ console.clear();
292
291
  const renderer = await createCliRenderer({
293
292
  exitOnCtrlC: false,
294
293
  });
@@ -241,10 +241,7 @@ export function MarkdownText({ content, streaming = false, showContentCopyContro
241
241
  }
242
242
  };
243
243
  }, []);
244
- if (!content) {
245
- return null;
246
- }
247
- const copyWithHint = async (value, successMessage) => {
244
+ const copyWithHint = useCallback(async (value, successMessage) => {
248
245
  if (!value) {
249
246
  setClipboardHint('Nothing to copy.');
250
247
  return;
@@ -256,7 +253,7 @@ export function MarkdownText({ content, streaming = false, showContentCopyContro
256
253
  catch (error) {
257
254
  setClipboardHint(`Copy failed: ${error instanceof Error ? error.message : String(error)}`);
258
255
  }
259
- };
256
+ }, []);
260
257
  const openLinkWithHint = useCallback(async (href, target) => {
261
258
  try {
262
259
  await openExternalLink(href, target);
@@ -266,6 +263,9 @@ export function MarkdownText({ content, streaming = false, showContentCopyContro
266
263
  setClipboardHint(`Open link failed: ${error instanceof Error ? error.message : String(error)}`);
267
264
  }
268
265
  }, []);
266
+ if (!content) {
267
+ return null;
268
+ }
269
269
  return (_jsxs("box", { flexDirection: "column", width: "100%", gap: 1, children: [showContentCopyControl && (_jsx("box", { width: "100%", justifyContent: "flex-end", children: _jsxs("text", { fg: "cyan", onMouseUp: () => {
270
270
  void copyWithHint(content, 'Prompt copied to clipboard.');
271
271
  }, children: ["[", contentCopyLabel, "]"] }) })), segments.map((segment, index) => {
package/dist/index.js CHANGED
@@ -78,6 +78,7 @@ const isToolEnabled = (toolName) => {
78
78
  const server = new McpServer({
79
79
  name: 'Interactive MCP',
80
80
  version: '1.0.0',
81
+ }, {
81
82
  capabilities: {
82
83
  tools: enabledToolCapabilities, // Use the filtered capabilities
83
84
  },
@@ -1,7 +1,7 @@
1
1
  import { pino, } from 'pino';
2
- import path from 'path';
3
- import fs from 'fs';
4
- import os from 'os';
2
+ import path from 'node:path';
3
+ import fs from 'node:fs';
4
+ import os from 'node:os';
5
5
  const logDir = path.resolve(os.tmpdir(), 'interactive-mcp-logs');
6
6
  const logFile = path.join(logDir, 'dev.log');
7
7
  // Ensure log directory exists
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rawwee/interactive-mcp",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,42 +31,42 @@
31
31
  "license": "MIT",
32
32
  "description": "",
33
33
  "devDependencies": {
34
- "@eslint/js": "^9.25.1",
34
+ "@eslint/js": "^10.0.1",
35
35
  "@semantic-release/commit-analyzer": "^13.0.1",
36
36
  "@semantic-release/git": "^10.0.1",
37
- "@semantic-release/github": "^11.0.2",
37
+ "@semantic-release/github": "^12.0.6",
38
38
  "@semantic-release/npm": "^13.1.5",
39
- "@semantic-release/release-notes-generator": "^14.0.3",
39
+ "@semantic-release/release-notes-generator": "^14.1.0",
40
40
  "@types/bun": "^1.3.10",
41
- "@types/node": "^22.15.2",
41
+ "@types/node": "^25.3.5",
42
42
  "@types/node-notifier": "^8.0.5",
43
43
  "@types/pino": "^7.0.5",
44
- "@types/react": "^19.1.2",
45
- "conventional-changelog-conventionalcommits": "^8.0.0",
46
- "eslint": "^9.25.1",
47
- "eslint-config-prettier": "^10.1.2",
48
- "eslint-plugin-prettier": "^5.2.6",
49
- "globals": "^16.0.0",
44
+ "@types/react": "^19.2.14",
45
+ "conventional-changelog-conventionalcommits": "^9.3.0",
46
+ "eslint": "^10.0.3",
47
+ "eslint-config-prettier": "^10.1.8",
48
+ "eslint-plugin-prettier": "^5.5.5",
49
+ "globals": "^17.4.0",
50
50
  "husky": "^9.1.7",
51
- "jiti": "^2.4.2",
52
- "lint-staged": "^15.5.1",
53
- "pino-pretty": "^13.0.0",
54
- "prettier": "^3.5.3",
55
- "semantic-release": "^24.2.3",
56
- "tsc-alias": "^1.8.15",
57
- "typescript": "^5.8.3",
58
- "typescript-eslint": "^8.31.0"
51
+ "jiti": "^2.6.1",
52
+ "lint-staged": "^16.3.2",
53
+ "pino-pretty": "^13.1.3",
54
+ "prettier": "^3.8.1",
55
+ "semantic-release": "^25.0.3",
56
+ "tsc-alias": "^1.8.16",
57
+ "typescript": "^5.9.3",
58
+ "typescript-eslint": "^8.56.1"
59
59
  },
60
60
  "dependencies": {
61
- "@modelcontextprotocol/sdk": "^1.10.2",
62
- "@opentui/core": "^0.1.86",
63
- "@opentui/react": "^0.1.86",
64
- "@types/yargs": "^17.0.33",
61
+ "@modelcontextprotocol/sdk": "^1.27.1",
62
+ "@opentui/core": "0.1.87",
63
+ "@opentui/react": "0.1.87",
64
+ "@types/yargs": "^17.0.35",
65
65
  "node-notifier": "^10.0.1",
66
- "pino": "^9.6.0",
67
- "react": "^19.2.0",
68
- "yargs": "^17.7.2",
69
- "zod": "^3.24.3"
66
+ "pino": "^10.3.1",
67
+ "react": "^19.2.4",
68
+ "yargs": "^18.0.0",
69
+ "zod": "^4.3.6"
70
70
  },
71
71
  "lint-staged": {
72
72
  "*.{js,ts,jsx,tsx}": [