mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 08:48:07 +00:00
更新安装脚本,修改启动提示信息以确保用户手动启动,移除自动启动功能,提升用户交互体验。同时,简化输入支持检测逻辑,确保在不同环境下的兼容性。
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { Box, Text, useInput, useStdin } from "ink";
|
||||
import { Box, Text, useInput } from "ink";
|
||||
import { makerConfig } from "../config";
|
||||
import { AsterExchangeAdapter } from "../exchanges/aster-adapter";
|
||||
import { OffsetMakerEngine, type OffsetMakerEngineSnapshot } from "../core/offset-maker-engine";
|
||||
@@ -10,13 +10,9 @@ interface OffsetMakerAppProps {
|
||||
onExit: () => void;
|
||||
}
|
||||
|
||||
function useInputSupported() {
|
||||
const { isRawModeSupported } = useStdin();
|
||||
return Boolean(isRawModeSupported);
|
||||
}
|
||||
const inputSupported = Boolean(process.stdin && (process.stdin as any).isTTY);
|
||||
|
||||
export function OffsetMakerApp({ onExit }: OffsetMakerAppProps) {
|
||||
const inputSupported = useInputSupported();
|
||||
const [snapshot, setSnapshot] = useState<OffsetMakerEngineSnapshot | null>(null);
|
||||
const [error, setError] = useState<Error | null>(null);
|
||||
const engineRef = useRef<OffsetMakerEngine | null>(null);
|
||||
|
||||
Reference in New Issue
Block a user