@ai-matrx/terminal
AI Matrx终端:xterm 6 配有所有主机否则会重建,电话优先.
pnpm add @ai-matrx/terminal
| 条目 | 这是什么 |
|---|---|
@ai-matrx/terminal | 无框架核心:从属密钥及其字节, Ctrl/Alt Latch, 触摸手势识别器, 选择和可视- port 数学, 主题, 以及 createLineEditor。 。 。 . |
@ai-matrx/terminal/react | <Terminal> 财务报告和审定财务报表 <AccessoryBar>。 。 。 . |
@ai-matrx/terminal/styles.css | 结构CSS(由 <Terminal> 页:1. |
@ai-matrx/terminal/tokens.css | 默认 --mxt-* 颜色,对于没有自己主题的主机. |
一个PTY
import { Terminal } from "@ai-matrx/terminal/react";
<Terminal
fit="viewport" // phones: grow to the bottom of the visual viewport, above the keyboard
onReady={(term) => pty.onOutput((bytes) => term.write(bytes))} // write() resolves after parse
onData={(keys) => pty.write(keys)} // already modified by the bar's Ctrl / Alt
onResize={({ cols, rows }) => pty.resize(cols, rows)}
/>;
每个呼叫一个命令( 无 PTY)
import { createLineEditor } from "@ai-matrx/terminal";
const editor = createLineEditor({
write: (d) => term.xterm.write(d),
prompt: () => "$ ",
history: () => commands,
onSubmit: async (line) => {
term.write(await run(line));
editor.done(); // prompt again, then any typeahead or pasted lines
},
});
// <Terminal onData={(d) => editor.input(d)} … />
在粗糙的指针上,终端打开其电话层:按键键,拖取滚动
音效、按下并按住以选择一个单词(drag to extend, Copy),以及44px键盘栏
(Esc Tab Ctrl Alt,箭头, | / ~ -, Home End PgUp PgDn, Paste, 隐藏键盘). Ctrl:自带=为
下个键,双塔普=锁定.
颜色: 映射 --mxt-* 主题的指号,或导入 tokens.css。 。 。 .
MIT AI 矩阵引擎