chore(rebrand): phase 4a — rename AI hooks and fetch identifiers#143
Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
CodeAnt AI finished reviewing your PR. |
|
@CodeAnt-AI review |
|
CodeAnt AI is running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis PR rebrands the client-side AI streaming pipeline from StoryCraft to WorldScript, updating the hook, completion adapter, and model factory identifiers while keeping the underlying behavior the same. sequenceDiagram
participant UI
participant WorldScriptAIHook as WorldScript AI hook
participant CompletionAdapter as WorldScript completion fetch
participant ModelFactory
participant AIProvider as External AI provider
UI->>WorldScriptAIHook: Request AI completion
WorldScriptAIHook->>CompletionAdapter: Start WorldScript completion request
CompletionAdapter->>ModelFactory: Resolve model for provider
ModelFactory->>AIProvider: Invoke language model with prompt
AIProvider-->>CompletionAdapter: Stream completion tokens
CompletionAdapter-->>WorldScriptAIHook: Return streamed text
WorldScriptAIHook-->>UI: Emit incremental updates to writer and copilot
Generated by CodeAnt AI |
|
CodeAnt AI finished running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
@CodeAnt-AI review |
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis PR rebrands the StoryCraft AI streaming pipeline to WorldScript naming while keeping the core flow the same: UI hooks call a WorldScript-specific hook, which uses an internal completion fetch to build a language model and stream text from the configured AI provider. sequenceDiagram
participant UI as Writer or Copilot UI
participant Hook as WorldScript AI hook
participant Fetch as WorldScript completion fetch
participant Factory as Model factory
participant Provider as AI provider
UI->>Hook: Request AI completion
Hook->>Fetch: Send completion request to internal endpoint
Fetch->>Factory: Resolve model config from provider and settings
Factory-->>Fetch: Return language model instance
Fetch->>Provider: Stream completion with prompt and options
Provider-->>Fetch: Return text stream
Fetch-->>Hook: Stream completion chunks
Hook-->>UI: Update UI with streaming AI output
Generated by CodeAnt AI |
…atalog (#143) featureCatalog.ts referenced the renamed hook by its old path 'hooks/useStoryCraftAI.ts'. Update to 'hooks/useWorldScriptAI.ts'. This was the only remaining reference to the old StoryCraft AI identifiers — the hook/fetch rename is otherwise complete (zero code importers of the legacy names). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
@CodeAnt-AI review |
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis PR rebrands the client-side AI streaming path from StoryCraft to WorldScript by renaming the AI hook, completion fetch, and provider factory identifiers while keeping the streaming flow and behavior the same. sequenceDiagram
participant WriterUI as Writer or Copilot UI
participant WSAIHook as WorldScript AI hook
participant Completion as WorldScript completion fetch
participant Factory as Provider factory
participant AISDK as AI SDK
WriterUI->>WSAIHook: Start completion with prompt
WSAIHook->>Completion: Request completion via internal WorldScript URL
Completion->>Factory: Resolve model config from provider and settings
Factory->>AISDK: Create language model with WorldScript fetch
Completion->>AISDK: Stream text for prompt
AISDK-->>WSAIHook: Streamed tokens
WSAIHook-->>WriterUI: Update UI with incremental text
Generated by CodeAnt AI |
…rldScript identifiers
- Add WorldScript aliases in fetchAdapter.ts so providerFactory and the barrel can import createWorldScriptFetch / WorldScriptFetchOptions. - Update providerFactory.test.ts to use createLanguageModelForWorldScript and mock createWorldScriptFetch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CodeAnt (test-determinism rule): the createWorldScriptFetch mock returned the real globalThis.fetch, coupling the suite to runtime network behaviour. Return a deterministic vi.fn fake instead. No assertion depends on the returned value (the factory only passes it through to the SDK; it is never invoked in-test). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…atalog (#143) featureCatalog.ts referenced the renamed hook by its old path 'hooks/useStoryCraftAI.ts'. Update to 'hooks/useWorldScriptAI.ts'. This was the only remaining reference to the old StoryCraft AI identifiers — the hook/fetch rename is otherwise complete (zero code importers of the legacy names). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
7c68a75 to
f181a2b
Compare
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
…s-ai # Conflicts: # services/ai/providerFactory.ts # tests/unit/ai/worldScriptCompletionFetch.test.ts # tests/unit/providerFactory.test.ts
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
User description
Summary
Part of the StoryCraft → WorldScript rebrand split. This PR renames AI-related hooks and fetch utilities to use the WorldScript identifier.
Changes
hooks/useStoryCraftAI.ts→hooks/useWorldScriptAI.tsservices/ai/storyCraftCompletionFetch.ts→services/ai/worldScriptCompletionFetch.tsScope
Related
CodeAnt-AI Description
Rename the AI streaming flow to WorldScript across the app
What Changed
Impact
✅ Clearer WorldScript branding✅ Fewer outdated AI error messages✅ Smooth rebrand rollout without changing AI behavior💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.