Remove unsupported initial_value field from PromptInputLine

The user's WezTerm build (20240203-110809) rejects `initial_value` as a
PromptInputLine field (only `action`/`description` are valid on that
version), so constructing the action errored out immediately and the
whole callback died silently -- the prompt never appeared and the
underlying shell showed through. Current values are now shown inline
in the description text instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-18 00:32:52 +09:00
parent 77eb0397f6
commit 387c9d7397

View File

@@ -225,8 +225,7 @@ local function prompt_config_value(window, pane, title, key, initial_value, quot
defer(function(inner_window, inner_pane)
inner_window:perform_action(
act.PromptInputLine({
description = title,
initial_value = tostring(initial_value),
description = title .. " (현재: " .. tostring(initial_value) .. ")",
action = wezterm.action_callback(function(cb_window, cb_pane, line)
if not line or line == "" then
return
@@ -296,9 +295,9 @@ end
-- (WezTerm에는 입력칸을 여러 개 한 화면에 배치하는 폼 위젯이 없어, 한 줄짜리
-- PromptInputLine을 단계별로 이어서 띄우는 방식으로 흉내낸다)
local ssh_domain_steps = {
{ field = "name", title = "SSH 이름 (1/3, 예: prod)", initial_value = "" },
{ field = "remote_address", title = "SSH 주소 (2/3, 예: myserver.example.com)", initial_value = "" },
{ field = "username", title = "SSH 사용자명 (3/3, 예: ubuntu)", initial_value = "" },
{ field = "name", title = "SSH 이름 (1/3, 예: prod)" },
{ field = "remote_address", title = "SSH 주소 (2/3, 예: myserver.example.com)" },
{ field = "username", title = "SSH 사용자명 (3/3, 예: ubuntu)" },
}
local function prompt_ssh_domain_step(window, pane, step_index, data)
@@ -308,7 +307,6 @@ local function prompt_ssh_domain_step(window, pane, step_index, data)
inner_window:perform_action(
act.PromptInputLine({
description = step.title,
initial_value = step.initial_value,
action = wezterm.action_callback(function(cb_window, cb_pane, line)
if not line or line == "" then
notify(cb_window, "SSH 도메인 추가를 취소했습니다")