Bscholar/pi rpc #2812
Closedbscholar-tt(GitHub profile, opens in a new tab)wants to merge 38 commits into
main fromrefs/pull/2812/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
bscholar-tt(GitHub profile, opens in a new tab) closed this
- @@ -161,4 +161,4 @@161161 const displayName = branding.displayName;162162 const stateDir = path.join(baseDir, isDevelopment ? "dev" : "userdata");163163 const userDataDirName = isDevelopment ? "t3code-dev" : "t3code";164- const legacyUserDataDirName = isDevelopment ? "T3 Code (Dev)" : "T3 Code (Alpha)";164+ const legacyUserDataDirName = isDevelopment ? "T3 Code (Dev)" : "T3 Code (Bscholar)";@@ -0,0 +707,21 @@707+ ),708+ );709+ }710+711+ const startedAt = yield* nowIso;712+ const threadId = input.threadId;713+ const modelSelection =714+ input.modelSelection !== undefined && input.modelSelection.instanceId === boundInstanceId715+ ? input.modelSelection716+ : undefined;717+718+ const piResumeState = readPiResumeState(input.resumeCursor);719+ const baseCwd = input.cwd ?? serverConfig.cwd;720+721+ const spawnArgs: string[] = ["--mode", "rpc"];722+ if (piResumeState) {723+ spawnArgs.push("--session", piResumeState.sessionFile);724+ }725+ if (modelSelection?.model) {726+ spawnArgs.push("--model", modelSelection.model);727+ }@@ -0,0 +913,21 @@913+ activeTurnId: turnId,914+ updatedAt: turnStartedAt,915+ };916+917+ const turnStartedStamp = yield* makeEventStamp();918+ yield* offerRuntimeEvent({919+ type: "turn.started",920+ eventId: turnStartedStamp.eventId,921+ provider: PROVIDER,922+ createdAt: turnStartedStamp.createdAt,923+ threadId: context.session.threadId,924+ turnId,925+ payload: {},926+ providerRefs: {},927+ });928+929+ const promptText = typeof input.input === "string" ? input.input : "";930+931+ yield* context.writeCommand({ type: "prompt", message: promptText }).pipe(932+ Effect.catchDefect(() => completeTurn(context, "failed", "Failed to send prompt.")),933+ );@@ -145,10 +53,13 @@145- echo "cli_dist_tag=latest" >> "$GITHUB_OUTPUT"146- if [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then147- echo "is_prerelease=false" >> "$GITHUB_OUTPUT"148- echo "make_latest=true" >> "$GITHUB_OUTPUT"149- else150- echo "is_prerelease=true" >> "$GITHUB_OUTPUT"151- echo "make_latest=false" >> "$GITHUB_OUTPUT"152- fi53+ raw="${DISPATCH_VERSION}"54+ version="${raw#v}"55+ if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([.-][0-9A-Za-z.-]+)?$ ]]; then56+ echo "Invalid release version: $raw" >&257+ exit 115358 fi1545960+ echo "release_channel=stable" >> "$GITHUB_OUTPUT"61+ echo "version=$version" >> "$GITHUB_OUTPUT"62+ echo "tag=v$version" >> "$GITHUB_OUTPUT"63+ echo "name=T3 Code v$version" >> "$GITHUB_OUTPUT"64+ echo "is_prerelease=false" >> "$GITHUB_OUTPUT"65+ echo "make_latest=true" >> "$GITHUB_OUTPUT"@@ -993,3 +993,10 @@993993 claudeAgent: { enabled: false },994994 cursor: { enabled: false },995995 opencode: { enabled: false },996+ piAgent: {997+ enabled: true,998+ binaryPath: "",999+ homePath: "",1000+ customModels: [],1001+ launchArgs: "",1002+ },@@ -0,0 +885,21 @@885+886+ const readyStamp = yield* makeEventStamp();887+ yield* offerRuntimeEvent({888+ type: "session.state.changed",889+ eventId: readyStamp.eventId,890+ provider: PROVIDER,891+ createdAt: readyStamp.createdAt,892+ threadId,893+ payload: { state: "ready" },894+ providerRefs: {},895+ });896+897+ return { ...context.session };898+ });899+900+ const sendTurn: PiAdapterShape["sendTurn"] = Effect.fn("sendTurn")(function* (input) {901+ const context = yield* requireSession(input.threadId);902+903+ if (context.turnState) {904+ yield* completeTurn(context, "completed");905+ }@@ -550,6 +220,5 @@550220 release-assets/*.dmg551221 release-assets/*.zip552222 release-assets/*.AppImage553- release-assets/*.exe554- release-assets/*.blockmap555223 release-assets/*.yml224+ release-assets/*.tgz
- @@ -0,0 +820,21 @@820+ ),821+ );822+ context.stdoutFiber = stdoutFiber;823+824+ // Drain stderr to avoid blocking the process825+ runFork(826+ child.stderr.pipe(827+ Stream.runDrain,828+ Effect.ignore,829+ ),830+ );831+832+ // Fetch the session file path via get_state for resume cursor833+ const stateReqId = yield* Random.nextUUIDv4;834+ const stateDeferred = yield* Deferred.make<unknown, never>();835+ pendingRequests.set(stateReqId, stateDeferred);836+ yield* writeCommand({ type: "get_state", id: stateReqId });837+838+ const stateResponse = yield* Deferred.await(stateDeferred).pipe(839+ Effect.timeoutOption(5000),840+ );@@ -468,19 +190,2 @@468- with:469- app-id: ${{ secrets.RELEASE_APP_ID }}470- private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}471- owner: ${{ github.repository_owner }}472-473- - name: Checkout474- uses: actions/checkout@v6475- with:476- ref: ${{ needs.preflight.outputs.ref }}477-478- - name: Setup Bun479- uses: oven-sh/setup-bun@v2480- with:481- bun-version-file: package.json482-483- - name: Setup Node484- uses: actions/setup-node@v6485- with:486- node-version-file: package.json190+ - name: Build t3 server package191+ run: bun run build --filter=t3@@ -89,4 +89,4 @@8989 href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..800;1,9..40,300..800&display=swap"9090 rel="stylesheet"9191 />92- <title>T3 Code (Alpha)</title>92+ <title>T3 Code (Bscholar)</title>@@ -139,16 +53,7 @@139- fi140-141- echo "release_channel=stable" >> "$GITHUB_OUTPUT"142- echo "version=$version" >> "$GITHUB_OUTPUT"143- echo "tag=v$version" >> "$GITHUB_OUTPUT"144- echo "name=T3 Code v$version" >> "$GITHUB_OUTPUT"145- echo "cli_dist_tag=latest" >> "$GITHUB_OUTPUT"146- if [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then147- echo "is_prerelease=false" >> "$GITHUB_OUTPUT"148- echo "make_latest=true" >> "$GITHUB_OUTPUT"149- else150- echo "is_prerelease=true" >> "$GITHUB_OUTPUT"151- echo "make_latest=false" >> "$GITHUB_OUTPUT"152- fi53+ raw="${DISPATCH_VERSION}"54+ version="${raw#v}"55+ if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([.-][0-9A-Za-z.-]+)?$ ]]; then56+ echo "Invalid release version: $raw" >&257+ exit 115358 fi15459
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
Run ID:
89cb2b1f-0e52-4dfd-83c3-6ac95848c5d1You 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