@mobius-os/mobius 0.3.2 → 0.3.4
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/package.json +1 -1
- package/src/aimux.ts +1 -1
- package/src/components/Chat.tsx +2 -1
- package/src/components/primitives.tsx +1 -1
- package/src/main.tsx +1 -1
package/package.json
CHANGED
package/src/aimux.ts
CHANGED
|
@@ -261,7 +261,7 @@ export class AimuxSupervisor {
|
|
|
261
261
|
onStatus({ state: 'starting', phase: 'connecting', detail: '正在连接 Mobius AIMUX bridge…', identifier, attempt: this.reconnectAttempt })
|
|
262
262
|
const child = this.opts.spawnProcess?.() ?? spawn(
|
|
263
263
|
aimuxExe(),
|
|
264
|
-
['reverse', 'connect', `${server.replace(/\/$/, '')}/aimux_bridge`, '--identifier', identifier, '--token', token, '--replace'],
|
|
264
|
+
['reverse', 'connect', `${server.replace(/\/$/, '')}/aimux_bridge`, '--identifier', identifier, '--token', token, '--replace', ...(process.platform === 'win32' ? ['--silent-shell'] : [])],
|
|
265
265
|
{ windowsHide: true },
|
|
266
266
|
)
|
|
267
267
|
this.child = child
|
package/src/components/Chat.tsx
CHANGED
|
@@ -35,7 +35,8 @@ interface TerminalSize {
|
|
|
35
35
|
isTty: boolean
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
import { createRequire } from 'node:module'
|
|
39
|
+
const VERSION = createRequire(import.meta.url)('../../package.json').version
|
|
39
40
|
|
|
40
41
|
const SLASH_COMMANDS = [
|
|
41
42
|
{ cmd: '/clear', desc: '清空当前对话,开启新会话' },
|
|
@@ -46,7 +46,7 @@ export function TextInput(props: TextInputProps) {
|
|
|
46
46
|
if (key.return) { props.onSubmit?.(); return }
|
|
47
47
|
if (key.upArrow) { props.onArrowUp?.(); return }
|
|
48
48
|
if (key.downArrow) { props.onArrowDown?.(); return }
|
|
49
|
-
if (key.escape) { props.onEscape?.(); return }
|
|
49
|
+
if (key.escape || input === '\x1b') { props.onEscape?.(); return }
|
|
50
50
|
if (key.tab) { props.onTab?.(); return }
|
|
51
51
|
// Ink labels the \x7f that virtually every terminal's Backspace key emits
|
|
52
52
|
// as `key.delete` (see its parse-keypress.js TODO). Treat either signal as
|
package/src/main.tsx
CHANGED