Skip to content

Migrate to Pyndatic AI v2 - #111

Open
echarles wants to merge 31 commits into
mainfrom
fix/build-4
Open

Migrate to Pyndatic AI v2#111
echarles wants to merge 31 commits into
mainfrom
fix/build-4

Conversation

@echarles

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 25, 2026 07:59
@netlify

netlify Bot commented Jul 25, 2026

Copy link
Copy Markdown

Deploy Preview for agent-runtimes failed.

Name Link
🔨 Latest commit fa787a8
🔍 Latest deploy log https://app.netlify.com/projects/agent-runtimes/deploys/6a70c76470e73c0008cb7f3e

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses TypeScript build issues in the examples2 notebook mutation demos by adjusting the typing around the placeholder ServiceManagerLess instance used before a real JupyterLab ServiceManager is created.

Changes:

  • Widen serviceManager React state type to allow storing either a real ServiceManager.IManager or the ServiceManagerLess placeholder.
  • Add as ServiceManager.IManager assertions when passing serviceManager into the Notebook component to satisfy its prop type.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/examples2/NotebookMutationsServiceManager.tsx Widen serviceManager state type to include ServiceManagerLess and cast back to IManager when rendering <Notebook/>.
src/examples2/NotebookMutationsKernel.tsx Same typing adjustment and cast to resolve build typing issues for the kernel mutations example.
Comments suppressed due to low confidence (2)

src/examples2/NotebookMutationsServiceManager.tsx:201

  • serviceManager is asserted to ServiceManager.IManager here even though the component state allows ServiceManagerLess. If ServiceManagerLess doesn’t actually implement all of IManager, this can lead to runtime failures inside <Notebook/> while still compiling cleanly.

Prefer narrowing/guarding so <Notebook/> only receives a real ServiceManager.IManager, or refactor the placeholder manager so it truly conforms to IManager rather than relying on as casts.

            onSessionConnection={onSessionConnection}
            readonly={readonly}
            serviceManager={serviceManager as ServiceManager.IManager}
          />

src/examples2/NotebookMutationsKernel.tsx:200

  • serviceManager is cast to ServiceManager.IManager here even though the component state allows ServiceManagerLess. This bypasses compile-time checking and can cause runtime failures if <Notebook/> uses IManager members that ServiceManagerLess doesn’t implement.

Prefer ensuring serviceManager is truly an IManager before rendering/passing it, rather than asserting the type at the call site.

            onSessionConnection={onSessionConnection}
            readonly={readonly}
            serviceManager={serviceManager as ServiceManager.IManager}
          />

Comment thread src/examples2/NotebookMutationsServiceManager.tsx Outdated
Comment thread src/examples2/NotebookMutationsKernel.tsx Outdated
@echarles echarles changed the title fix:build Migrate to Pyndatic AI 2 Jul 30, 2026
@echarles echarles changed the title Migrate to Pyndatic AI 2 Migrate to Pyndatic AI v2 Jul 30, 2026
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.

2 participants