#6 #4445
Closedhafiezul(GitHub profile, opens in a new tab)wants to merge 11 commits into
main fromrefs/pull/4445/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
hafiezul(GitHub profile, opens in a new tab) closed this
- @@ -0,0 +8,21 @@8+Install and authenticate Pi before adding it in T3 Code:9+10+```bash11+npm install -g @earendil-works/pi-coding-agent12+pi13+```14+15+## Provider And Model Configuration16+17+Configure credentials, built-in providers, custom providers, and models in Pi. T3 Code uses the18+provider and model configuration Pi exposes, while separately managing runtime-instance settings and19+UI-only preferences.20+21+## Multiple Pi Instances22+23+T3 Code supports multiple Pi runtime instances. Use separate instances when you need isolated Pi24+configuration environments or session storage; configure the providers and models inside each Pi25+environment.26+27+An instance may optionally select a Pi configuration directory. When left empty, it uses the user's28+normal Pi configuration; when set, T3 Code passes the directory as `PI_AGENT_DIR`. Session storage@@ -0,0 +444,21 @@444+ Effect.matchEffect({445+ onFailure: (cause) =>446+ finishUnexpectedTransportFailure(447+ new PiSessionRuntimeError({448+ operation: "process-exit",449+ detail: "Could not read Pi process exit status.",450+ cause,451+ }),452+ ),453+ onSuccess: (code) =>454+ finishUnexpectedTransportFailure(455+ new PiSessionRuntimeError({456+ operation: "process-exit",457+ detail:458+ code === 0459+ ? "Pi RPC process exited."460+ : `Pi RPC process exited with code ${String(code)}.`,461+ }),462+ ),463+ }),464+ Effect.forkIn(runtimeScope),@@ -0,0 +375,21 @@375+376+ if (method === "confirm") {377+ const message = nonEmptyString(value.message) ?? title;378+ return {379+ id,380+ method,381+ question: {382+ id,383+ header: title,384+ question: message,385+ options: [386+ { label: PI_EXTENSION_CONFIRM_LABEL, description: PI_EXTENSION_CONFIRM_LABEL },387+ { label: PI_EXTENSION_CANCEL_LABEL, description: PI_EXTENSION_CANCEL_LABEL },388+ ],389+ multiSelect: false,390+ },391+ };392+ }393+394+ if (method === "select") {395+ const options = Array.isArray(value.options)@@ -105,12 +105,13 @@105105 export function buildPendingUserInputAnswers(106106 questions: ReadonlyArray<UserInputQuestion>,107107 draftAnswers: Record<string, PendingUserInputDraftAnswer>,108-): Record<string, string | string[]> | null {109- const answers: Record<string, string | string[]> = {};108+): ProviderUserInputAnswers | null {109+ const answers: Record<string, unknown> = {};110110111111 for (const question of questions) {112- const answer = resolvePendingUserInputAnswer(question, draftAnswers[question.id]);112+ const draft = draftAnswers[question.id];113+ const answer = resolvePendingUserInputAnswer(question, draft);113114 if (!answer) {114115 return null;115116 }116- answers[question.id] = answer;117+ const customAnswer = normalizeDraftAnswer(draft?.customAnswer);@@ -0,0 +6,21 @@6+ "continue",7+ "fork",8+ "mode",9+ "no-extensions",10+ "no-session",11+ "resume",12+ "session",13+ "session-dir",14+ "session-id",15+]);16+const MANAGED_SHORT_FLAGS = new Set(["-c", "-r"]);17+18+export type PiLaunchPlan =19+ | {20+ readonly _tag: "Success";21+ readonly args: ReadonlyArray<string>;22+ readonly environment: NodeJS.ProcessEnv;23+ }24+ | { readonly _tag: "Failure"; readonly message: string };25+26+export function validatePiLaunchArgs(launchArgs: string): string | undefined {@@ -0,0 +476,21 @@476+ ),477+ Effect.flatMap((encoded) =>478+ writeLock.withPermit(479+ Stream.run(Stream.encodeText(Stream.make(`${encoded}\n`)), child.stdin),480+ ),481+ ),482+ Effect.mapError((cause) =>483+ isPiSessionRuntimeError(cause)484+ ? cause485+ : new PiSessionRuntimeError({486+ operation: "write-stdin",487+ detail: "Could not write Pi RPC command.",488+ cause,489+ }),490+ ),491+ Effect.tapError((error) =>492+ error.operation === "write-stdin" ? finishUnexpectedTransportFailure(error) : Effect.void,493+ ),494+ );495+496+ const request = Effect.fn("PiSessionRuntime.request")(function* (@@ -0,0 +46,21 @@46+The first release targets provider parity for normal coding work:47+48+persistent, resumable Pi sessions49+streaming assistant text and tool activity50+image attachments51+stop/abort52+provider and model configuration53+Pi's configured enabled-tool policy54+streaming text and thinking55+tool calls, execution progress, and results56+retries, compaction, and queued work57+58+## Tool Access59+60+Pi manages tool access in the first release. Every tool enabled in the selected Pi runtime instance61+may run without a T3 Code confirmation prompt. Configure Pi's enabled and disabled tools in Pi; T362+Code does not show its usual runtime-mode selector for Pi.63+64+## Extensions65+66+Pi loads the user's normal trusted global and project-local extensions. T3 Code does not install,
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
669a5d02-f875-4e18-937a-b3c5ee16bb48You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share