Fix tmux pane injection: don't scan globally for claude panes
poc-daemon was using find_claude_pane() which scans ALL tmux panes for a 'claude' process, potentially finding unrelated sessions. Now only uses the pane ID set by poc-hook via the user/response RPC calls. If no pane is set yet, injection is skipped. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
4db7eca275
commit
a09567849f
1 changed files with 5 additions and 11 deletions
|
|
@ -78,13 +78,10 @@ impl State {
|
|||
pub fn send(&self, msg: &str) -> bool {
|
||||
let pane = match &self.claude_pane {
|
||||
Some(p) => p.clone(),
|
||||
None => match tmux::find_claude_pane() {
|
||||
Some(p) => p,
|
||||
None => {
|
||||
info!("send: no claude pane found");
|
||||
info!("send: no claude pane set (waiting for hook)");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
};
|
||||
let ok = tmux::send_prompt(&pane, msg);
|
||||
let preview: String = msg.chars().take(80).collect();
|
||||
|
|
@ -131,10 +128,7 @@ impl State {
|
|||
self.inner.decay_ewma();
|
||||
self.inner.notifications.ingest_legacy_files();
|
||||
|
||||
// Find pane if we don't have one
|
||||
if self.claude_pane.is_none() {
|
||||
self.claude_pane = tmux::find_claude_pane();
|
||||
}
|
||||
// Pane is set by poc-hook on user/response events — don't scan globally
|
||||
|
||||
// Sleep mode
|
||||
if let Some(wake_at) = self.inner.sleep_until {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue