coder / coder/claudecode.nvim

[FEATURE] Expose terminal variable

オープン
#309 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
needs-triage
主要言語
Lua
スター
3.1k
フォーク
216
PR マージ指標
30日以内にマージされた PR はありません

説明

## Feature Description

When we call ClaudeCode, it creates a terminal
` local terminal_ok, terminal = pcall(require, "claudecode.terminal")`
but the only way to access it is via user commands.
Feature would be to expose it.

## Use Case

Anyone who wants to make any code interacting with claude API.

Example:
https://github.com/ilan-schemoul/nvim-config/commit/e95797a601958929acea7f60641e09a481fd39ab#diff-7a87cf1458c4f35acd87b922d094f8f80580bdbf2fee6b36dc332db086e1b289R30

User commands are not to be made for programatic interactions as the name suggests.

If I require("claudecode/terminal") it spans up another terminal if I do toggle or whatever.

## Proposed Solution

require("claude").get_terminal() (or get_terminal_interface()) would return the created terminal

## Alternatives Considered

workaround is calling user commands. It sucks, you are limited compared to API, you have no LSP helping you, it's weird and you have to escape characters sometimes (or i think you can provide with { args = txt } the text and no need to escape. but anyway it's confusing).

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start by tracing where ClaudeCode creates and stores the terminal, including the claudecode.terminal module referenced in the issue, and compare it with the existing user-command entry points. Done means a public accessor returns the already-created terminal for programmatic use without creating a second terminal; verify the existing terminal behavior remains unchanged.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua
領域
tooling
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
62/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。