@dmsdc-ai/aigentry-telepty 0.1.33 → 0.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/daemon.js +11 -6
  2. package/package.json +1 -1
package/daemon.js CHANGED
@@ -429,12 +429,13 @@ function findKittyWindowId(socket, sessionId) {
429
429
  for (const osw of data) {
430
430
  for (const tab of osw.tabs) {
431
431
  for (const w of tab.windows) {
432
- const cmds = (w.foreground_processes || []).map(p => (p.cmdline || []).join(' ')).join(' ');
433
- // Check full process tree cmdline for session ID
434
- if (cmds.includes(sessionId)) return w.id;
435
- // Also check the window's own cmdline/title
436
- const allCmds = JSON.stringify(w);
437
- if (allCmds.includes(sessionId)) return w.id;
432
+ // Only check process cmdlines for --id SESSION_ID pattern (not output text)
433
+ for (const p of (w.foreground_processes || [])) {
434
+ const cmd = (p.cmdline || []).join(' ');
435
+ if (cmd.includes('--id ' + sessionId) || cmd.includes('--id=' + sessionId)) {
436
+ return w.id;
437
+ }
438
+ }
438
439
  }
439
440
  }
440
441
  }
@@ -607,6 +608,10 @@ app.post('/api/sessions/:id/inject', (req, res) => {
607
608
  if (from && !prompt.startsWith('[from:')) {
608
609
  finalPrompt = `[from: ${from}] [reply-to: ${reply_to}] ${prompt}`;
609
610
  }
611
+ // Append reply guide when reply_to is set (self-contained reply instructions)
612
+ if (reply_to && reply_to !== id) {
613
+ finalPrompt += `\n\n---\n[reply-to: ${reply_to}] 위 세션에 회신이 필요합니다. 답변 시 아래 명령을 실행하세요:\ntelepty inject --from ${id} ${reply_to} "답변 내용"\n---`;
614
+ }
610
615
  const inject_id = crypto.randomUUID();
611
616
  try {
612
617
  // Always inject text WITHOUT \r first, then send \r separately after delay
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmsdc-ai/aigentry-telepty",
3
- "version": "0.1.33",
3
+ "version": "0.1.35",
4
4
  "main": "daemon.js",
5
5
  "bin": {
6
6
  "aigentry-telepty": "install.js",