diff --git a/.codex/skills/thread-naming/SKILL.md b/.codex/skills/thread-naming/SKILL.md index a2e6a44..06e0fab 100644 --- a/.codex/skills/thread-naming/SKILL.md +++ b/.codex/skills/thread-naming/SKILL.md @@ -16,7 +16,7 @@ Keep thread titles short and useful for later resume lists. ## How to Rename -- If the client exposes a thread rename or `thread/setName` capability, use it with the concise title. +- If the client exposes a thread rename or `thread/name/set` capability, use it with the concise title. - If only Telegram commands are available, tell the user the exact `/rename TITLE` command to run. - If no rename mechanism is available, include a short suggested title in the final answer. diff --git a/internal/codexapp/client.go b/internal/codexapp/client.go index 0e6d6c3..9ec7299 100644 --- a/internal/codexapp/client.go +++ b/internal/codexapp/client.go @@ -229,7 +229,7 @@ func (c *Client) SetThreadName(ctx context.Context, threadID, name string) error return err } var ignored json.RawMessage - return c.call(ctx, "thread/setName", map[string]any{ + return c.call(ctx, "thread/name/set", map[string]any{ "threadId": threadID, "name": name, }, &ignored) diff --git a/internal/codexapp/client_test.go b/internal/codexapp/client_test.go index 0fad9f3..290513b 100644 --- a/internal/codexapp/client_test.go +++ b/internal/codexapp/client_test.go @@ -91,14 +91,14 @@ func TestClientWebSocketUnixJSONRPC(t *testing.T) { serverDone <- err return } - if setName["method"] != "thread/setName" { - serverDone <- unexpectedMessage("thread/setName", setName["method"]) + if setName["method"] != "thread/name/set" { + serverDone <- unexpectedMessage("thread/name/set", setName["method"]) return } params := setName["params"].(map[string]any) if params["threadId"] != "thr_1" || params["name"] != "Short title" { payload, _ := json.Marshal(params) - serverDone <- unexpectedMessage("thread/setName params", string(payload)) + serverDone <- unexpectedMessage("thread/name/set params", string(payload)) return } if err := conn.WriteJSON(map[string]any{"id": setName["id"], "result": map[string]any{}}); err != nil {