-
Notifications
You must be signed in to change notification settings - Fork 7
Chatgpt #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Chatgpt #6
Conversation
- Removed the ReactRouterChatSDKBootstrap component from the root layout. - Updated the catch-all route to throw a 404 response for unmatched URLs. - Simplified the NotFound component to utilize the GeneralErrorBoundary for error handling. - Adjusted routes to include 'index.html' for better routing consistency.
- Removed the initial route discovery mode from the React Router configuration. - Updated Vite configuration to define a BUILD_TIMESTAMP instead of BUILD_VERSION. - Cleaned up the root layout by removing the suppressHydrationWarning attribute from the HTML tag. - Deleted the unused test route and its associated component. - Enhanced CORS headers in the worker to conditionally allow specific methods and headers based on the request URL. - Updated widget versioning to use BUILD_TIMESTAMP for consistency.
- Updated routing to serve the new chat-gpt-app component at /index.html. - Introduced chat-gpt-app.tsx with a client loader and a simple UI widget for interaction. - Removed the previous route configuration for index.html in favor of the new implementation. - Adjusted widget registration to reflect the new routing structure.
}), | ||
) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Promise Nesting and Direct API Access
The sendMcpMessage
function's new tool
type handling resolves its promise with a nested promise, rather than the final value. It also directly accesses window.openai
and its methods without checking for their existence, which can cause runtime errors, and bypasses the standard message system's error handling and response schema validation.
import { type Route } from './+types/journal-viewer.tsx' | ||
|
||
export async function clientLoader({ request }: Route.ClientLoaderArgs) { | ||
export async function clientLoader() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Client Loader Missing Request Object
The clientLoader
no longer receives the request
object, which means waitForRenderData
loses its signal
option. This removes request cancellation support, potentially causing memory leaks, unnecessary network requests, and race conditions if a user navigates away.
Note
Adds Apps SDK compatibility (adapter + widgets) with a new ChatGPT-hosted UI route, overhauls design tokens, and updates build/config/deps (incl. staging env, CORS, and Vite base).
#app/utils/mcp-ui-compat.client.ts
to adapt MCP-UI messages to OpenAI Apps SDK (window.openai.*
) and provide render-data bridging.routes/chat-gpt-app/index.tsx
to render entries and support delete via MCP tool.#app/utils/mcp.ts
to use Apps SDK for tool calls and render data; simplify waiting logic.worker/mcp/widgets.ts
and register widgets viaregisterWidgets
inEpicMeMCP.init()
; provide versionedui://widget/...
resources.worker/mcp/tools.ts
(comment outview_journal
,view_entry
,update_entry
,update_tag
).app/app.css
: system fonts,color-scheme: light dark
, transparent backgrounds, light/dark tokens vialight-dark()
, larger radius, simplified typography scale and container spacing.index.html
route mapping toroutes/chat-gpt-app/index.tsx
; setrouteDiscovery: initial
.<meta name="color-scheme" content="light dark" />
; log errors inErrorBoundary
.vite.config.ts
: env-basedbase
,BUILD_TIMESTAMP
, Cloudflare headers/redirects dev support.public/_headers
.wrangler.jsonc
: addstaging
env with separate DB/KV; types updated.build:staging
,deploy:staging
(viacross-env
).@modelcontextprotocol/sdk
,react-router
,wrangler
, Cloudflare plugins, ESLint/types); addcross-env
.Written by Cursor Bugbot for commit 87a4615. This will update automatically on new commits. Configure here.