Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lua/codex/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ M.defaults = {
on_new_file_reject = "keep_empty", -- "keep_empty" leaves an empty buffer; "close_window" closes the placeholder split
},
models = {
{ name = "デフォルト(Codex CLI の設定に従う)", value = "" },
{ name = "Default (use Codex CLI settings)", value = "" },
},
-- Codexの既定キーマップ定義
keymaps = {
Expand All @@ -44,12 +44,12 @@ M.defaults = {
{ mode = "n", lhs = "<leader>cf", rhs = "<cmd>CodexFocus<cr>", desc = "Codex: Focus" },
{ mode = "n", lhs = "<leader>cm", rhs = "<cmd>CodexMaximizeToggle<cr>", desc = "Codex: Toggle modal" },
-- 既定キーマップは動作確認済みのコマンドに限定する
{ mode = "v", lhs = "<leader>cs", rhs = "<cmd>CodexSend<cr>", desc = "Codex: 選択範囲を送信" },
{ mode = "v", lhs = "<leader>cs", rhs = "<cmd>CodexSend<cr>", desc = "Codex: Send selection" },
{
mode = "n",
lhs = "<leader>cs",
rhs = "<cmd>CodexTreeAdd<cr>",
desc = "Codex: ファイルを追加",
desc = "Codex: Add file",
-- neo-treeとoil.nvimを対象にする
filetypes = { "neo-tree", "oil" },
},
Expand Down
8 changes: 4 additions & 4 deletions lua/codex/status_indicator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ function M._build_multi_display(local_status, options, instances, server_status,
return {
text = text,
highlights = highlights,
hover_lines = { "起動中のCodexはありません" },
hover_lines = { "No Codex instances are running" },
}
end

Expand All @@ -392,11 +392,11 @@ function M._build_multi_display(local_status, options, instances, server_status,
end
local resolved_workspace = row.workspace
if type(resolved_workspace) ~= "string" or resolved_workspace == "" then
resolved_workspace = "(環境情報なし)"
resolved_workspace = "(environment unavailable)"
end
local details = { "状態:" .. status_key }
local details = { "Status: " .. status_key }
if row.is_current then
table.insert(details, "この画面")
table.insert(details, "This window")
end
if row.port then
table.insert(details, "port:" .. tostring(row.port))
Expand Down
6 changes: 3 additions & 3 deletions lua/codex/status_indicator_view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ end
---@return string[]
local function normalize_panel_lines(lines)
if type(lines) ~= "table" or #lines == 0 then
return { "起動中のCodexはありません" }
return { "No Codex instances are running" }
end
local max_lines = 10
if #lines <= max_lines then
Expand All @@ -243,7 +243,7 @@ local function normalize_panel_lines(lines)
for index = 1, max_lines do
normalized[#normalized + 1] = lines[index]
end
normalized[#normalized + 1] = string.format("... %d ", #lines - max_lines)
normalized[#normalized + 1] = string.format("... %d more", #lines - max_lines)
return normalized
end

Expand Down Expand Up @@ -548,7 +548,7 @@ function M.start()
vim.api.nvim_create_autocmd({ "VimResized", "WinResized" }, {
group = state.autocmd_group,
callback = refresh_layout,
desc = "Codex 状態表示の位置を再計算する",
desc = "Recalculate the Codex status display position",
})
end

Expand Down
4 changes: 2 additions & 2 deletions lua/codex/terminal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ function M.send(text, opts)
end

if not bufnr or not vim.api.nvim_buf_is_valid(bufnr) then
require("codex.logger").warn("terminal", "Codex ターミナルが見つからないため送信できません")
require("codex.logger").warn("terminal", "Cannot send because the Codex terminal was not found")
return false
end

Expand All @@ -859,7 +859,7 @@ function M.send(text, opts)
end

if not job_id then
require("codex.logger").warn("terminal", "Codex ターミナルのジョブIDが取得できません")
require("codex.logger").warn("terminal", "Could not get the Codex terminal job ID")
return false
end

Expand Down
2 changes: 1 addition & 1 deletion lua/codex/terminal/activity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ local function ensure_enter_mapping(bufnr)
noremap = true,
silent = true,
replace_keycodes = false,
desc = "Codex: Enter 送信時の応答開始を記録する",
desc = "Codex: Track response start when submitting with Enter",
})
enter_mapped_buffers[bufnr] = true
end
Expand Down
2 changes: 1 addition & 1 deletion lua/codex/terminal/buffer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ local function set_unfocus_keymap(bufnr, opts)
buffer = bufnr,
noremap = true,
silent = true,
desc = "Codex: ターミナルから前のウィンドウへ戻る",
desc = "Codex: Return to the previous window from the terminal",
})
end

Expand Down
8 changes: 4 additions & 4 deletions tests/unit/status_indicator_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ describe("Codex status indicator", function()
assert(#display.hover_lines == 2)
assert(display.hover_lines[1]:find("●", 1, true))
assert(display.hover_lines[1]:find("/tmp/current", 1, true))
assert(display.hover_lines[1]:find("この画面", 1, true))
assert(display.hover_lines[1]:find("This window", 1, true))
assert(display.hover_lines[2]:find("○", 1, true))
assert(display.hover_lines[2]:find("/tmp/other", 1, true))
end)
Expand All @@ -304,7 +304,7 @@ describe("Codex status indicator", function()
assert(#display.hover_lines == 1)
assert(display.hover_lines[1]:find("○", 1, true))
assert(display.hover_lines[1]:find("/tmp/local", 1, true))
assert(display.hover_lines[1]:find("この画面", 1, true))
assert(display.hover_lines[1]:find("This window", 1, true))
end)

it("接続が無くインスタンス一覧も空なら切断アイコンを表示する", function()
Expand All @@ -321,7 +321,7 @@ describe("Codex status indicator", function()

assert(display.text == "✕")
assert(#display.hover_lines == 1)
assert(display.hover_lines[1]:find("起動中のCodex", 1, true))
assert(display.hover_lines[1]:find("No Codex instances are running", 1, true))
end)

it("マルチバイトアイコンでもハイライト位置をバイト列で計算する", function()
Expand Down Expand Up @@ -427,7 +427,7 @@ describe("Codex status indicator", function()
)
assert(display.text == "● ◐")
assert(#display.highlights == 2)
assert(display.hover_lines[2]:find("状態:wait", 1, true))
assert(display.hover_lines[2]:find("Status: wait", 1, true))
end)

it("Codex画面が表示中なら下部枠モードを選ぶ", function()
Expand Down