Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cyan-ties-create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@callstack/tracesift": patch
---

bundle dynamically imported pi files
5 changes: 5 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ const nextConfig: NextConfig = {
// server bundle and load it with native Node resolution.
serverExternalPackages: ["@callstack/tracesift", "@earendil-works/pi-coding-agent", "agent-react-devtools"],
outputFileTracingIncludes: {
"/api/model/oauth": [
// pi-ai loads provider OAuth implementations from computed module paths,
// which Next.js output tracing cannot discover statically.
"./node_modules/**/@earendil-works/pi-ai/dist/auth/oauth/**/*.js",
],
"/api/analyze/react": [
"./node_modules/agent-react-devtools/dist/**/*.js",
"./node_modules/agent-react-devtools/dist/profile-offline-LICENSE.txt",
Expand Down
4 changes: 4 additions & 0 deletions scripts/package-standalone.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ async function main() {
await assertDirectory(join(root, '.next/static'));
await assertDirectory(join(root, 'public'));
await assertFile(join(source, 'node_modules/@earendil-works/pi-coding-agent/package.json'));
await assertFile(join(source, 'node_modules/@earendil-works/pi-coding-agent/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js'));
await assertFile(join(source, 'node_modules/@earendil-works/pi-coding-agent/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js'));
await assertFile(join(source, 'node_modules/agent-react-devtools/package.json'));
await assertFile(join(source, 'node_modules/agent-react-devtools/dist/profile-offline.js'));
await assertFile(join(source, 'node_modules/agent-react-devtools/dist/profile-offline-LICENSE.txt'));
Expand All @@ -86,6 +88,8 @@ async function main() {
'node_modules/@callstack/tracesift/src/bootstrap.js',
'node_modules/@callstack/tracesift/src/runtime.js',
'node_modules/@earendil-works/pi-coding-agent/package.json',
'node_modules/@earendil-works/pi-coding-agent/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js',
'node_modules/@earendil-works/pi-coding-agent/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js',
'node_modules/agent-react-devtools/dist/profile-offline.js',
]) await assertFile(join(stage, file));

Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,9 @@ function InspectorApp() {
if (next.event?.type === 'auth_url' && next.event.url && oauthPopup.current && !oauthPopupNavigated.current) { oauthPopupNavigated.current = true; oauthPopup.current.location.href = next.event.url; }
if (next.status === 'complete' && settings) {
setModelStatus(settings);
oauthPopup.current?.close();
setModelSettingsMessage({ tone: 'success', text: 'Subscription connected. Choose a model and save it to use this connection.' });
}
if (next.status !== 'pending') oauthPopup.current?.close();
// Keep the attempt pending until refreshed settings are ready. Changing it
// earlier tears down this effect and discards the settings response.
setOauthAttempt(next);
Expand Down
Loading