入力受付に # チャンネル名Tab補完と直近ログ再表示を追加#142
Merged
Merged
Conversation
- cli.js: readline に completer を渡せるようにし、# 始まり入力を channelRecent ハンドラへルーティング - core.js: channelCompleter で # 入力時にチャンネル名候補を列挙 (util.channels に加え、MCP由来など util.buffer の # キーも対象) - core.js: showRecent で確定チャンネルの直近ログを再表示。SQLite優先 (channel_id 未解決時は labelKey で引き MCP由来 #claude 等も取得可)、 無効/失敗時はメモリバッファにフォールバック - #channel N で件数指定にも対応 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- sqlite-logger.js: getInjectedChannelLabels を追加。channel_id が "#" 始まり(MCP等の注入チャンネル)を DISTINCT で取得 - core.js: 起動時に SQLite から注入チャンネルラベルを読み込み、 channelCompleter の候補に追加。今セッション未受信の #claude 等も Tab 一覧に出るようになる - sqlite_logger_test.js: getInjectedChannelLabels のテストを追加 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- core.js: synthetic(post_to_stream注入)メッセージのチャンネル列に [MCP] プレフィックスを付与(既存cyanも併用)。removeEscapeSequencesで 色は落ちるがタグはログ/SQLite/TSVに残り grep 可能 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
CLI 起動時の入力受付に、チャンネル名の Tab 補完と、確定チャンネルの直近ログ再表示を追加します。
#を入力して Tab を押すとチャンネル名候補が列挙され、チャンネル名が一意に確定(展開)されると、そのチャンネルの直近受信ログを表示し直します。使い方
変更内容
lib/cli.js:readlineに completer を渡せるようにし、#始まりの入力をchannelRecentハンドラへルーティングlib/core.js:channelCompleter:#入力時にチャンネル名候補を列挙showRecent: 確定チャンネルの直近ログを再表示。SQLite優先(channel_id未解決時は labelKey で引き、MCP由来の#claude等も取得可)、無効/失敗時はメモリバッファにフォールバック#channel Nで件数指定にも対応補完候補のソース
util.channels— Slack API 由来のチャンネルutil.bufferの#キー — 今セッションで受信したチャンネル(MCPpost_to_stream含む)injectedChannelLabels— 過去セッションで SQLite に記録された注入チャンネル(起動時にgetInjectedChannelLabelsで取得)これにより、別途実装した MCP で受信した注入チャンネル(
#claude等)も補完候補に含まれ、SQLite 履歴も引けます。テスト
test/sqlite_logger_test.jsにgetInjectedChannelLabelsのテストを4件追加npm test(lint + mocha): 62 passing / lint クリーン🤖 Generated with Claude Code