@josephyan/qingflow-app-builder-mcp 0.2.0-beta.1005 → 0.2.0-beta.1006
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/README.md +2 -2
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/src/qingflow_mcp/__init__.py +1 -1
- package/src/qingflow_mcp/cli/terminal_ui.py +12 -5
package/README.md
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Install:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install @josephyan/qingflow-app-builder-mcp@0.2.0-beta.
|
|
6
|
+
npm install @josephyan/qingflow-app-builder-mcp@0.2.0-beta.1006
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Run:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npx -y -p @josephyan/qingflow-app-builder-mcp@0.2.0-beta.
|
|
12
|
+
npx -y -p @josephyan/qingflow-app-builder-mcp@0.2.0-beta.1006 qingflow-app-builder-mcp
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Environment:
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
@@ -136,11 +136,13 @@ def _render_options(
|
|
|
136
136
|
total = len(options)
|
|
137
137
|
page_start = max(0, min(selected_index - page_size // 2, max(total - page_size, 0)))
|
|
138
138
|
visible = options[page_start: page_start + page_size]
|
|
139
|
-
lines =
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
lines = _render_multiline_text(title, width=terminal_width)
|
|
140
|
+
lines.extend(
|
|
141
|
+
[
|
|
142
|
+
"↑/↓ 或 j/k 选择,Enter 确认,q / Esc 取消",
|
|
143
|
+
"",
|
|
144
|
+
]
|
|
145
|
+
)
|
|
144
146
|
for offset, option in enumerate(visible, start=page_start):
|
|
145
147
|
marker = ">" if offset == selected_index else " "
|
|
146
148
|
suffix = f" [{option.hint}]" if option.hint else ""
|
|
@@ -161,6 +163,11 @@ def _truncate_line(text: str, *, width: int) -> str:
|
|
|
161
163
|
return text[: width - 1] + "…"
|
|
162
164
|
|
|
163
165
|
|
|
166
|
+
def _render_multiline_text(text: str, *, width: int) -> list[str]:
|
|
167
|
+
parts = text.splitlines() or [text]
|
|
168
|
+
return [_truncate_line(part, width=width) for part in parts]
|
|
169
|
+
|
|
170
|
+
|
|
164
171
|
def _read_key(input_stream: TextIO) -> str:
|
|
165
172
|
fd = input_stream.fileno()
|
|
166
173
|
first_bytes = os.read(fd, 1)
|