@nbtca/prompt 1.0.9 → 1.0.14

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 (73) hide show
  1. package/README.md +16 -294
  2. package/dist/config/data.d.ts +1 -1
  3. package/dist/config/data.js +1 -1
  4. package/dist/config/data.js.map +1 -1
  5. package/dist/core/logo.d.ts.map +1 -1
  6. package/dist/core/logo.js +13 -2
  7. package/dist/core/logo.js.map +1 -1
  8. package/dist/core/menu.d.ts +7 -2
  9. package/dist/core/menu.d.ts.map +1 -1
  10. package/dist/core/menu.js +61 -126
  11. package/dist/core/menu.js.map +1 -1
  12. package/dist/core/ui.d.ts +14 -13
  13. package/dist/core/ui.d.ts.map +1 -1
  14. package/dist/core/ui.js +31 -39
  15. package/dist/core/ui.js.map +1 -1
  16. package/dist/features/calendar.d.ts +14 -12
  17. package/dist/features/calendar.d.ts.map +1 -1
  18. package/dist/features/calendar.js +69 -60
  19. package/dist/features/calendar.js.map +1 -1
  20. package/dist/features/docs.d.ts +2 -2
  21. package/dist/features/docs.d.ts.map +1 -1
  22. package/dist/features/docs.js +116 -290
  23. package/dist/features/docs.js.map +1 -1
  24. package/dist/features/repair.d.ts +4 -0
  25. package/dist/features/repair.d.ts.map +1 -1
  26. package/dist/features/repair.js +6 -9
  27. package/dist/features/repair.js.map +1 -1
  28. package/dist/features/website.d.ts +10 -0
  29. package/dist/features/website.d.ts.map +1 -1
  30. package/dist/features/website.js +19 -9
  31. package/dist/features/website.js.map +1 -1
  32. package/dist/i18n/index.d.ts +10 -0
  33. package/dist/i18n/index.d.ts.map +1 -1
  34. package/dist/i18n/index.js.map +1 -1
  35. package/dist/i18n/locales/en.json +11 -1
  36. package/dist/i18n/locales/zh.json +11 -1
  37. package/dist/index.d.ts +1 -2
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +133 -4
  40. package/dist/index.js.map +1 -1
  41. package/dist/main.d.ts +4 -1
  42. package/dist/main.d.ts.map +1 -1
  43. package/dist/main.js +11 -6
  44. package/dist/main.js.map +1 -1
  45. package/package.json +9 -5
  46. package/.github/workflows/ci.yml +0 -40
  47. package/.github/workflows/publish.yml +0 -59
  48. package/CHANGELOG.md +0 -125
  49. package/DEVELOPMENT.md +0 -258
  50. package/TERMINAL_UX.md +0 -184
  51. package/assets/Prompt_demo.gif +0 -0
  52. package/src/config/data.js +0 -484
  53. package/src/config/data.ts +0 -28
  54. package/src/config/theme.js +0 -138
  55. package/src/config/theme.ts +0 -26
  56. package/src/core/logo.ts +0 -189
  57. package/src/core/menu.ts +0 -213
  58. package/src/core/ui.ts +0 -89
  59. package/src/core/vim-keys.ts +0 -70
  60. package/src/features/calendar.ts +0 -161
  61. package/src/features/docs.ts +0 -588
  62. package/src/features/repair.ts +0 -36
  63. package/src/features/website.ts +0 -45
  64. package/src/i18n/index.ts +0 -236
  65. package/src/i18n/locales/en.json +0 -107
  66. package/src/i18n/locales/zh.json +0 -107
  67. package/src/index.ts +0 -9
  68. package/src/logo/ascii-logo.txt +0 -6
  69. package/src/logo/logo.txt +0 -2
  70. package/src/logo/printLogo.js +0 -26
  71. package/src/main.ts +0 -45
  72. package/src/types.ts +0 -51
  73. package/tsconfig.json +0 -53
@@ -1,59 +0,0 @@
1
- name: Publish to npm
2
-
3
- on:
4
- push:
5
- tags:
6
- - "v*"
7
-
8
- jobs:
9
- publish:
10
- runs-on: ubuntu-latest
11
- permissions:
12
- contents: read
13
- id-token: write
14
-
15
- steps:
16
- - name: 🛎️ Checkout code
17
- uses: actions/checkout@v4
18
-
19
- - name: 🟢 Set up Node.js
20
- uses: actions/setup-node@v4
21
- with:
22
- node-version: "20"
23
- registry-url: "https://registry.npmjs.org/"
24
- cache: "npm"
25
-
26
- - name: 📦 Install dependencies
27
- run: npm ci
28
-
29
- - name: 🔨 Build TypeScript
30
- run: npm run build
31
-
32
- - name: ✅ Verify build
33
- run: |
34
- test -d dist || (echo "dist directory not found" && exit 1)
35
- test -f dist/index.js || (echo "dist/index.js not found" && exit 1)
36
- echo "Build artifacts verified"
37
-
38
- - name: 📋 Check package version
39
- id: version
40
- run: |
41
- TAG_VERSION=${GITHUB_REF#refs/tags/v}
42
- PKG_VERSION=$(node -p "require('./package.json').version")
43
- echo "Tag version: $TAG_VERSION"
44
- echo "Package version: $PKG_VERSION"
45
- if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
46
- echo "Version mismatch! Tag: v$TAG_VERSION, package.json: v$PKG_VERSION"
47
- exit 1
48
- fi
49
- echo "version=$PKG_VERSION" >> $GITHUB_OUTPUT
50
-
51
- - name: 🚀 Publish to npm
52
- run: npm publish --access public --provenance
53
- env:
54
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55
-
56
- - name: ✅ Success notification
57
- run: |
58
- echo "🎉 Successfully published @nbtca/prompt@${{ steps.version.outputs.version }} to npm"
59
-
package/CHANGELOG.md DELETED
@@ -1,125 +0,0 @@
1
- # CHANGELOG
2
-
3
- ## [1.0.5] - 2025-12-10
4
-
5
- ### Fixed
6
- - **Knowledge Base 403 Error**: Resolved GitHub API rate limiting issue that caused 403 errors when browsing documentation
7
- - Added GitHub token authentication support via `GITHUB_TOKEN` or `GH_TOKEN` environment variables
8
- - Improved error messages with rate limit information and reset time
9
- - Increased rate limit from 60 to 5000 requests per hour when using a token
10
-
11
- ### Added
12
- - **Pager-Style Document Viewer**: Documents now open in a pager (similar to vim/journalctl/less)
13
- - Natural scrolling navigation with arrow keys, Space, j/k (vim-style), and q to quit
14
- - Content doesn't flood the terminal anymore
15
- - Better reading experience for long documents
16
- - Automatic fallback to direct output if pager is unavailable
17
- - **Re-read Document Option**: Added ability to re-read a document after viewing without going back to the list
18
- - **Environment Variable Support**:
19
- - `GITHUB_TOKEN` or `GH_TOKEN` for GitHub API authentication
20
- - `PAGER` for custom pager selection (defaults to `less`)
21
-
22
- ### Improved
23
- - Enhanced error handling with detailed rate limit diagnostics
24
- - Better user feedback when rate limits are reached
25
- - Clearer instructions for resolving authentication issues
26
-
27
- ### Technical Details
28
- - Added `displayInPager()` function for spawning system pager processes
29
- - Enhanced `fetchGitHubDirectory()` with conditional token authentication
30
- - Updated documentation viewer workflow for better UX
31
-
32
- ## [1.0.4] - 2025-12-10
33
-
34
- ### Enhanced
35
- - **Smooth Slogan Animation**: Implemented true color interpolation for buttery smooth gradient animation
36
- - Increased frame rate from 24 to 60 FPS for ultra-smooth motion
37
- - Changed easing from cubic to sine wave for more natural transitions
38
- - Dynamically generate gradients per frame instead of using pre-defined set
39
- - Eliminates staggered/jumping effect in the slogan text animation
40
-
41
- ### Technical Details
42
- - Added `hexToRgb()`, `rgbToHex()`, and `interpolateColor()` functions for mathematical color blending
43
- - Implemented `easeInOutSine()` easing function for smooth acceleration/deceleration
44
- - Each frame now uses unique, mathematically interpolated colors
45
-
46
- ## [1.0.3] - 2025-11-27
47
-
48
- ### Changed
49
- - Version alignment and bug fixes
50
-
51
- ## [1.0.2] - 2025-11-27
52
-
53
- ### Added
54
- - **Terminal Documentation Viewer**: Browse and read Markdown documentation from nbtca/documents repository directly in terminal
55
- - GitHub API integration for fetching directory structure and file contents
56
- - Recursive directory navigation with [DIR] and [MD] indicators
57
- - VitePress syntax cleaning (frontmatter, containers, [[toc]], HTML comments)
58
- - Terminal Markdown rendering using marked-terminal
59
- - Browser fallback on network errors or user preference
60
- - Retry mechanism for failed network requests
61
-
62
- ### Changed
63
- - **ASCII-Only Interface**: Removed all emoji icons for maximum terminal compatibility
64
- - Replaced emoji with ASCII symbols: [*], [?], [x], [..], [DIR], [MD], [ <], [ ^], [ *]
65
- - Works on all terminal emulators, SSH sessions, tmux, and legacy systems
66
- - Follows Unix/Linux terminal conventions
67
- - Professional, minimalist design
68
-
69
- ### Improved
70
- - **Terminal UX Enhancements**:
71
- - Added keybinding hints to main menu: "Navigation: j/k or ↑/↓ | Jump: g/G | Quit: q or Ctrl+C"
72
- - Added ESC key infrastructure for future back navigation and operation cancellation
73
- - Standardized navigation symbols across all menus
74
- - Better vim-keys.ts documentation with clearer comments
75
-
76
- ### Fixed
77
- - **Development Workflow**: Fixed `pnpm run dev` auto-restart issue
78
- - Split dev command: `dev` (no watch, for interactive CLI) and `dev:watch` (with watch mode)
79
- - Proper exit behavior for interactive CLI testing
80
-
81
- ### Documentation
82
- - Added DEVELOPMENT.md: Comprehensive development guide with workflows, testing methods, and common issues
83
- - Added TERMINAL_UX.md: Terminal UX improvements and compatibility documentation
84
- - Updated README.md: Professional, concise documentation without decorative elements
85
-
86
- ### Technical Details
87
- - Enhanced docs.ts with GitHub repository integration
88
- - Improved menu.ts with ASCII symbols and keybinding hints
89
- - Enhanced vim-keys.ts with ESC support and better documentation
90
- - Better package.json scripts for development workflow
91
-
92
- ## [1.0.1] - 2025-11-21
93
-
94
- ### Added
95
- - New English tagline with smooth blue gradient animation
96
- - Full Vim keybindings support (j/k/g/G/q)
97
- - Minimalist UI design inspired by Claude Code CLI
98
-
99
- ### Improved
100
- - Smoother gradient animation (24 frames, 1.2s duration)
101
- - Removed keyboard instruction text for cleaner interface
102
- - Blue color scheme throughout (deep blue → sky blue → cyan)
103
-
104
- ### Changed
105
- - q key now exits the application
106
- - Removed Chinese tagline
107
- - Simplified menu layout
108
-
109
- ### Removed
110
- - Unused DATA_MANAGEMENT.md documentation
111
-
112
- ### Dependencies
113
- - Updated gradient-string to ^3.0.0
114
- - Updated @inquirer/prompts to ^8.0.3
115
-
116
- ## [1.0.0] - 2025-11-21
117
-
118
- ### Added
119
- - Initial release of NBTCA Prompt CLI tool
120
- - Interactive terminal menu system
121
- - Event calendar integration
122
- - Repair service information
123
- - Knowledge base access
124
- - Quick links to official website and GitHub
125
- - About section with project information
package/DEVELOPMENT.md DELETED
@@ -1,258 +0,0 @@
1
- # 开发指南
2
-
3
- ## 🚀 快速开始
4
-
5
- ### 安装依赖
6
-
7
- ```bash
8
- pnpm install
9
- ```
10
-
11
- ## 🧪 本地测试方法
12
-
13
- ### ✅ 方法 1: 快速测试(推荐)
14
-
15
- ```bash
16
- pnpm run dev
17
- ```
18
-
19
- - ✅ 直接运行 TypeScript 源码
20
- - ✅ 不会自动重启
21
- - ✅ 适合交互式 CLI 测试
22
- - ✅ 程序退出后命令才结束
23
- - ✅ 可以正常使用 Ctrl+C 退出
24
-
25
- **使用场景**: 日常开发和功能测试
26
-
27
- ### 📦 方法 2: 生产环境测试
28
-
29
- ```bash
30
- # 步骤 1: 构建
31
- pnpm run build
32
-
33
- # 步骤 2: 运行
34
- pnpm start
35
- ```
36
-
37
- - ✅ 测试编译后的代码
38
- - ✅ 最接近生产环境
39
- - ⚠️ 修改代码后需要重新构建
40
-
41
- **使用场景**: 发布前最终测试
42
-
43
- ### 🔗 方法 3: 全局命令测试
44
-
45
- ```bash
46
- # 步骤 1: 构建并链接到全局
47
- pnpm run build
48
- npm link
49
-
50
- # 步骤 2: 在任何目录测试
51
- nbtca
52
-
53
- # 步骤 3: 测试完成后清理
54
- npm unlink -g @nbtca/prompt
55
- ```
56
-
57
- **使用场景**: 测试全局安装体验
58
-
59
- ### ⚠️ 方法 4: 监听模式(不推荐用于交互式测试)
60
-
61
- ```bash
62
- pnpm run dev:watch
63
- ```
64
-
65
- - ⚠️ 文件变化时自动重启
66
- - ❌ 不适合交互式 CLI 测试
67
- - ❌ 会频繁中断交互
68
- - ✅ 仅适合纯函数/工具类开发
69
-
70
- **使用场景**: 仅用于调试非交互式代码
71
-
72
- ## 🎯 测试新功能(知识库模块)
73
-
74
- ### 测试步骤
75
-
76
- 1. **启动程序**
77
- ```bash
78
- pnpm run dev
79
- ```
80
-
81
- 2. **选择 "知识库" 选项**
82
- - 使用方向键或 Vim 键位 (j/k) 导航
83
- - 按 Enter 确认
84
-
85
- 3. **浏览文档分类**
86
- - 📚 教程 (Tutorial)
87
- - 🔧 维修日
88
- - 🎉 相关活动举办
89
- - 📋 流程文档 (Process)
90
- - 🛠️ 维修相关 (Repair)
91
- - 📦 归档文档 (Archived)
92
- - 📖 README
93
-
94
- 4. **测试功能点**
95
- - [ ] 进入目录
96
- - [ ] 返回上级目录
97
- - [ ] 查看 Markdown 文件
98
- - [ ] 终端渲染是否正常
99
- - [ ] 在浏览器中打开
100
- - [ ] 网络错误处理
101
-
102
- ### 预期行为
103
-
104
- ✅ **正常流程**:
105
- 1. 从 GitHub 获取文档列表
106
- 2. 显示目录树
107
- 3. 选择文件后在终端渲染 Markdown
108
- 4. 提供返回或浏览器打开选项
109
-
110
- ✅ **错误处理**:
111
- 1. GitHub API 失败时提示重试
112
- 2. 文件加载失败时建议浏览器打开
113
- 3. 网络超时友好提示
114
-
115
- ## 🔧 常见问题
116
-
117
- ### Q1: 为什么 `pnpm run dev` 比 `pnpm run dev:watch` 好?
118
-
119
- **A**: 对于交互式 CLI 应用:
120
-
121
- - `pnpm run dev` (tsx src/index.ts)
122
- - ✅ 运行一次,等待程序退出
123
- - ✅ 用户可以正常交互
124
- - ✅ Ctrl+C 正常工作
125
-
126
- - `pnpm run dev:watch` (tsx watch src/index.ts)
127
- - ❌ 监听文件变化,自动重启
128
- - ❌ 用户操作会被中断
129
- - ❌ Ctrl+C 只能退出 tsx,不能优雅退出程序
130
-
131
- ### Q2: 如何退出正在运行的程序?
132
-
133
- **A**:
134
- - **正常退出**: 在菜单中选择 "退出" 选项
135
- - **强制退出**: 按 `Ctrl+C`
136
- - 如果卡住: 按 `Ctrl+C` 两次
137
-
138
- ### Q3: 修改代码后看不到变化?
139
-
140
- **A**: 取决于你的测试方法:
141
- - `pnpm run dev`: 重新运行命令即可
142
- - `pnpm start`: 需要先 `pnpm run build`
143
- - `npm link`: 需要 `pnpm run build` 后重新测试
144
-
145
- ### Q4: TypeScript 编译错误怎么办?
146
-
147
- **A**:
148
- ```bash
149
- # 检查类型错误
150
- pnpm run build
151
-
152
- # 如果有错误,根据提示修复
153
- # 常见错误:
154
- # - 导入路径缺少 .js 后缀
155
- # - 类型定义不匹配
156
- # - 未使用的变量
157
- ```
158
-
159
- ## 📝 开发工作流
160
-
161
- ### 日常开发
162
-
163
- ```bash
164
- # 1. 修改代码
165
- vim src/features/docs.ts
166
-
167
- # 2. 测试
168
- pnpm run dev
169
-
170
- # 3. 重复 1-2 直到功能完成
171
- ```
172
-
173
- ### 提交前检查
174
-
175
- ```bash
176
- # 1. 确保构建通过
177
- pnpm run build
178
-
179
- # 2. 测试编译后的代码
180
- pnpm start
181
-
182
- # 3. 提交
183
- git add .
184
- git commit -m "feat: add terminal docs viewer"
185
- ```
186
-
187
- ### 发布前测试
188
-
189
- ```bash
190
- # 1. 构建
191
- pnpm run build
192
-
193
- # 2. 全局测试
194
- npm link
195
- nbtca
196
-
197
- # 3. 清理
198
- npm unlink -g @nbtca/prompt
199
- ```
200
-
201
- ## 🎨 代码规范
202
-
203
- - 使用 TypeScript 严格模式
204
- - 函数添加 JSDoc 注释
205
- - 导入模块使用 `.js` 后缀(即使是 `.ts` 文件)
206
- - 保持代码简洁,避免过度抽象
207
-
208
- ## 📂 项目结构
209
-
210
- ```
211
- src/
212
- ├── config/ # 配置常量
213
- │ ├── data.ts # URL、应用信息
214
- │ └── theme.ts # 颜色主题
215
-
216
- ├── core/ # 核心功能
217
- │ ├── logo.ts # Logo 显示
218
- │ ├── menu.ts # 主菜单
219
- │ ├── ui.ts # UI 组件
220
- │ └── vim-keys.ts # Vim 键位支持
221
-
222
- ├── features/ # 功能模块
223
- │ ├── calendar.ts # 活动日历
224
- │ ├── docs.ts # 知识库 ⭐ 新功能
225
- │ ├── repair.ts # 维修服务
226
- │ └── website.ts # 网站访问
227
-
228
- ├── logo/ # Logo 资源
229
- ├── index.ts # 入口
230
- ├── main.ts # 主逻辑
231
- └── types.ts # 类型定义
232
- ```
233
-
234
- ## 🌟 新功能说明
235
-
236
- ### 知识库终端查看器
237
-
238
- **文件**: `src/features/docs.ts`
239
-
240
- **核心功能**:
241
- 1. `fetchGitHubDirectory()` - 从 GitHub API 获取目录
242
- 2. `fetchGitHubRawContent()` - 获取文件原始内容
243
- 3. `browseDirectory()` - 交互式目录浏览
244
- 4. `viewMarkdownFile()` - 终端渲染 Markdown
245
- 5. `showDocsMenu()` - 主菜单入口
246
-
247
- **依赖**:
248
- - `axios` - HTTP 请求
249
- - `marked` + `marked-terminal` - Markdown 渲染
250
- - `inquirer` - 交互式选择
251
- - `chalk` - 终端颜色
252
-
253
- **测试要点**:
254
- - [ ] GitHub API 正常调用
255
- - [ ] 目录树正确显示
256
- - [ ] Markdown 渲染美观
257
- - [ ] 错误处理友好
258
- - [ ] 导航流畅
package/TERMINAL_UX.md DELETED
@@ -1,184 +0,0 @@
1
- # Terminal UX Improvements
2
-
3
- ## Summary
4
-
5
- All changes align with standard Linux/Unix terminal conventions for better user experience and consistency.
6
-
7
- ## Changes Made
8
-
9
- ### 1. Standardized Navigation Symbols
10
-
11
- **Before**:
12
- ```
13
- [📁] emoji icons
14
- [<-] inconsistent arrows
15
- [ ] empty brackets
16
- ```
17
-
18
- **After**:
19
- ```
20
- [..] - Up to parent directory (Unix convention)
21
- [ <] - Back/Previous
22
- [ ^] - Return to main menu
23
- [ *] - Special action (open in browser)
24
- [DIR] - Directory indicator
25
- [MD] - Markdown file indicator
26
- [ ?] - Help/About
27
- [ x] - Exit
28
- ```
29
-
30
- **Rationale**: ASCII-only symbols ensure maximum terminal compatibility and follow Unix conventions (e.g., `..` for parent directory).
31
-
32
- ### 2. Added Keybinding Hints
33
-
34
- **Main Menu**:
35
- ```
36
- Navigation: j/k or ↑/↓ | Jump: g/G | Quit: q or Ctrl+C
37
- ```
38
-
39
- **Location**: Displayed above main menu for visibility
40
-
41
- **Rationale**: Users should know available shortcuts without reading documentation.
42
-
43
- ### 3. ESC Key Support
44
-
45
- **Implementation**: ESC key now properly passed through to menus
46
-
47
- **Expected Behavior** (future enhancement):
48
- - ESC in submenus = go back one level
49
- - ESC in main menu = exit application
50
-
51
- **Current State**: Infrastructure added, full implementation needs inquirer customization
52
-
53
- **Rationale**: ESC is standard cancel/back key in Unix terminals.
54
-
55
- ### 4. Improved Documentation
56
-
57
- **Added Descriptions**:
58
- - Knowledge Base menu now shows purpose
59
- - Comments in code clarified
60
-
61
- **Rationale**: Self-documenting UI reduces user confusion.
62
-
63
- ## Navigation Symbol Reference
64
-
65
- ```
66
- Symbol | Meaning | Unix Standard
67
- --------|--------------------------|---------------
68
- [..] | Parent directory | Yes (cd ..)
69
- [DIR] | Directory entry | Common
70
- [MD] | Markdown file | N/A
71
- [ <] | Go back/previous | No (custom)
72
- [ ^] | Go to top/main menu | No (custom)
73
- [ *] | Special action | No (custom)
74
- [ ?] | Help/Information | Common (man ?)
75
- [ x] | Exit/Quit | No (custom)
76
- ```
77
-
78
- ## Keybinding Reference
79
-
80
- ```
81
- Key | Action | Standard
82
- --------|----------------------|----------
83
- ↑/↓ | Navigate up/down | Yes
84
- j/k | Navigate up/down | Vim
85
- g | Jump to first | Vim
86
- G | Jump to last | Vim
87
- q | Quit application | Vim/less/man
88
- ESC | Cancel/Go back | Yes
89
- Ctrl+C | Force quit | Yes
90
- Enter | Select/Confirm | Yes
91
- ```
92
-
93
- ## Comparison with Common Unix Tools
94
-
95
- ### less/more
96
- - j/k navigation: ✓ Supported
97
- - g/G jump: ✓ Supported
98
- - q quit: ✓ Supported
99
- - ESC: Usually not used
100
-
101
- ### man
102
- - j/k navigation: ✓ Supported
103
- - g/G jump: ✓ Supported
104
- - q quit: ✓ Supported
105
- - h for help: Not implemented (use [?] menu item)
106
-
107
- ### vim
108
- - j/k navigation: ✓ Supported
109
- - g/G jump: ✓ Supported
110
- - q quit: ✓ Supported
111
- - ESC: ✓ Infrastructure added
112
-
113
- ### fzf (fuzzy finder)
114
- - j/k navigation: ✓ Supported
115
- - Ctrl+C quit: ✓ Supported
116
- - ESC cancel: ✓ Infrastructure added
117
-
118
- ## Implementation Details
119
-
120
- ### vim-keys.ts
121
- - Maps j/k to arrow keys
122
- - Maps g/G to home/end
123
- - Maps q to Ctrl+C
124
- - Passes ESC through for menu handling
125
-
126
- ### menu.ts
127
- - Shows keybinding hints before menu
128
- - Standardized symbol usage
129
- - Consistent formatting
130
-
131
- ### docs.ts
132
- - Uses [..] for parent directory (Unix standard)
133
- - Uses [ ^] for main menu (clear intent)
134
- - Uses [ <] for back navigation
135
- - Added descriptive subtitle
136
-
137
- ## Terminal Compatibility
138
-
139
- All symbols tested and work correctly on:
140
- - iTerm2 (macOS)
141
- - Terminal.app (macOS)
142
- - GNOME Terminal (Linux)
143
- - Windows Terminal
144
- - PuTTY (SSH)
145
- - tmux/screen multiplexers
146
-
147
- ## Future Enhancements
148
-
149
- 1. **Context-aware q key**: Currently q always exits. Consider:
150
- - q in submenu = go back
151
- - Q (shift) = force quit
152
-
153
- 2. **ESC back navigation**: Full implementation requires:
154
- - Custom inquirer plugin or wrapper
155
- - State management for menu stack
156
-
157
- 3. **Help overlay**: F1 or ? key for:
158
- - Show all keybindings
159
- - Context-sensitive help
160
-
161
- 4. **Breadcrumb trail**: Show current location:
162
- ```
163
- Main > Docs > Tutorial > Getting Started
164
- ```
165
-
166
- 5. **Operation cancellation**: Allow Ctrl+C during:
167
- - Network requests
168
- - File loading
169
- - Long operations
170
-
171
- ## Migration Notes
172
-
173
- ### Breaking Changes
174
- None. All changes are additive or improve existing behavior.
175
-
176
- ### User-Facing Changes
177
- - New keybinding hints displayed
178
- - Updated navigation symbols (more intuitive)
179
- - ESC key now recognized (infrastructure)
180
-
181
- ### Developer Notes
182
- - ESC handling requires inquirer extension for full functionality
183
- - Current implementation provides foundation
184
- - Symbol constants could be extracted to config
Binary file