pi-extended-teams 2.2.3 → 2.2.5

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.
package/README.md CHANGED
@@ -55,6 +55,8 @@ This works well for multi-angle code review, root-cause investigation, parallel
55
55
 
56
56
  With the editor empty, press Down to open agent navigation. Use Down/Up to move, `l` to expand large tool logs, `m` to message an agent, `i` to interrupt its currently running tool command, `x` to stop the whole agent, and Escape to return.
57
57
 
58
+ Scroll the transcript with Page Up/Page Down or the mouse wheel, including under Herdr. Press End or scroll back to the bottom to follow new output.
59
+
58
60
  The lead can invoke the same command-only behavior with `interrupt_teammate({ agent_name: "agent" })`. It keeps the agent's session, task context, and file claims intact so you can send follow-up work. In-process cancellation is cooperative and may report that it is still pending; for tmux-backed agents, success means Pi's Escape key was delivered, not that command settlement was independently confirmed.
59
61
 
60
62
  [![Inspecting and messaging a running agent](https://raw.githubusercontent.com/dantetekanem/pi-extended-teams/main/assets/pi-extended-teams-agent-navigation.png)](https://raw.githubusercontent.com/dantetekanem/pi-extended-teams/main/assets/pi-extended-teams-agent-navigation.png)
@@ -10,6 +10,7 @@ import { createAgentCommunicationTools, type SubmittedAgentReport } from "../too
10
10
  import { requireWriteAgentTeam } from "../team/roster";
11
11
  import { isPiPromptPlanningMember, shouldSuppressLeadReportInjection } from "../../src/utils/workflow-metadata";
12
12
  import { canonicalPersistedModelSlot, loadSettings, requireFavoriteModelLevel } from "../../src/utils/settings";
13
+ import { parseQualifiedModel } from "../../src/utils/model-resolution";
13
14
  import { closePersistedRecipient } from "../team/recipient-closure";
14
15
  import { generateExtensionInstanceId, generateLifecycleRunId } from "../../src/utils/lifecycle-tombstone";
15
16
  import { createLifecycleRuntime, type ShutdownTeammateOptions } from "../team/lifecycle";
@@ -784,7 +785,9 @@ export async function runReadAgentInProcess(
784
785
  if (pendingChildParent && !pendingChildController) {
785
786
  throw new Error(`Eligible nested read parent ${member.name} requires a pending child controller.`);
786
787
  }
787
- const [provider, modelId] = (member.model || "").split("/", 2);
788
+ const parsedModel = parseQualifiedModel(member.model || "");
789
+ const provider = parsedModel?.provider;
790
+ const modelId = parsedModel?.model;
788
791
  const model = provider && modelId ? ctx.modelRegistry.find(provider, modelId) : undefined;
789
792
  if (!model) {
790
793
  throw new Error(`Read agent model "${member.model}" is not available.`);
@@ -18,6 +18,7 @@ import { createReportProgressTool } from "./tools/agent-communication-tools.js";
18
18
  import { registerTaskRuntimeTools } from "./tools/task-runtime-tools.js";
19
19
  import { registerTeamTools, type TeamToolsRuntime } from "./tools/team-tools.js";
20
20
  import { canonicalPersistedModelSlot, loadSettings, requireFavoriteModelLevel } from "../src/utils/settings";
21
+ import { parseQualifiedModel } from "../src/utils/model-resolution";
21
22
  import { formatAnimatedProgress, formatContextUsage, formatElapsed, formatModelLabel } from "./ui/renderers.js";
22
23
  import type { CompletedAgentReport, RunningReadAgent } from "./runtime/types.js";
23
24
  import { createPendingChildController } from "./runtime/pending-child-controller.js";
@@ -808,7 +809,9 @@ export default function (pi: ExtensionAPI) {
808
809
  }
809
810
  const level = requireFavoriteModelLevel(loadSettings({ projectDir: queued.cwd }), queued.modelSlot);
810
811
  if (level.role !== "read") throw new Error(`Read helper ${queued.name} requires a read-* intent tier configured via /agents-favorite-models, got ${level.slot}.`);
811
- const [provider, modelId] = level.model.split("/", 2);
812
+ const parsedModel = parseQualifiedModel(level.model);
813
+ const provider = parsedModel?.provider;
814
+ const modelId = parsedModel?.model;
812
815
  const model = provider && modelId ? sessionCtx.modelRegistry?.find?.(provider, modelId) : undefined;
813
816
  if (!model) throw new Error(`Read helper model \"${level.model}\" from intent tier ${level.slot} is not available in the lead session.`);
814
817
 
@@ -466,6 +466,13 @@ export function createAgentFollowComponent(
466
466
 
467
467
  const sortedAgents = () => options.getAgents().slice().sort((a, b) => a.name.localeCompare(b.name));
468
468
 
469
+ const scrollTranscript = (delta: number) => {
470
+ if (!Number.isFinite(delta)) return;
471
+ const maxOffset = Math.max(0, lastTranscriptRows - lastBodyHeight);
472
+ offsetFromBottom = Math.max(0, Math.min(maxOffset, offsetFromBottom - Math.trunc(delta)));
473
+ tui.requestRender();
474
+ };
475
+
469
476
  const selectRelative = (delta: number) => {
470
477
  const agents = sortedAgents();
471
478
  if (agents.length === 0) return;
@@ -713,7 +720,22 @@ export function createAgentFollowComponent(
713
720
  clearInterval(refreshTimer);
714
721
  if (forwardHerdrPageKeys) tui.terminal.write("\x1b[?1000l");
715
722
  },
723
+ handleMouse(event: { type: string; wheelDelta?: number }) {
724
+ if (event.type !== "wheel") return;
725
+ scrollTranscript(event.wheelDelta ?? 0);
726
+ return { handled: true };
727
+ },
716
728
  handleInput(data: string) {
729
+ const sgrMouse = /^\x1b\[<(\d+);\d+;\d+([Mm])$/.exec(data);
730
+ const mouseButton = sgrMouse ? Number(sgrMouse[1])
731
+ : data.length === 6 && data.startsWith("\x1b[M") ? data.charCodeAt(3) - 32 : undefined;
732
+ if (mouseButton !== undefined) {
733
+ if (sgrMouse?.[2] !== "m" && mouseButton >= 64 && mouseButton <= 93) {
734
+ const wheelButton = mouseButton & ~28;
735
+ if (wheelButton === 64 || wheelButton === 65) scrollTranscript(wheelButton === 64 ? -3 : 3);
736
+ }
737
+ return;
738
+ }
717
739
  if (composingMessage) {
718
740
  if (matchesKey(data, Key.ctrl("c"))) {
719
741
  done();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-extended-teams",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "Control-first, session-connected subagents for Pi with live navigation and intent-tier routing",
5
5
  "repository": {
6
6
  "type": "git",