hide input

This commit is contained in:
Chris Wanstrath 2025-10-07 18:38:11 -07:00
parent 9ddc36e014
commit 2d7a5d157b
2 changed files with 4 additions and 3 deletions

View File

@ -14,5 +14,5 @@ export function cacheCommands(cmds: Commands) {
} }
export async function mode(mode?: string) { export async function mode(mode?: string) {
await runCommand(mode ? `mode ${mode}` : "mode") await runCommand(mode ? `mode ${mode}` : "mode", false)
} }

View File

@ -8,7 +8,7 @@ import { randomId, importUrl } from "../shared/utils"
import { addToHistory } from "./history" import { addToHistory } from "./history"
import { commands } from "./commands" import { commands } from "./commands"
export async function runCommand(input: string) { export async function runCommand(input: string, showInput = true) {
if (!input.trim()) return if (!input.trim()) return
if (input.includes(";")) { if (input.includes(";")) {
@ -19,7 +19,8 @@ export async function runCommand(input: string) {
const id = randomId() const id = randomId()
addToHistory(input) addToHistory(input)
addInput(id, input) if (showInput)
addInput(id, input)
const [cmd = "", ...args] = input.split(" ") const [cmd = "", ...args] = input.split(" ")