Skip to content

Conversation

@echarles
Copy link
Member

@echarles echarles commented Dec 8, 2025

No description provided.

@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for datalayer-core failed. Why did it fail? →

Name Link
🔨 Latest commit 6cd89cb
🔍 Latest deploy log https://app.netlify.com/projects/datalayer-core/deploys/69393adfd1eb8d0008794fc2

@echarles echarles changed the title Feat: chat2 Prune AI related (moved to agent-runtiems) Dec 10, 2025
@echarles echarles changed the title Prune AI related (moved to agent-runtiems) Prune AI related features and move them to agent-runtimes Dec 10, 2025
@echarles echarles marked this pull request as ready for review December 10, 2025 09:20
Copilot AI review requested due to automatic review settings December 10, 2025 09:20
Copy link

Copilot AI left a comment

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 performs a significant cleanup by removing AI-related features from the core package and migrating them to agent-runtimes. This is a substantial architectural change that reduces the scope and dependencies of the core package.

Key changes:

  • Removed all AI agent infrastructure including chat handlers, MCP integration, and pydantic-ai dependencies
  • Removed frontend AI components including CopilotKit integration, chat UI, and tool adapters
  • Added document creation functionality to the cache hook
  • Updated brand URLs from datalayer.io to datalayer.ai
  • Improved PasswordResetRequest model with password fields

Reviewed changes

Copilot reviewed 53 out of 54 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json Removed AI SDK dependencies (@ai-sdk/react, @copilotkit/*), updated @jupyterlab/services version management, reorganized example scripts
pyproject.toml Removed pydantic-ai and LLM provider dependencies (anthropic, openai)
vite.config.ts, vite.examples.config.ts Added keytar to external dependencies and optimizeDeps exclusions
src/vite-env.d.ts Added ImportMetaEnv interface for EXAMPLE environment variable
src/main.tsx Added defensive null check for root element
src/index.ts Added theme exports
src/tools/* Complete removal of tool adapters for notebook and lexical (AgUI/CopilotKit integration)
src/hooks/* Removed useAIAgents, useNotebookAIAgent, useAIJupyterChat hooks
src/hooks/useCache.ts Added useCreateDocument hook, changed invalidateQueries to refetchQueries for immediate updates
src/hooks/index.ts Removed AI-related hook exports
src/state/substates/* Removed AIAgentState
src/models/* Removed AIAgent model
src/components/chat/* Complete removal of chat components and display parts
src/examples/* Removed AgUiNotebookExample, AgUiLexicalExample, ChatExample
src/examples/example-selector.ts Removed AI example entries
datalayer_core/agents/* Complete removal of agent infrastructure (chat agent, MCP tools, models, utils)
datalayer_core/handlers/chat/* Complete removal of chat handlers (chat, configure, MCP, tools)
datalayer_core/base/serverapplication.py Removed chat/MCP initialization, updated brand URLs to datalayer.ai
datalayer_core/models/iam.py Enhanced PasswordResetRequest with password and password_confirm fields
datalayer_core/version.py Version bump to 1.1.14

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +138 to +156
"https://datalayer.ai/support",
config=True,
help=("Support URL."),
)

pricing_url = Unicode(
"https://datalayer.io/pricing",
"https://datalayer.ai/pricing",
config=True,
help=("Pricing URL."),
)

terms_url = Unicode(
"https://datalayer.io/terms",
"https://datalayer.ai/terms",
config=True,
help=("Terms URL."),
)

privacy_url = Unicode(
"https://datalayer.io/privacy",
"https://datalayer.ai/privacy",
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The brand URLs are being updated from datalayer.io to datalayer.ai (lines 138, 144, 150, 156). Ensure that:

  1. These new URLs are live and properly redirected
  2. Any hardcoded references to datalayer.io elsewhere in the codebase are also updated
  3. Documentation and external links are updated accordingly

This appears to be a rebranding effort that should be consistent across the entire project.

Copilot uses AI. Check for mistakes.
"watch:lib": "run-p 'watch:lib:*'",
"watch:lib:res": "gulp resources-to-lib-watch",
"watch:lib:src": "tsc -b -w",
"type-check:watch": "tsc -b -w --noEmit",
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The examples script now includes jupyter:start as a dependency via run-p, but the removed examples:chat and examples:chat:vite scripts also used run-p jupyter:start. Consider documenting:

  1. Why the chat examples needed a separate script
  2. Whether the unified examples script now covers all use cases
  3. Any differences in setup that developers should be aware of when running examples

This helps future maintainers understand the script reorganization.

Suggested change
"type-check:watch": "tsc -b -w --noEmit",
"type-check:watch": "tsc -b -w --noEmit",
"//": "Script reorganization note: Previously, chat examples used separate scripts (examples:chat, examples:chat:vite) with run-p jupyter:start. Now, the unified 'examples' script runs both the Jupyter server and Vite for all examples.",
"//": "1. The chat examples needed separate scripts to ensure the Jupyter server was started before launching the chat UI, which had specific dependencies.",
"//": "2. The unified 'examples' script now covers all previous use cases, including chat and other examples, by running both jupyter:start and examples:vite in parallel.",
"//": "3. Developers should ensure the Jupyter server is running and accessible at http://localhost:8888 before launching examples. If custom configuration is needed, adjust VITE_DATALAYER_RUN_URL or jupyter:start as appropriate.",

Copilot uses AI. Check for mistakes.
"@jupyterlab/documentsearch": "^4.5.0",
"@jupyterlab/rendermime": "^4.5.0",
"@jupyterlab/services": "7.4.5",
"@jupyterlab/services": "^7.0.0",
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The removal of the @jupyterlab/services version override in the overrides section while keeping it in dependencies with ^7.0.0 is inconsistent with the previous pinned version approach. Previously, the package was explicitly pinned to 7.4.5 in both places.

If the pin was intentional to work around an issue, removing it from overrides while changing the main dependency to use a caret range could introduce version conflicts or break compatibility. Consider whether the version should remain pinned or if the upgrade to unpinned ^7.0.0 has been tested thoroughly.

Copilot uses AI. Check for mistakes.
Comment on lines +61 to +64
password: str = Field(..., description="New password")
password_confirm: str = Field(
..., alias="passwordConfirm", description="Password confirmation"
)
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

Adding password and password_confirm fields to PasswordResetRequest changes its API contract. This model name suggests it's for initiating a password reset (usually requiring only a handle/email), not for completing one.

The naming is now inconsistent with PasswordResetConfirm (lines 67-71) which also contains new password fields. Consider:

  1. If this is meant for initiating resets, it should only have handle
  2. If it's for completing resets with passwords, it should include a reset token and possibly be renamed to avoid confusion with PasswordResetConfirm

This could be a breaking change for any existing password reset flows.

Suggested change
password: str = Field(..., description="New password")
password_confirm: str = Field(
..., alias="passwordConfirm", description="Password confirmation"
)

Copilot uses AI. Check for mistakes.
Copy link
Member Author

@echarles echarles left a comment

Choose a reason for hiding this comment

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

LGTM

@echarles echarles merged commit 53e42ad into main Dec 12, 2025
17 of 30 checks passed
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