@plannotator/pi-extension 0.15.0 → 0.15.2

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.
@@ -30,6 +30,7 @@ export async function startAnnotateServer(options: {
30
30
  htmlContent: string;
31
31
  origin?: string;
32
32
  mode?: string;
33
+ folderPath?: string;
33
34
  sharingEnabled?: boolean;
34
35
  shareBaseUrl?: string;
35
36
  pasteApiUrl?: string;
@@ -71,7 +72,7 @@ export async function startAnnotateServer(options: {
71
72
  shareBaseUrl,
72
73
  pasteApiUrl,
73
74
  repoInfo,
74
- projectRoot: process.cwd(),
75
+ projectRoot: options.folderPath || process.cwd(),
75
76
  });
76
77
  } else if (url.pathname === "/api/image") {
77
78
  handleImageRequest(res, url);
@@ -156,7 +156,7 @@ export async function startReviewServer(options: {
156
156
  let aiSessionManager: { disposeAll: () => void } | null = null;
157
157
  let aiRegistry: { disposeAll: () => void } | null = null;
158
158
  try {
159
- const ai = await import("@plannotator/ai");
159
+ const ai = await import("../generated/ai/index.js");
160
160
  const registry = new ai.ProviderRegistry();
161
161
  const sessionManager = new ai.SessionManager();
162
162
 
@@ -177,7 +177,7 @@ export async function startReviewServer(options: {
177
177
  // Claude Agent SDK
178
178
  try {
179
179
  // @ts-ignore — dynamic import; Bun-only types resolved at runtime
180
- await import("@plannotator/ai/providers/claude-agent-sdk");
180
+ await import("../generated/ai/providers/claude-agent-sdk.js");
181
181
  const claudePath = whichCmd("claude");
182
182
  const provider = await ai.createProvider({
183
183
  type: "claude-agent-sdk",
@@ -192,7 +192,7 @@ export async function startReviewServer(options: {
192
192
  // Codex SDK
193
193
  try {
194
194
  // @ts-ignore — dynamic import; Bun-only types resolved at runtime
195
- await import("@plannotator/ai/providers/codex-sdk");
195
+ await import("../generated/ai/providers/codex-sdk.js");
196
196
  await import("@openai/codex-sdk");
197
197
  const codexPath = whichCmd("codex");
198
198
  const provider = await ai.createProvider({
@@ -207,7 +207,7 @@ export async function startReviewServer(options: {
207
207
 
208
208
  // Pi SDK (Node.js variant)
209
209
  try {
210
- await import("@plannotator/ai/providers/pi-sdk-node");
210
+ await import("../generated/ai/providers/pi-sdk-node.js");
211
211
  const piPath = whichCmd("pi");
212
212
  if (piPath) {
213
213
  const provider = await ai.createProvider({
@@ -229,7 +229,7 @@ export async function startReviewServer(options: {
229
229
  // OpenCode SDK
230
230
  try {
231
231
  // @ts-ignore — dynamic import; Bun-only types resolved at runtime
232
- await import("@plannotator/ai/providers/opencode-sdk");
232
+ await import("../generated/ai/providers/opencode-sdk.js");
233
233
  const opencodePath = whichCmd("opencode");
234
234
  if (opencodePath) {
235
235
  const provider = await ai.createProvider({