mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 01:08:07 +00:00
更新安装脚本,修改启动提示信息以确保用户手动启动,移除自动启动功能,提升用户交互体验。同时,简化输入支持检测逻辑,确保在不同环境下的兼容性。
This commit is contained in:
+2
-8
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from "react";
|
||||
import { Box, Text, useInput, useStdin } from "ink";
|
||||
import { Box, Text, useInput } from "ink";
|
||||
import { TrendApp } from "./TrendApp";
|
||||
import { MakerApp } from "./MakerApp";
|
||||
import { OffsetMakerApp } from "./OffsetMakerApp";
|
||||
@@ -32,15 +32,9 @@ const STRATEGIES: StrategyOption[] = [
|
||||
},
|
||||
];
|
||||
|
||||
// Prefer Ink's stdin detection to avoid false negatives when spawned by shells
|
||||
// that don't propagate process.stdin TTY flags correctly.
|
||||
function useInputSupported() {
|
||||
const { isRawModeSupported } = useStdin();
|
||||
return Boolean(isRawModeSupported);
|
||||
}
|
||||
const inputSupported = Boolean(process.stdin && (process.stdin as any).isTTY);
|
||||
|
||||
export function App() {
|
||||
const inputSupported = useInputSupported();
|
||||
const [cursor, setCursor] = useState(0);
|
||||
const [selected, setSelected] = useState<StrategyOption | null>(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user