Skip to content

chore(locadex): Migrate to sdk#416

Merged
brian-lou merged 3 commits intomainfrom
b/locadex/v1.2
Jun 18, 2025
Merged

chore(locadex): Migrate to sdk#416
brian-lou merged 3 commits intomainfrom
b/locadex/v1.2

Conversation

@brian-lou
Copy link
Copy Markdown
Contributor

No description provided.

@brian-lou brian-lou requested a review from a team as a code owner June 18, 2025 23:55
@vercel
Copy link
Copy Markdown

vercel bot commented Jun 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gt-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 0:02am
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
example-ai-chatbot ⬜️ Ignored (Inspect) Jun 19, 2025 0:02am
example-create-react-app ⬜️ Ignored (Inspect) Jun 19, 2025 0:02am
example-gt-next-starter ⬜️ Ignored (Inspect) Jun 19, 2025 0:02am
example-next-create-app ⬜️ Ignored (Inspect) Jun 19, 2025 0:02am
example-vite-create-app ⬜️ Ignored (Inspect) Jun 19, 2025 0:02am

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Major refactoring of the Locadex package to migrate from CLI-based Claude integration to the official @anthropic-ai/claude-code TypeScript SDK.

  • Removed packages/locadex/src/types/claude-sdk.ts and migrated to official SDK types
  • Refactored packages/locadex/src/utils/claudeCode.ts to use SDK instead of child_process.spawn
  • Simplified MCP server configuration in packages/locadex/src/utils/locadexManager.ts with new SDK integration
  • Unified translation status logging with spinner approach in packages/locadex/src/tasks/i18n.ts
  • Streamlined error handling to use stdout instead of stderr for translation errors

7 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile

Comment on lines +318 to +320
} finally {
// pass
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Empty finally block with just a comment. Either remove the try/finally or add necessary cleanup code.

Suggested change
} finally {
// pass
}
try {
for await (const message of query({
prompt,
abortController: combinedController,
options: queryOptions,
})) {
const result = this.handleSDKOutput(message, _obs);
if (!result.success) {
throw new AgentProcessError(
`[${this.id}] Claude Code error: ${result.error}`,
undefined
);
}
}
}

Comment on lines +154 to +156
// if (!this.debug) {
// return;
// }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: commented-out debug check prevents initialization of required state files. Either remove the commented code or implement the debug-only logic properly

Suggested change
// if (!this.debug) {
// return;
// }
// ==== DEBUG Settings ====

@brian-lou brian-lou merged commit 1542aad into main Jun 18, 2025
6 of 8 checks passed
@brian-lou brian-lou deleted the b/locadex/v1.2 branch June 18, 2025 23:57
@github-actions github-actions bot mentioned this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant