@renxqoo/renx-code 0.0.1 → 0.0.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.
Files changed (75) hide show
  1. package/README.md +12 -11
  2. package/dist/App.js +13 -13
  3. package/dist/agent/runtime/event-format.d.ts +1 -1
  4. package/dist/agent/runtime/runtime.d.ts +4 -4
  5. package/dist/agent/runtime/runtime.js +6 -6
  6. package/dist/agent/runtime/source-modules.d.ts +1 -1
  7. package/dist/agent/runtime/tool-call-buffer.d.ts +1 -1
  8. package/dist/agent/runtime/tool-confirmation.d.ts +1 -1
  9. package/dist/cli.js +6 -37
  10. package/dist/cli.js.map +1 -1
  11. package/dist/components/chat/assistant-reply.d.ts +1 -1
  12. package/dist/components/chat/assistant-reply.js +4 -4
  13. package/dist/components/chat/assistant-segment.d.ts +1 -1
  14. package/dist/components/chat/assistant-segment.js +3 -3
  15. package/dist/components/chat/assistant-tool-group.d.ts +1 -1
  16. package/dist/components/chat/assistant-tool-group.js +3 -3
  17. package/dist/components/chat/code-block.js +2 -2
  18. package/dist/components/chat/prompt-card.js +2 -2
  19. package/dist/components/chat/segment-groups.d.ts +1 -1
  20. package/dist/components/chat/turn-item.d.ts +1 -1
  21. package/dist/components/chat/turn-item.js +3 -3
  22. package/dist/components/conversation-panel.d.ts +1 -1
  23. package/dist/components/conversation-panel.js +2 -2
  24. package/dist/components/file-mention-menu.d.ts +1 -1
  25. package/dist/components/file-mention-menu.js +1 -1
  26. package/dist/components/file-picker-dialog.d.ts +1 -1
  27. package/dist/components/file-picker-dialog.js +1 -1
  28. package/dist/components/footer-hints.js +1 -1
  29. package/dist/components/model-picker-dialog.d.ts +1 -1
  30. package/dist/components/model-picker-dialog.js +1 -1
  31. package/dist/components/prompt.d.ts +2 -2
  32. package/dist/components/prompt.js +7 -7
  33. package/dist/components/slash-command-menu.d.ts +1 -1
  34. package/dist/components/slash-command-menu.js +1 -1
  35. package/dist/components/tool-confirm-dialog-content.d.ts +1 -1
  36. package/dist/components/tool-confirm-dialog-content.js +1 -1
  37. package/dist/components/tool-confirm-dialog.d.ts +1 -1
  38. package/dist/components/tool-confirm-dialog.js +2 -2
  39. package/dist/files/attachment-capabilities.d.ts +1 -1
  40. package/dist/files/attachment-content.d.ts +3 -3
  41. package/dist/files/attachment-content.js +1 -1
  42. package/dist/files/prompt-display.d.ts +1 -1
  43. package/dist/files/workspace-files.d.ts +1 -1
  44. package/dist/files/workspace-files.d.ts.map +1 -1
  45. package/dist/files/workspace-files.js +5 -7
  46. package/dist/files/workspace-files.js.map +1 -1
  47. package/dist/hooks/agent-event-handlers.d.ts +2 -2
  48. package/dist/hooks/agent-event-handlers.js +1 -1
  49. package/dist/hooks/turn-updater.d.ts +1 -1
  50. package/dist/hooks/use-agent-chat.d.ts +3 -3
  51. package/dist/hooks/use-agent-chat.js +9 -9
  52. package/dist/hooks/use-file-mention-menu.d.ts +1 -1
  53. package/dist/hooks/use-file-mention-menu.js +3 -3
  54. package/dist/hooks/use-file-picker.d.ts +1 -1
  55. package/dist/hooks/use-file-picker.js +1 -1
  56. package/dist/hooks/use-model-picker.d.ts +1 -1
  57. package/dist/hooks/use-model-picker.js +1 -1
  58. package/dist/hooks/use-slash-command-menu.d.ts +1 -1
  59. package/dist/hooks/use-slash-command-menu.js +1 -1
  60. package/dist/index.js +4 -37
  61. package/dist/index.js.map +1 -1
  62. package/dist/run-cli-app.d.ts +2 -0
  63. package/dist/run-cli-app.d.ts.map +1 -0
  64. package/dist/run-cli-app.js +41 -0
  65. package/dist/run-cli-app.js.map +1 -0
  66. package/dist/runtime/exit.js +1 -1
  67. package/dist/runtime/runtime-support.d.ts +4 -0
  68. package/dist/runtime/runtime-support.d.ts.map +1 -0
  69. package/dist/runtime/runtime-support.js +19 -0
  70. package/dist/runtime/runtime-support.js.map +1 -0
  71. package/dist/ui/opencode-markdown.d.ts +2 -2
  72. package/dist/ui/opencode-markdown.js +1 -1
  73. package/dist/ui/theme.d.ts +1 -1
  74. package/dist/ui/theme.js +1 -1
  75. package/package.json +4 -4
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@renxqoo/renx-code.svg)](https://www.npmjs.com/package/@renxqoo/renx-code)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
- [![Node.js Version](https://img.shields.io/node/v/@renxqoo/renx-code.svg)](https://nodejs.org/)
5
+ [![Bun Version](https://img.shields.io/badge/Bun-%3E%3D1.1.0-black.svg)](https://bun.sh/)
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](https://www.typescriptlang.org/)
7
7
  [![React](https://img.shields.io/badge/React-19.2-blue.svg)](https://react.dev/)
8
8
  [![OpenTUI](https://img.shields.io/badge/OpenTUI-0.1.84-green.svg)](https://github.com/opentui/opentui)
@@ -26,11 +26,13 @@ Enterprise-grade AI coding assistant CLI tool with interactive terminal UI, buil
26
26
  ### Installation
27
27
 
28
28
  ```bash
29
- # Install globally
30
- npm install -g @renxqoo/renx-code
29
+ # Run directly with Bun
30
+ bunx @renxqoo/renx-code
31
31
 
32
- # Or use npx
33
- npx @renxqoo/renx-code
32
+ # Or install globally with Bun
33
+ bun install -g @renxqoo/renx-code
34
+
35
+ # npm install is not supported for running this CLI because OpenTUI currently depends on Bun runtime APIs.
34
36
  ```
35
37
 
36
38
  ### Basic Usage
@@ -39,21 +41,20 @@ npx @renxqoo/renx-code
39
41
  # Start the interactive CLI
40
42
  renx
41
43
 
42
- # Or run directly with npx
43
- npx @renxqoo/renx-code
44
+ # Or run directly with bunx
45
+ bunx @renxqoo/renx-code
44
46
  ```
45
47
 
46
48
  ## 📦 Installation
47
49
 
48
50
  ### Prerequisites
49
51
 
50
- - Node.js 20.0.0 or higher
51
- - npm, yarn, or pnpm
52
+ - Bun 1.1.0 or higher
52
53
 
53
54
  ### Global Installation
54
55
 
55
56
  ```bash
56
- npm install -g @renxqoo/renx-code
57
+ bun install -g @renxqoo/renx-code
57
58
  ```
58
59
 
59
60
  ### Local Installation
@@ -275,4 +276,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
275
276
 
276
277
  ---
277
278
 
278
- **Note**: This is an enterprise-grade tool designed for professional developers. Please ensure you have appropriate API keys and permissions for the AI models you intend to use.
279
+ **Note**: This is an enterprise-grade tool designed for professional developers. Please ensure you have appropriate API keys and permissions for the AI models you intend to use.
package/dist/App.js CHANGED
@@ -2,19 +2,19 @@ import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
2
  import { TextAttributes } from '@opentui/core';
3
3
  import { useKeyboard, useRenderer, useTerminalDimensions } from '@opentui/react';
4
4
  import { useEffect, useRef, useState } from 'react';
5
- import { resolveSlashCommand } from './commands/slash-commands';
6
- import { ConversationPanel } from './components/conversation-panel';
7
- import { FilePickerDialog } from './components/file-picker-dialog';
8
- import { ModelPickerDialog } from './components/model-picker-dialog';
9
- import { Prompt } from './components/prompt';
10
- import { ToolConfirmDialog } from './components/tool-confirm-dialog';
11
- import { isMediaSelection } from './files/attachment-capabilities';
12
- import { useAgentChat } from './hooks/use-agent-chat';
13
- import { useFilePicker } from './hooks/use-file-picker';
14
- import { useModelPicker } from './hooks/use-model-picker';
15
- import { requestExit } from './runtime/exit';
16
- import { copyTextToClipboard } from './runtime/clipboard';
17
- import { uiTheme } from './ui/theme';
5
+ import { resolveSlashCommand } from './commands/slash-commands.js';
6
+ import { ConversationPanel } from './components/conversation-panel.js';
7
+ import { FilePickerDialog } from './components/file-picker-dialog.js';
8
+ import { ModelPickerDialog } from './components/model-picker-dialog.js';
9
+ import { Prompt } from './components/prompt.js';
10
+ import { ToolConfirmDialog } from './components/tool-confirm-dialog.js';
11
+ import { isMediaSelection } from './files/attachment-capabilities.js';
12
+ import { useAgentChat } from './hooks/use-agent-chat.js';
13
+ import { useFilePicker } from './hooks/use-file-picker.js';
14
+ import { useModelPicker } from './hooks/use-model-picker.js';
15
+ import { requestExit } from './runtime/exit.js';
16
+ import { copyTextToClipboard } from './runtime/clipboard.js';
17
+ import { uiTheme } from './ui/theme.js';
18
18
  const appendFileTokens = (currentValue, files) => {
19
19
  if (files.length === 0) {
20
20
  return currentValue;
@@ -1,4 +1,4 @@
1
- import type { AgentLoopEvent, AgentStepEvent, AgentStopEvent, AgentToolConfirmEvent, AgentToolResultEvent, AgentToolStreamEvent, AgentToolUseEvent } from './types';
1
+ import type { AgentLoopEvent, AgentStepEvent, AgentStopEvent, AgentToolConfirmEvent, AgentToolResultEvent, AgentToolStreamEvent, AgentToolUseEvent } from './types.js';
2
2
  export declare const formatToolConfirmEvent: (event: AgentToolConfirmEvent) => string;
3
3
  export declare const formatToolUseEvent: (event: AgentToolUseEvent) => string;
4
4
  export declare const formatToolUseEventCode: (event: AgentToolUseEvent) => string;
@@ -1,7 +1,7 @@
1
- import type { AgentEventHandlers, AgentRunResult } from './types';
2
- import type { AgentModelOption, AgentModelSwitchResult } from './model-types';
3
- import type { AttachmentModelCapabilities } from '../../files/attachment-capabilities';
4
- import type { MessageContent } from '../../types/message-content';
1
+ import type { AgentEventHandlers, AgentRunResult } from './types.js';
2
+ import type { AgentModelOption, AgentModelSwitchResult } from './model-types.js';
3
+ import type { AttachmentModelCapabilities } from '../../files/attachment-capabilities.js';
4
+ import type { MessageContent } from '../../types/message-content.js';
5
5
  type RunAgentPromptOptions = {
6
6
  abortSignal?: AbortSignal;
7
7
  };
@@ -1,10 +1,10 @@
1
1
  import { resolve as resolvePath } from 'node:path';
2
- import { resolveToolConfirmDecision } from './tool-confirmation';
3
- import { getSourceModules, resolveWorkspaceRoot, } from './source-modules';
4
- import { ToolCallBuffer } from './tool-call-buffer';
5
- import { buildSystemPrompt } from '../../agent/prompts/system';
6
- import { resolveRenxDatabasePath, resolveRenxTaskDir } from '../../config/paths';
7
- import { resolveAttachmentModelCapabilities } from '../../files/attachment-capabilities';
2
+ import { resolveToolConfirmDecision } from './tool-confirmation.js';
3
+ import { getSourceModules, resolveWorkspaceRoot, } from './source-modules.js';
4
+ import { ToolCallBuffer } from './tool-call-buffer.js';
5
+ import { buildSystemPrompt } from '../../agent/prompts/system.js';
6
+ import { resolveRenxDatabasePath, resolveRenxTaskDir } from '../../config/paths.js';
7
+ import { resolveAttachmentModelCapabilities } from '../../files/attachment-capabilities.js';
8
8
  let runtimePromise = null;
9
9
  let initializing = false;
10
10
  const readPreferredModelIdFromEnv = () => {
@@ -1,4 +1,4 @@
1
- import type { MessageContent } from '../../types/message-content';
1
+ import type { MessageContent } from '../../types/message-content.js';
2
2
  type ProviderModelConfig = {
3
3
  name: string;
4
4
  envApiKey: string;
@@ -1,4 +1,4 @@
1
- import type { AgentToolUseEvent } from './types';
1
+ import type { AgentToolUseEvent } from './types.js';
2
2
  export declare class ToolCallBuffer {
3
3
  private readonly plannedOrder;
4
4
  private readonly plannedIds;
@@ -1,3 +1,3 @@
1
- import type { AgentEventHandlers, AgentToolConfirmDecision, AgentToolConfirmEvent } from './types';
1
+ import type { AgentEventHandlers, AgentToolConfirmDecision, AgentToolConfirmEvent } from './types.js';
2
2
  export declare const resolveToolConfirmDecision: (event: AgentToolConfirmEvent, handlers: AgentEventHandlers) => Promise<AgentToolConfirmDecision>;
3
3
  //# sourceMappingURL=tool-confirmation.d.ts.map
package/dist/cli.js CHANGED
@@ -1,43 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import { jsx as _jsx } from "@opentui/react/jsx-runtime";
3
- import { createCliRenderer } from '@opentui/core';
4
- import { createRoot } from '@opentui/react';
5
- import { App } from './App';
6
- import { bindExitGuards, hardResetTerminal, initExitRuntime, registerTerminalBackgroundRestore, } from './runtime/exit';
7
- import { probeTerminalColors, setTerminalWindowBackground, setTerminalWindowForeground, } from './runtime/terminal-theme';
8
- import { applyMarkdownThemeMode } from './ui/opencode-markdown';
9
- import { applyUiThemeMode, uiTheme } from './ui/theme';
2
+ import { ensureSupportedRuntime } from './runtime/runtime-support.js';
10
3
  async function main() {
11
- bindExitGuards();
12
- // OpenTUI exposes OPENTUI_FORCE_WCWIDTH for terminals where CJK width handling
13
- // is more accurate with wcwidth than the default Unicode capability probe.
14
- process.env.OPENTUI_FORCE_WCWIDTH ??= '1';
15
- const terminalColors = await probeTerminalColors();
16
- applyUiThemeMode(terminalColors.mode);
17
- applyMarkdownThemeMode(terminalColors.mode, process.platform);
18
- if (terminalColors.rawBackgroundColor &&
19
- terminalColors.rawBackgroundColor.toLowerCase() !== uiTheme.bg.toLowerCase()) {
20
- const originalBackground = terminalColors.rawBackgroundColor;
21
- setTerminalWindowBackground(uiTheme.bg);
22
- registerTerminalBackgroundRestore(() => {
23
- setTerminalWindowBackground(originalBackground);
24
- });
4
+ if (!ensureSupportedRuntime()) {
5
+ process.exitCode = 1;
6
+ return;
25
7
  }
26
- if (terminalColors.rawForegroundColor &&
27
- terminalColors.rawForegroundColor.toLowerCase() !== uiTheme.userPromptText.toLowerCase()) {
28
- const originalForeground = terminalColors.rawForegroundColor;
29
- setTerminalWindowForeground(uiTheme.userPromptText);
30
- registerTerminalBackgroundRestore(() => {
31
- setTerminalWindowForeground(originalForeground);
32
- });
33
- }
34
- const renderer = await createCliRenderer({
35
- exitOnCtrlC: false,
36
- onDestroy: hardResetTerminal,
37
- backgroundColor: uiTheme.bg,
38
- });
39
- initExitRuntime(renderer);
40
- createRoot(renderer).render(_jsx(App, {}));
8
+ const { runCliApp } = await import('./run-cli-app.js');
9
+ await runCliApp();
41
10
  }
42
11
  main().catch(console.error);
43
12
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":";;AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,i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C,CAAC,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC;QACvC,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,iBAAiB;QAC5B,eAAe,EAAE,OAAO,CAAC,EAAE;KAC5B,CAAC,CAAC;IACH,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC1B,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAC,GAAG,KAAG,CAAC,CAAC;AACvC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC,sBAAsB,EAAE,EAAE,CAAC;QAC9B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IAED,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACvD,MAAM,SAAS,EAAE,CAAC;AACpB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { AssistantReply as AssistantReplyType } from '../../types/chat';
1
+ import type { AssistantReply as AssistantReplyType } from '../../types/chat.js';
2
2
  type AssistantReplyProps = {
3
3
  reply: AssistantReplyType;
4
4
  };
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
- import { uiTheme } from '../../ui/theme';
4
- import { AssistantSegment } from './assistant-segment';
5
- import { AssistantToolGroup } from './assistant-tool-group';
6
- import { buildReplyRenderItems } from './segment-groups';
3
+ import { uiTheme } from '../../ui/theme.js';
4
+ import { AssistantSegment } from './assistant-segment.js';
5
+ import { AssistantToolGroup } from './assistant-tool-group.js';
6
+ import { buildReplyRenderItems } from './segment-groups.js';
7
7
  const renderStatus = (status) => {
8
8
  if (status === 'streaming') {
9
9
  return 'streaming';
@@ -1,4 +1,4 @@
1
- import type { ReplySegment } from '../../types/chat';
1
+ import type { ReplySegment } from '../../types/chat.js';
2
2
  type AssistantSegmentProps = {
3
3
  segment: ReplySegment;
4
4
  streaming: boolean;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
- import { opencodeMarkdownSyntax, opencodeSubtleMarkdownSyntax } from '../../ui/opencode-markdown';
3
- import { uiTheme } from '../../ui/theme';
4
- import { CodeBlock } from './code-block';
2
+ import { opencodeMarkdownSyntax, opencodeSubtleMarkdownSyntax } from '../../ui/opencode-markdown.js';
3
+ import { uiTheme } from '../../ui/theme.js';
4
+ import { CodeBlock } from './code-block.js';
5
5
  const markdownTableOptions = {
6
6
  widthMode: 'full',
7
7
  wrapMode: 'word',
@@ -1,4 +1,4 @@
1
- import type { ToolSegmentGroup } from './segment-groups';
1
+ import type { ToolSegmentGroup } from './segment-groups.js';
2
2
  type AssistantToolGroupProps = {
3
3
  group: ToolSegmentGroup;
4
4
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { uiTheme } from '../../ui/theme';
4
- import { getToolDisplayIcon, getToolDisplayName } from '../tool-display-config';
5
- import { CodeBlock } from './code-block';
3
+ import { uiTheme } from '../../ui/theme.js';
4
+ import { getToolDisplayIcon, getToolDisplayName } from '../tool-display-config.js';
5
+ import { CodeBlock } from './code-block.js';
6
6
  const COLLAPSIBLE_OUTPUT_LINES = 16;
7
7
  const COLLAPSIBLE_OUTPUT_LABELS = new Set(['output', 'error', 'result', 'details']);
8
8
  const asObjectLike = (value) => {
@@ -1,6 +1,6 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "@opentui/react/jsx-runtime";
2
- import { opencodeMarkdownSyntax } from '../../ui/opencode-markdown';
3
- import { uiTheme } from '../../ui/theme';
2
+ import { opencodeMarkdownSyntax } from '../../ui/opencode-markdown.js';
3
+ import { uiTheme } from '../../ui/theme.js';
4
4
  const FILETYPE_BY_EXTENSION = {
5
5
  bash: 'bash',
6
6
  cjs: 'javascript',
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
- import { isAudioSelection, isImageSelection, isVideoSelection, } from '../../files/attachment-capabilities';
3
- import { uiTheme } from '../../ui/theme';
2
+ import { isAudioSelection, isImageSelection, isVideoSelection, } from '../../files/attachment-capabilities.js';
3
+ import { uiTheme } from '../../ui/theme.js';
4
4
  const formatTime = (timestamp) => {
5
5
  return new Date(timestamp).toLocaleTimeString('en-US', {
6
6
  hour: '2-digit',
@@ -1,4 +1,4 @@
1
- import type { ReplySegment } from '../../types/chat';
1
+ import type { ReplySegment } from '../../types/chat.js';
2
2
  type ToolSegmentKind = 'use' | 'stream' | 'result';
3
3
  export type ToolSegmentMeta = {
4
4
  kind: ToolSegmentKind;
@@ -1,4 +1,4 @@
1
- import type { ChatTurn } from '../../types/chat';
1
+ import type { ChatTurn } from '../../types/chat.js';
2
2
  type TurnItemProps = {
3
3
  turn: ChatTurn;
4
4
  index: number;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
- import { uiTheme } from '../../ui/theme';
3
- import { AssistantReply } from './assistant-reply';
4
- import { PromptCard } from './prompt-card';
2
+ import { uiTheme } from '../../ui/theme.js';
3
+ import { AssistantReply } from './assistant-reply.js';
4
+ import { PromptCard } from './prompt-card.js';
5
5
  const PendingReply = () => {
6
6
  return (_jsxs("box", { flexDirection: "row", children: [_jsx("box", { width: 1, backgroundColor: uiTheme.divider }), _jsx("box", { flexGrow: 1, paddingLeft: 2, children: _jsxs("text", { attributes: uiTheme.typography.body, selectable: true, children: [_jsx("i", { fg: uiTheme.thinking, children: "Thinking:" }), _jsx("span", { fg: uiTheme.muted, children: " preparing response..." })] }) })] }));
7
7
  };
@@ -1,4 +1,4 @@
1
- import type { ChatTurn } from '../types/chat';
1
+ import type { ChatTurn } from '../types/chat.js';
2
2
  type ConversationPanelProps = {
3
3
  turns: ChatTurn[];
4
4
  isThinking: boolean;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "@opentui/react/jsx-runtime";
2
- import { uiTheme } from '../ui/theme';
3
- import { TurnItem } from './chat/turn-item';
2
+ import { uiTheme } from '../ui/theme.js';
3
+ import { TurnItem } from './chat/turn-item.js';
4
4
  export const ConversationPanel = ({ turns, isThinking }) => {
5
5
  const pendingTurnId = turns.at(-1)?.id;
6
6
  return (_jsx("scrollbox", { flexGrow: 1, scrollY: true, stickyScroll: true, stickyStart: "bottom", paddingX: uiTheme.layout.conversationPaddingX, paddingY: uiTheme.layout.conversationPaddingY, viewportOptions: { backgroundColor: uiTheme.bg }, contentOptions: { backgroundColor: uiTheme.bg }, marginBottom: 1, children: _jsx("box", { flexDirection: "column", gap: 0, paddingX: uiTheme.layout.conversationContentPaddingX, paddingY: uiTheme.layout.conversationContentPaddingY, backgroundColor: uiTheme.bg, children: turns.map((turn, index) => (_jsx(TurnItem, { turn: turn, index: index, isPending: isThinking && turn.id === pendingTurnId }, turn.id))) }) }));
@@ -1,4 +1,4 @@
1
- import type { PromptFileSelection } from '../files/types';
1
+ import type { PromptFileSelection } from '../files/types.js';
2
2
  type FileMentionMenuProps = {
3
3
  visible: boolean;
4
4
  loading: boolean;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
2
  import { TextAttributes } from '@opentui/core';
3
- import { uiTheme } from '../ui/theme';
3
+ import { uiTheme } from '../ui/theme.js';
4
4
  const selectedBackground = '#f4b183';
5
5
  const selectedForeground = '#050608';
6
6
  export const FileMentionMenu = ({ visible, loading, error, options, selectedIndex, }) => {
@@ -1,5 +1,5 @@
1
1
  import type { KeyEvent } from '@opentui/core';
2
- import type { PromptFileSelection } from '../files/types';
2
+ import type { PromptFileSelection } from '../files/types.js';
3
3
  type FilePickerDialogProps = {
4
4
  visible: boolean;
5
5
  viewportWidth: number;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
2
  import { TextAttributes } from '@opentui/core';
3
3
  import { useEffect, useRef } from 'react';
4
- import { uiTheme } from '../ui/theme';
4
+ import { uiTheme } from '../ui/theme.js';
5
5
  const selectedBackground = '#f4b183';
6
6
  const selectedForeground = '#050608';
7
7
  const formatSize = (size) => {
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
2
  import { TextAttributes } from '@opentui/core';
3
3
  import { useEffect, useState } from 'react';
4
- import { uiTheme } from '../ui/theme';
4
+ import { uiTheme } from '../ui/theme.js';
5
5
  const SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
6
6
  const SPINNER_INTERVAL_MS = 80;
7
7
  export const FooterHints = ({ isThinking, contextUsagePercent }) => {
@@ -1,5 +1,5 @@
1
1
  import type { KeyEvent } from '@opentui/core';
2
- import type { AgentModelOption } from '../agent/runtime/model-types';
2
+ import type { AgentModelOption } from '../agent/runtime/model-types.js';
3
3
  type ModelPickerDialogProps = {
4
4
  visible: boolean;
5
5
  viewportWidth: number;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
2
  import { TextAttributes } from '@opentui/core';
3
3
  import { useEffect, useMemo, useRef } from 'react';
4
- import { uiTheme } from '../ui/theme';
4
+ import { uiTheme } from '../ui/theme.js';
5
5
  const selectedBackground = '#f4b183';
6
6
  const selectedForeground = '#050608';
7
7
  const toProviderLabel = (provider) => {
@@ -1,5 +1,5 @@
1
- import type { SlashCommandDefinition } from '../commands/slash-commands';
2
- import type { PromptFileSelection } from '../files/types';
1
+ import type { SlashCommandDefinition } from '../commands/slash-commands.js';
2
+ import type { PromptFileSelection } from '../files/types.js';
3
3
  type PromptProps = {
4
4
  isThinking: boolean;
5
5
  disabled?: boolean;
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
2
  import { useCallback, useEffect, useMemo, useRef } from 'react';
3
- import { FileMentionMenu } from './file-mention-menu';
4
- import { FooterHints } from './footer-hints';
5
- import { SlashCommandMenu } from './slash-command-menu';
6
- import { isAudioSelection, isImageSelection, isVideoSelection, } from '../files/attachment-capabilities';
7
- import { useFileMentionMenu } from '../hooks/use-file-mention-menu';
8
- import { useSlashCommandMenu } from '../hooks/use-slash-command-menu';
9
- import { uiTheme } from '../ui/theme';
3
+ import { FileMentionMenu } from './file-mention-menu.js';
4
+ import { FooterHints } from './footer-hints.js';
5
+ import { SlashCommandMenu } from './slash-command-menu.js';
6
+ import { isAudioSelection, isImageSelection, isVideoSelection, } from '../files/attachment-capabilities.js';
7
+ import { useFileMentionMenu } from '../hooks/use-file-mention-menu.js';
8
+ import { useSlashCommandMenu } from '../hooks/use-slash-command-menu.js';
9
+ import { uiTheme } from '../ui/theme.js';
10
10
  export const Prompt = ({ isThinking, disabled = false, modelLabel, contextUsagePercent, value, selectedFiles, onAddSelectedFiles, onValueChange, onSlashCommandSelect, onSlashMenuVisibilityChange, onSubmit, }) => {
11
11
  const textareaRef = useRef(null);
12
12
  const mediaFiles = useMemo(() => selectedFiles.filter(file => isImageSelection(file) || isAudioSelection(file) || isVideoSelection(file)), [selectedFiles]);
@@ -1,4 +1,4 @@
1
- import type { SlashCommandDefinition } from '../commands/slash-commands';
1
+ import type { SlashCommandDefinition } from '../commands/slash-commands.js';
2
2
  type SlashCommandMenuProps = {
3
3
  visible: boolean;
4
4
  options: SlashCommandDefinition[];
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
2
  import { TextAttributes } from '@opentui/core';
3
- import { uiTheme } from '../ui/theme';
3
+ import { uiTheme } from '../ui/theme.js';
4
4
  const selectedBackground = '#f4b183';
5
5
  const selectedForeground = '#050608';
6
6
  export const SlashCommandMenu = ({ visible, options, selectedIndex }) => {
@@ -1,4 +1,4 @@
1
- import type { AgentToolConfirmEvent } from '../agent/runtime/types';
1
+ import type { AgentToolConfirmEvent } from '../agent/runtime/types.js';
2
2
  export type ToolConfirmDialogContent = {
3
3
  summary: string;
4
4
  detail?: string;
@@ -1,4 +1,4 @@
1
- import { getToolHiddenArgumentKeys, getToolDisplayName } from './tool-display-config';
1
+ import { getToolHiddenArgumentKeys, getToolDisplayName } from './tool-display-config.js';
2
2
  const asRecord = (value) => {
3
3
  return value && typeof value === 'object' ? value : {};
4
4
  };
@@ -1,4 +1,4 @@
1
- import type { AgentToolConfirmEvent } from '../agent/runtime/types';
1
+ import type { AgentToolConfirmEvent } from '../agent/runtime/types.js';
2
2
  type ToolConfirmDialogProps = {
3
3
  visible: boolean;
4
4
  viewportWidth: number;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
2
  import { TextAttributes } from '@opentui/core';
3
- import { uiTheme } from '../ui/theme';
4
- import { buildToolConfirmDialogContent } from './tool-confirm-dialog-content';
3
+ import { uiTheme } from '../ui/theme.js';
4
+ import { buildToolConfirmDialogContent } from './tool-confirm-dialog-content.js';
5
5
  const selectedForeground = '#050608';
6
6
  const renderButton = (label, selected) => {
7
7
  return (_jsx("box", { paddingLeft: 1, paddingRight: 1, backgroundColor: selected ? uiTheme.accent : uiTheme.surface, border: ['top', 'bottom', 'left', 'right'], borderColor: selected ? uiTheme.accent : uiTheme.divider, children: _jsx("text", { fg: selected ? selectedForeground : uiTheme.text, attributes: TextAttributes.BOLD, children: label }) }));
@@ -1,4 +1,4 @@
1
- import type { PromptFileSelection } from './types';
1
+ import type { PromptFileSelection } from './types.js';
2
2
  export type AttachmentModelCapabilities = {
3
3
  image: boolean;
4
4
  audio: boolean;
@@ -1,5 +1,5 @@
1
- import type { MessageContent } from '../types/message-content';
2
- import type { PromptFileSelection } from './types';
3
- import { type AttachmentModelCapabilities } from './attachment-capabilities';
1
+ import type { MessageContent } from '../types/message-content.js';
2
+ import type { PromptFileSelection } from './types.js';
3
+ import { type AttachmentModelCapabilities } from './attachment-capabilities.js';
4
4
  export declare const buildPromptContent: (prompt: string, files: PromptFileSelection[], capabilities: AttachmentModelCapabilities) => Promise<MessageContent>;
5
5
  //# sourceMappingURL=attachment-content.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { extname } from 'node:path';
3
- import { isAudioSelection, isImageSelection, isVideoSelection, } from './attachment-capabilities';
3
+ import { isAudioSelection, isImageSelection, isVideoSelection, } from './attachment-capabilities.js';
4
4
  const IMAGE_MIME_BY_EXTENSION = {
5
5
  '.gif': 'image/gif',
6
6
  '.jpeg': 'image/jpeg',
@@ -1,3 +1,3 @@
1
- import type { PromptFileSelection } from './types';
1
+ import type { PromptFileSelection } from './types.js';
2
2
  export declare const buildPromptDisplay: (prompt: string, files: PromptFileSelection[]) => string;
3
3
  //# sourceMappingURL=prompt-display.d.ts.map
@@ -1,3 +1,3 @@
1
- import type { PromptFileSelection } from './types';
1
+ import type { PromptFileSelection } from './types.js';
2
2
  export declare const listWorkspaceFiles: () => Promise<PromptFileSelection[]>;
3
3
  //# sourceMappingURL=workspace-files.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-files.d.ts","sourceRoot":"","sources":["../../src/files/workspace-files.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAqDnD,eAAO,MAAM,kBAAkB,QAAa,OAAO,CAAC,mBAAmB,EAAE,CAKxE,CAAC"}
1
+ {"version":3,"file":"workspace-files.d.ts","sourceRoot":"","sources":["../../src/files/workspace-files.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAmDnD,eAAO,MAAM,kBAAkB,QAAa,OAAO,CAAC,mBAAmB,EAAE,CAKxE,CAAC"}
@@ -1,6 +1,6 @@
1
- import { readdir } from 'node:fs/promises';
1
+ import { readdir, stat } from 'node:fs/promises';
2
2
  import { join, relative } from 'node:path';
3
- import { resolveWorkspaceRoot } from '../agent/runtime/source-modules';
3
+ import { resolveWorkspaceRoot } from '../agent/runtime/source-modules.js';
4
4
  const IGNORED_DIR_NAMES = new Set([
5
5
  '.git',
6
6
  'node_modules',
@@ -28,16 +28,14 @@ const visitDirectory = async (root, directory, output) => {
28
28
  if (!entry.isFile()) {
29
29
  continue;
30
30
  }
31
- const stat = await Bun.file(absolutePath)
32
- .stat()
33
- .catch(() => undefined);
34
- if (!stat || !stat.isFile()) {
31
+ const fileStat = await stat(absolutePath).catch(() => undefined);
32
+ if (!fileStat || !fileStat.isFile()) {
35
33
  continue;
36
34
  }
37
35
  output.push({
38
36
  relativePath: relative(root, absolutePath),
39
37
  absolutePath,
40
- size: stat.size,
38
+ size: fileStat.size,
41
39
  });
42
40
  }
43
41
  };
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-files.js","sourceRoot":"","sources":["../../src/files/workspace-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAGvE,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,MAAM;IACN,cAAc;IACd,MAAM;IACN,OAAO;IACP,UAAU;IACV,OAAO;IACP,QAAQ;CACT,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,CAAC,CA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AAC,CAAC;AAClC,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { AgentEventHandlers } from '../agent/runtime/types';
2
- import type { ReplySegmentType } from '../types/chat';
1
+ import type { AgentEventHandlers } from '../agent/runtime/types.js';
2
+ import type { ReplySegmentType } from '../types/chat.js';
3
3
  type BuildAgentEventHandlersParams = {
4
4
  turnId: number;
5
5
  isCurrentRequest: () => boolean;
@@ -1,4 +1,4 @@
1
- import { formatLoopEvent, formatStepEvent, formatStopEvent, formatToolConfirmEvent, formatToolResultEvent, formatToolResultEventCode, formatToolStreamEvent, formatToolUseEvent, formatToolUseEventCode, } from '../agent/runtime/event-format';
1
+ import { formatLoopEvent, formatStepEvent, formatStopEvent, formatToolConfirmEvent, formatToolResultEvent, formatToolResultEventCode, formatToolStreamEvent, formatToolUseEvent, formatToolUseEventCode, } from '../agent/runtime/event-format.js';
2
2
  const shouldShowEventLog = () => {
3
3
  const value = process.env.AGENT_SHOW_EVENTS?.trim().toLowerCase();
4
4
  return value === '1' || value === 'true' || value === 'yes' || value === 'on';
@@ -1,4 +1,4 @@
1
- import type { AssistantReply, ChatTurn, ReplySegment, ReplySegmentType, ReplyStatus } from '../types/chat';
1
+ import type { AssistantReply, ChatTurn, ReplySegment, ReplySegmentType, ReplyStatus } from '../types/chat.js';
2
2
  export declare const createStreamingReply: (modelLabel: string) => AssistantReply;
3
3
  export declare const patchTurn: (turns: ChatTurn[], turnId: number, patch: (turn: ChatTurn) => ChatTurn) => ChatTurn[];
4
4
  export declare const ensureSegment: (segments: ReplySegment[], segmentId: string, type: ReplySegmentType, data?: unknown) => ReplySegment[];
@@ -1,6 +1,6 @@
1
- import type { AgentToolConfirmEvent } from '../agent/runtime/types';
2
- import type { ChatTurn } from '../types/chat';
3
- import type { PromptFileSelection } from '../files/types';
1
+ import type { AgentToolConfirmEvent } from '../agent/runtime/types.js';
2
+ import type { ChatTurn } from '../types/chat.js';
3
+ import type { PromptFileSelection } from '../files/types.js';
4
4
  export type UseAgentChatResult = {
5
5
  turns: ChatTurn[];
6
6
  inputValue: string;
@@ -1,13 +1,13 @@
1
1
  import { useCallback, useEffect, useRef, useState } from 'react';
2
- import { resolveSlashCommand } from '../commands/slash-commands';
3
- import { getAgentModelAttachmentCapabilities, getAgentModelLabel, runAgentPrompt, } from '../agent/runtime/runtime';
4
- import { requestExit } from '../runtime/exit';
5
- import { buildAgentEventHandlers } from './agent-event-handlers';
6
- import { buildHelpSegments, buildUnsupportedSegments, extractErrorMessage, } from './chat-local-replies';
7
- import { appendNoteLine, appendToSegment, createStreamingReply, orderReplySegments, patchTurn, setReplyStatus, } from './turn-updater';
8
- import { DEFAULT_ATTACHMENT_MODEL_CAPABILITIES, } from '../files/attachment-capabilities';
9
- import { buildPromptContent } from '../files/attachment-content';
10
- import { buildPromptDisplay } from '../files/prompt-display';
2
+ import { resolveSlashCommand } from '../commands/slash-commands.js';
3
+ import { getAgentModelAttachmentCapabilities, getAgentModelLabel, runAgentPrompt, } from '../agent/runtime/runtime.js';
4
+ import { requestExit } from '../runtime/exit.js';
5
+ import { buildAgentEventHandlers } from './agent-event-handlers.js';
6
+ import { buildHelpSegments, buildUnsupportedSegments, extractErrorMessage, } from './chat-local-replies.js';
7
+ import { appendNoteLine, appendToSegment, createStreamingReply, orderReplySegments, patchTurn, setReplyStatus, } from './turn-updater.js';
8
+ import { DEFAULT_ATTACHMENT_MODEL_CAPABILITIES, } from '../files/attachment-capabilities.js';
9
+ import { buildPromptContent } from '../files/attachment-content.js';
10
+ import { buildPromptDisplay } from '../files/prompt-display.js';
11
11
  const INITIAL_MODEL_LABEL = process.env.AGENT_MODEL?.trim() || '';
12
12
  const normalizeTokenCount = (value) => {
13
13
  if (typeof value !== 'number' || !Number.isFinite(value)) {
@@ -1,6 +1,6 @@
1
1
  import type { KeyEvent, TextareaRenderable } from '@opentui/core';
2
2
  import { type RefObject } from 'react';
3
- import type { PromptFileSelection } from '../files/types';
3
+ import type { PromptFileSelection } from '../files/types.js';
4
4
  type UseFileMentionMenuParams = {
5
5
  value: string;
6
6
  textareaRef: RefObject<TextareaRenderable | null>;
@@ -1,7 +1,7 @@
1
1
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
- import { findTrailingFileMention } from '../files/file-mention-query';
3
- import { isMediaSelection } from '../files/attachment-capabilities';
4
- import { listWorkspaceFiles } from '../files/workspace-files';
2
+ import { findTrailingFileMention } from '../files/file-mention-query.js';
3
+ import { isMediaSelection } from '../files/attachment-capabilities.js';
4
+ import { listWorkspaceFiles } from '../files/workspace-files.js';
5
5
  const normalize = (value) => value.trim().toLowerCase();
6
6
  export const useFileMentionMenu = ({ value, textareaRef, selectedFiles, onFilesSelected, onValueChange, disabled = false, }) => {
7
7
  const [selectedIndex, setSelectedIndex] = useState(0);
@@ -1,5 +1,5 @@
1
1
  import type { KeyEvent } from '@opentui/core';
2
- import type { PromptFileSelection } from '../files/types';
2
+ import type { PromptFileSelection } from '../files/types.js';
3
3
  type UseFilePickerResult = {
4
4
  visible: boolean;
5
5
  loading: boolean;
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
- import { listWorkspaceFiles } from '../files/workspace-files';
2
+ import { listWorkspaceFiles } from '../files/workspace-files.js';
3
3
  const normalize = (value) => value.trim().toLowerCase();
4
4
  export const useFilePicker = () => {
5
5
  const [visible, setVisible] = useState(false);
@@ -1,5 +1,5 @@
1
1
  import type { KeyEvent } from '@opentui/core';
2
- import type { AgentModelOption } from '../agent/runtime/model-types';
2
+ import type { AgentModelOption } from '../agent/runtime/model-types.js';
3
3
  type UseModelPickerParams = {
4
4
  onModelChanged: (label: string) => void;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
- import { listAgentModels, switchAgentModel } from '../agent/runtime/runtime';
2
+ import { listAgentModels, switchAgentModel } from '../agent/runtime/runtime.js';
3
3
  const normalize = (value) => value.trim().toLowerCase();
4
4
  export const useModelPicker = ({ onModelChanged }) => {
5
5
  const [visible, setVisible] = useState(false);
@@ -1,6 +1,6 @@
1
1
  import type { KeyEvent, TextareaRenderable } from '@opentui/core';
2
2
  import { type RefObject } from 'react';
3
- import { type SlashCommandDefinition } from '../commands/slash-commands';
3
+ import { type SlashCommandDefinition } from '../commands/slash-commands.js';
4
4
  type UseSlashCommandMenuParams = {
5
5
  value: string;
6
6
  onValueChange: (value: string) => void;
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useEffect, useMemo, useState } from 'react';
2
- import { filterSlashCommands } from '../commands/slash-commands';
2
+ import { filterSlashCommands } from '../commands/slash-commands.js';
3
3
  const getSlashQuery = (value) => {
4
4
  if (!/^\/[^\s]*$/.test(value)) {
5
5
  return null;
package/dist/index.js CHANGED
@@ -1,39 +1,6 @@
1
- import { jsx as _jsx } from "@opentui/react/jsx-runtime";
2
- import { createCliRenderer } from '@opentui/core';
3
- import { createRoot } from '@opentui/react';
4
- import { App } from './App';
5
- import { bindExitGuards, hardResetTerminal, initExitRuntime, registerTerminalBackgroundRestore, } from './runtime/exit';
6
- import { probeTerminalColors, setTerminalWindowBackground, setTerminalWindowForeground, } from './runtime/terminal-theme';
7
- import { applyMarkdownThemeMode } from './ui/opencode-markdown';
8
- import { applyUiThemeMode, uiTheme } from './ui/theme';
9
- bindExitGuards();
10
- // OpenTUI exposes OPENTUI_FORCE_WCWIDTH for terminals where CJK width handling
11
- // is more accurate with wcwidth than the default Unicode capability probe.
12
- process.env.OPENTUI_FORCE_WCWIDTH ??= '1';
13
- const terminalColors = await probeTerminalColors();
14
- applyUiThemeMode(terminalColors.mode);
15
- applyMarkdownThemeMode(terminalColors.mode, process.platform);
16
- if (terminalColors.rawBackgroundColor &&
17
- terminalColors.rawBackgroundColor.toLowerCase() !== uiTheme.bg.toLowerCase()) {
18
- const originalBackground = terminalColors.rawBackgroundColor;
19
- setTerminalWindowBackground(uiTheme.bg);
20
- registerTerminalBackgroundRestore(() => {
21
- setTerminalWindowBackground(originalBackground);
22
- });
1
+ import { ensureSupportedRuntime } from './runtime/runtime-support.js';
2
+ if (ensureSupportedRuntime()) {
3
+ const { runCliApp } = await import('./run-cli-app.js');
4
+ await runCliApp();
23
5
  }
24
- if (terminalColors.rawForegroundColor &&
25
- terminalColors.rawForegroundColor.toLowerCase() !== uiTheme.userPromptText.toLowerCase()) {
26
- const originalForeground = terminalColors.rawForegroundColor;
27
- setTerminalWindowForeground(uiTheme.userPromptText);
28
- registerTerminalBackgroundRestore(() => {
29
- setTerminalWindowForeground(originalForeground);
30
- });
31
- }
32
- const renderer = await createCliRenderer({
33
- exitOnCtrlC: false,
34
- onDestroy: hardResetTerminal,
35
- backgroundColor: uiTheme.bg,
36
- });
37
- initExitRuntime(renderer);
38
- createRoot(renderer).render(_jsx(App, {}));
39
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iCAAiC,GAClC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEvD,cAAc,EAAE,CAAC;AACjB,+EAA+E;AAC/E,2EAA2E;AAC3E,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,GAAG,CAAC;AAC1C,MAAM,cAAc,GAAG,MAAM,mBAAmB,EAAE,CAAC;AACnD,gBAAgB,CAAC,cA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,SAAS,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACvD,MAAM,SAAS,EAAE,CAAC;AACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function runCliApp(): Promise<void>;
2
+ //# sourceMappingURL=run-cli-app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-cli-app.d.ts","sourceRoot":"","sources":["../src/run-cli-app.tsx"],"names":[],"mappings":"AAkBA,wBAAsB,SAAS,kBAsC9B"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "@opentui/react/jsx-runtime";
2
+ import { createCliRenderer } from '@opentui/core';
3
+ import { createRoot } from '@opentui/react';
4
+ import { App } from './App.js';
5
+ import { bindExitGuards, hardResetTerminal, initExitRuntime, registerTerminalBackgroundRestore, } from './runtime/exit.js';
6
+ import { probeTerminalColors, setTerminalWindowBackground, setTerminalWindowForeground, } from './runtime/terminal-theme.js';
7
+ import { applyMarkdownThemeMode } from './ui/opencode-markdown.js';
8
+ import { applyUiThemeMode, uiTheme } from './ui/theme.js';
9
+ export async function runCliApp() {
10
+ bindExitGuards();
11
+ // OpenTUI exposes OPENTUI_FORCE_WCWIDTH for terminals where CJK width handling
12
+ // is more accurate with wcwidth than the default Unicode capability probe.
13
+ process.env.OPENTUI_FORCE_WCWIDTH ??= '1';
14
+ const terminalColors = await probeTerminalColors();
15
+ applyUiThemeMode(terminalColors.mode);
16
+ applyMarkdownThemeMode(terminalColors.mode, process.platform);
17
+ if (terminalColors.rawBackgroundColor &&
18
+ terminalColors.rawBackgroundColor.toLowerCase() !== uiTheme.bg.toLowerCase()) {
19
+ const originalBackground = terminalColors.rawBackgroundColor;
20
+ setTerminalWindowBackground(uiTheme.bg);
21
+ registerTerminalBackgroundRestore(() => {
22
+ setTerminalWindowBackground(originalBackground);
23
+ });
24
+ }
25
+ if (terminalColors.rawForegroundColor &&
26
+ terminalColors.rawForegroundColor.toLowerCase() !== uiTheme.userPromptText.toLowerCase()) {
27
+ const originalForeground = terminalColors.rawForegroundColor;
28
+ setTerminalWindowForeground(uiTheme.userPromptText);
29
+ registerTerminalBackgroundRestore(() => {
30
+ setTerminalWindowForeground(originalForeground);
31
+ });
32
+ }
33
+ const renderer = await createCliRenderer({
34
+ exitOnCtrlC: false,
35
+ onDestroy: hardResetTerminal,
36
+ backgroundColor: uiTheme.bg,
37
+ });
38
+ initExitRuntime(renderer);
39
+ createRoot(renderer).render(_jsx(App, {}));
40
+ }
41
+ //# sourceMappingURL=run-cli-app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-cli-app.js","sourceRoot":"","sources":["../src/run-cli-app.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iCAAiC,GAClC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,cAAc,EAAE,CAAC;IACjB,+EAA+E;IAC/E,2EAA2E;IAC3E,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,GAAG,CAAC;IAC1C,MAAM,cAAc,GAAG,MAAM,mBAAmB,EAAE,CAAC;IACnD,gBAAgB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtC,sBAAsB,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE9D,IACE,cAAc,CAAC,kBAAkB;QACjC,cAAc,CAAC,kBAAkB,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,EAAE,CAAC,WAAW,EAAE,EAC5E,CAAC;QACD,MAAM,kBAAkB,GAAG,cAAc,CAAC,kBAAkB,CAAC;QAC7D,2BAA2B,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACxC,iCAAiC,CAAC,GAAG,EAAE;YACrC,2BAA2B,CAAC,kBAAkB,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IACE,cAAc,CAAC,kBAAkB;QACjC,cAAc,CAAC,kBAAkB,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,cAAc,CAAC,WAAW,EAAE,EACxF,CAAC;QACD,MAAM,kBAAkB,GAAG,cAAc,CAAC,kBAAkB,CAAC;QAC7D,2BAA2B,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QACpD,iCAAiC,CAAC,GAAG,EAAE;YACrC,2BAA2B,CAAC,kBAAkB,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC;QACvC,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,iBAAiB;QAC5B,eAAe,EAAE,OAAO,CAAC,EAAE;KAC5B,CAAC,CAAC;IACH,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC1B,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAC,GAAG,KAAG,CAAC,CAAC;AACvC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { disposeAgentRuntime } from '../agent/runtime/runtime';
1
+ import { disposeAgentRuntime } from '../agent/runtime/runtime.js';
2
2
  const TERMINAL_RESET_SEQUENCE = [
3
3
  '\u001b[0m',
4
4
  '\u001b[?25h',
@@ -0,0 +1,4 @@
1
+ export declare const isBunRuntime: () => boolean;
2
+ export declare const getUnsupportedRuntimeMessage: () => string;
3
+ export declare const ensureSupportedRuntime: () => boolean;
4
+ //# sourceMappingURL=runtime-support.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-support.d.ts","sourceRoot":"","sources":["../../src/runtime/runtime-support.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,eAAoE,CAAC;AAE9F,eAAO,MAAM,4BAA4B,cAS3B,CAAC;AAEf,eAAO,MAAM,sBAAsB,eAOlC,CAAC"}
@@ -0,0 +1,19 @@
1
+ const BUN_INSTALL_URL = 'https://bun.sh';
2
+ export const isBunRuntime = () => typeof Bun !== 'undefined' || Boolean(process.versions.bun);
3
+ export const getUnsupportedRuntimeMessage = () => [
4
+ 'renx currently requires the Bun runtime because OpenTUI depends on Bun FFI APIs.',
5
+ '',
6
+ 'Use one of these commands instead:',
7
+ ' bunx @renxqoo/renx-code',
8
+ ' bun install -g @renxqoo/renx-code',
9
+ '',
10
+ `Install Bun: ${BUN_INSTALL_URL}`,
11
+ ].join('\n');
12
+ export const ensureSupportedRuntime = () => {
13
+ if (isBunRuntime()) {
14
+ return true;
15
+ }
16
+ console.error(getUnsupportedRuntimeMessage());
17
+ return false;
18
+ };
19
+ //# sourceMappingURL=runtime-support.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-support.js","sourceRoot":"","sources":["../../src/runtime/runtime-support.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAEzC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,OAAO,GAAG,KAAK,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAE9F,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,EAAE,CAC/C;IACE,kFAAkF;IAClF,EAAE;IACF,oCAAoC;IACpC,2BAA2B;IAC3B,qCAAqC;IACrC,EAAE;IACF,gBAAgB,eAAe,EAAE;CAClC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEf,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACzC,IAAI,YAAY,EAAE,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC;IAC9C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { SyntaxStyle } from '@opentui/core';
2
- import { type MarkdownThemePlatform } from './open-code-theme';
3
- import type { UiThemeMode } from './theme';
2
+ import { type MarkdownThemePlatform } from './open-code-theme.js';
3
+ import type { UiThemeMode } from './theme.js';
4
4
  export declare let opencodeMarkdownSyntax: SyntaxStyle;
5
5
  export declare let opencodeSubtleMarkdownSyntax: SyntaxStyle;
6
6
  export declare const applyMarkdownThemeMode: (mode: UiThemeMode, platform?: MarkdownThemePlatform) => void;
@@ -1,5 +1,5 @@
1
1
  import { RGBA, SyntaxStyle } from '@opentui/core';
2
- import { resolveOpenCodeTheme, } from './open-code-theme';
2
+ import { resolveOpenCodeTheme, } from './open-code-theme.js';
3
3
  const getSyntaxRules = (theme, options) => {
4
4
  const useItalic = options.platform !== 'darwin';
5
5
  const useUnderline = options.platform !== 'darwin';
@@ -1,5 +1,5 @@
1
1
  import { TextAttributes } from '@opentui/core';
2
- import { type OpenCodeThemeMode } from './open-code-theme';
2
+ import { type OpenCodeThemeMode } from './open-code-theme.js';
3
3
  export type UiThemeMode = OpenCodeThemeMode;
4
4
  type TextAttributeValue = (typeof TextAttributes)[keyof typeof TextAttributes];
5
5
  export type UiTheme = {
package/dist/ui/theme.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { TextAttributes, rgbToHex } from '@opentui/core';
2
- import { resolveOpenCodeTheme } from './open-code-theme';
2
+ import { resolveOpenCodeTheme } from './open-code-theme.js';
3
3
  const baseLayout = {
4
4
  appPaddingTop: 0,
5
5
  appPaddingBottom: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renxqoo/renx-code",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Enterprise-grade AI coding assistant CLI tool with interactive terminal UI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -25,8 +25,8 @@
25
25
  "scripts": {
26
26
  "dev": "bun run src/index.tsx",
27
27
  "dev:watch": "bun run --watch src/index.tsx",
28
- "build": "tsc -p tsconfig.build.json",
29
- "build:cli": "tsc -p tsconfig.build.json && node -e \"require('fs').chmodSync('dist/cli.js', 0o755)\"",
28
+ "build": "tsc -p tsconfig.build.json && node ./scripts/fix-esm-imports.mjs",
29
+ "build:cli": "npm run build && node -e \"require('fs').chmodSync('dist/cli.js', 0o755)\"",
30
30
  "start": "node dist/index.js",
31
31
  "test": "vitest",
32
32
  "test:coverage": "vitest run --coverage",
@@ -110,7 +110,7 @@
110
110
  "zod": "^4.3.6"
111
111
  },
112
112
  "engines": {
113
- "node": ">=20.0.0"
113
+ "bun": ">=1.1.0"
114
114
  },
115
115
  "lint-staged": {
116
116
  "*.ts": [