Repository: jupyterlab/jupyter-chat (language: python)

Issue:
Add a model to the chat panel
This PR adds a model to the chat, which must be used to implement a chat panel.

It also provides a websocket handler extending this model, as one possible implementation of the model.

The idea of this change is to be able to create a CRDT model (based on this model) in jupyter_collaboration.


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/license-header.yml b/.github/workflows/license-header.yml
new file mode 100644
index 0000000..7ed6132
--- /dev/null
+++ b/.github/workflows/license-header.yml
@@ -0,0 +1,62 @@
+name: Fix License Headers
+
+on:
+  pull_request_target:
+
+jobs:
+  header-license-fix:
+    runs-on: ubuntu-latest
+
+    permissions:
+      contents: write
+      pull-requests: write
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Configure git to use https
+        run: git config --global hub.protocol https
+
+      - name: Checkout the branch from the PR that triggered the job
+        run: gh pr checkout ${{ github.event.pull_request.number }}
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Fix License Header
+        uses: apache/skywalking-eyes/header@v0.4.0
+        with:
+          mode: fix
+
+      - name: List files changed
+        id: files-changed
+        shell: bash -l {0}
+        run: |
+          set -ex
+          export CHANGES=$(git status --porcelain | tee modified.log | wc -l)
+          cat modified.log
+          # Remove the log otherwise it will be committed
+          rm modified.log
+
+          echo "N_CHANGES=${CHANGES}" >> $GITHUB_OUTPUT
+
+          git diff
+
+      - name: Commit any changes
+        if: steps.files-changed.outputs.N_CHANGES != '0'
+        shell: bash -l {0}
+        run: |
+          git config user.name "github-actions[bot]"
+          git config user.email "github-actions[bot]@users.noreply.github.com"
+
+          git pull --no-tags
+
+          git add *
+          git commit -m "Automatic application of license header"
+
+          git config push.default upstream
+          git push
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.licenserc.yaml b/.licenserc.yaml
new file mode 100644
index 0000000..09dd4b2
--- /dev/null
+++ b/.licenserc.yaml
@@ -0,0 +1,28 @@
+header:
+  license:
+    spdx-id: BSD-3-Clause
+    copyright-owner: Jupyter Development Team
+    software-name: Jupyter-chat
+    content: |
+      Copyright (c) Jupyter Development Team.
+      Distributed under the terms of the Modified BSD License.
+
+  paths-ignore:
+    - '**/*.ipynb'
+    - '**/*.json'
+    - '**/*.md'
+    - '**/*.svg'
+    - '**/*.yml'
+    - '**/*.yaml'
+    - '**/build'
+    - '**/lib'
+    - '**/node_modules'
+    - '*.map.js'
+    - '*.bundle.js'
+    - '**/.*'
+    - 'binder/postBuild'
+    - 'coverage'
+    - 'LICENSE'
+    - 'yarn.lock'
+
+  comment: on-failure
diff --git a/packages/jupyter-chat-extension/babel.config.js b/packages/jupyter-chat-extension/babel.config.js
index 8b5c764..bf69a46 100644
--- a/packages/jupyter-chat-extension/babel.config.js
+++ b/packages/jupyter-chat-extension/babel.config.js
@@ -1,1 +1,6 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 module.exports = require('@jupyterlab/testutils/lib/babel.config');
diff --git a/packages/jupyter-chat-extension/jest.config.js b/packages/jupyter-chat-extension/jest.config.js
index 37c7c33..4f6b85b 100644
--- a/packages/jupyter-chat-extension/jest.config.js
+++ b/packages/jupyter-chat-extension/jest.config.js
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 const jestJupyterLab = require('@jupyterlab/testutils/lib/jest-config');
 
 const esModules = [
diff --git a/packages/jupyter-chat-extension/jupyter_chat_extension/__init__.py b/packages/jupyter-chat-extension/jupyter_chat_extension/__init__.py
index cba5967..d0d7608 100644
--- a/packages/jupyter-chat-extension/jupyter_chat_extension/__init__.py
+++ b/packages/jupyter-chat-extension/jupyter_chat_extension/__init__.py
@@ -1,3 +1,6 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 try:
     from ._version import __version__
 except ImportError:
diff --git a/packages/jupyter-chat-extension/jupyter_chat_extension/config_manager.py b/packages/jupyter-chat-extension/jupyter_chat_extension/config_manager.py
index ab08e6f..e36ae74 100644
--- a/packages/jupyter-chat-extension/jupyter_chat_extension/config_manager.py
+++ b/packages/jupyter-chat-extension/jupyter_chat_extension/config_manager.py
@@ -1,3 +1,6 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 import json
 import logging
 import os
diff --git a/packages/jupyter-chat-extension/jupyter_chat_extension/extension.py b/packages/jupyter-chat-extension/jupyter_chat_extension/extension.py
index 2d73228..78adc35 100644
--- a/packages/jupyter-chat-extension/jupyter_chat_extension/extension.py
+++ b/packages/jupyter-chat-extension/jupyter_chat_extension/extension.py
@@ -1,3 +1,6 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 from jupyter_server.extension.application import ExtensionApp
 
 from .config_manager import ConfigManager
diff --git a/packages/jupyter-chat-extension/jupyter_chat_extension/handlers.py b/packages/jupyter-chat-extension/jupyter_chat_extension/handlers.py
index 4a7ef55..537ab9f 100644
--- a/packages/jupyter-chat-extension/jupyter_chat_extension/handlers.py
+++ b/packages/jupyter-chat-extension/jupyter_chat_extension/handlers.py
@@ -1,3 +1,6 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 import getpass
 import json
 import time
diff --git a/packages/jupyter-chat-extension/jupyter_chat_extension/models.py b/packages/jupyter-chat-extension/jupyter_chat_extension/models.py
index 95cff48..384a48e 100644
--- a/packages/jupyter-chat-extension/jupyter_chat_extension/models.py
+++ b/packages/jupyter-chat-extension/jupyter_chat_extension/models.py
@@ -1,3 +1,6 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 from typing import Any, Dict, List, Literal, Optional, Union
 
 from langchain.pydantic_v1 import BaseModel, validator
diff --git a/packages/jupyter-chat-extension/pyproject.toml b/packages/jupyter-chat-extension/pyproject.toml
index 0b70dc4..b830a35 100644
--- a/packages/jupyter-chat-extension/pyproject.toml
+++ b/packages/jupyter-chat-extension/pyproject.toml
@@ -1,3 +1,6 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 [build-system]
 requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0.3.2"]
 build-backend = "hatchling.build"
diff --git a/packages/jupyter-chat-extension/setup.py b/packages/jupyter-chat-extension/setup.py
index aefdf20..3bb159b 100644
--- a/packages/jupyter-chat-extension/setup.py
+++ b/packages/jupyter-chat-extension/setup.py
@@ -1,1 +1,4 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 __import__("setuptools").setup()
diff --git a/packages/jupyter-chat-extension/src/handlers/handler.ts b/packages/jupyter-chat-extension/src/handlers/handler.ts
index 5ffb554..67de342 100644
--- a/packages/jupyter-chat-extension/src/handlers/handler.ts
+++ b/packages/jupyter-chat-extension/src/handlers/handler.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import { URLExt } from '@jupyterlab/coreutils';
 import { ServerConnection } from '@jupyterlab/services';
 
diff --git a/packages/jupyter-chat-extension/src/handlers/websocket-handler.ts b/packages/jupyter-chat-extension/src/handlers/websocket-handler.ts
index 0fd26f6..6981451 100644
--- a/packages/jupyter-chat-extension/src/handlers/websocket-handler.ts
+++ b/packages/jupyter-chat-extension/src/handlers/websocket-handler.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import { URLExt } from '@jupyterlab/coreutils';
 import { ServerConnection } from '@jupyterlab/services';
 import { UUID } from '@lumino/coreutils';
diff --git a/packages/jupyter-chat-extension/src/index.ts b/packages/jupyter-chat-extension/src/index.ts
index 16a1cc0..1b23922 100644
--- a/packages/jupyter-chat-extension/src/index.ts
+++ b/packages/jupyter-chat-extension/src/index.ts
@@ -1,8 +1,6 @@
-// Copyright (c) Jupyter Development Team.
-// Distributed under the terms of the Modified BSD License.
-/**
- * @packageDocumentation
- * @module chat-extension
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
  */
 
 import {
diff --git a/packages/jupyter-chat-extension/style/base.css b/packages/jupyter-chat-extension/style/base.css
index e11f457..b46dbc1 100644
--- a/packages/jupyter-chat-extension/style/base.css
+++ b/packages/jupyter-chat-extension/style/base.css
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 /*
     See the JupyterLab Developer Guide for useful CSS Patterns:
 
diff --git a/packages/jupyter-chat-extension/style/index.css b/packages/jupyter-chat-extension/style/index.css
index 8a7ea29..c236c5e 100644
--- a/packages/jupyter-chat-extension/style/index.css
+++ b/packages/jupyter-chat-extension/style/index.css
@@ -1,1 +1,6 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 @import url('base.css');
diff --git a/packages/jupyter-chat-extension/style/index.js b/packages/jupyter-chat-extension/style/index.js
index a028a76..71b038b 100644
--- a/packages/jupyter-chat-extension/style/index.js
+++ b/packages/jupyter-chat-extension/style/index.js
@@ -1,1 +1,6 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import './base.css';
diff --git a/packages/jupyter-chat/babel.config.js b/packages/jupyter-chat/babel.config.js
index 8b5c764..bf69a46 100644
--- a/packages/jupyter-chat/babel.config.js
+++ b/packages/jupyter-chat/babel.config.js
@@ -1,1 +1,6 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 module.exports = require('@jupyterlab/testutils/lib/babel.config');
diff --git a/packages/jupyter-chat/jest.config.js b/packages/jupyter-chat/jest.config.js
index 37c7c33..4f6b85b 100644
--- a/packages/jupyter-chat/jest.config.js
+++ b/packages/jupyter-chat/jest.config.js
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 const jestJupyterLab = require('@jupyterlab/testutils/lib/jest-config');
 
 const esModules = [
diff --git a/packages/jupyter-chat/src/components/chat-input.tsx b/packages/jupyter-chat/src/components/chat-input.tsx
index cd66ce6..68fa937 100644
--- a/packages/jupyter-chat/src/components/chat-input.tsx
+++ b/packages/jupyter-chat/src/components/chat-input.tsx
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import React from 'react';
 
 import {
diff --git a/packages/jupyter-chat/src/components/chat-messages.tsx b/packages/jupyter-chat/src/components/chat-messages.tsx
index 880388f..ed29188 100644
--- a/packages/jupyter-chat/src/components/chat-messages.tsx
+++ b/packages/jupyter-chat/src/components/chat-messages.tsx
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
 import { Avatar, Box, Typography } from '@mui/material';
 import type { SxProps, Theme } from '@mui/material';
diff --git a/packages/jupyter-chat/src/components/chat.tsx b/packages/jupyter-chat/src/components/chat.tsx
index e13ae4c..faba003 100644
--- a/packages/jupyter-chat/src/components/chat.tsx
+++ b/packages/jupyter-chat/src/components/chat.tsx
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
 import ArrowBackIcon from '@mui/icons-material/ArrowBack';
 import SettingsIcon from '@mui/icons-material/Settings';
diff --git a/packages/jupyter-chat/src/components/copy-button.tsx b/packages/jupyter-chat/src/components/copy-button.tsx
index cb558ef..68a0206 100644
--- a/packages/jupyter-chat/src/components/copy-button.tsx
+++ b/packages/jupyter-chat/src/components/copy-button.tsx
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import React, { useState, useCallback } from 'react';
 
 import { Box, Button } from '@mui/material';
diff --git a/packages/jupyter-chat/src/components/jl-theme-provider.tsx b/packages/jupyter-chat/src/components/jl-theme-provider.tsx
index 9bc5e8a..9aa56a9 100644
--- a/packages/jupyter-chat/src/components/jl-theme-provider.tsx
+++ b/packages/jupyter-chat/src/components/jl-theme-provider.tsx
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import React, { useState, useEffect } from 'react';
 import type { IThemeManager } from '@jupyterlab/apputils';
 import { Theme, ThemeProvider, createTheme } from '@mui/material/styles';
diff --git a/packages/jupyter-chat/src/components/mui-extras/stacking-alert.tsx b/packages/jupyter-chat/src/components/mui-extras/stacking-alert.tsx
index 2fe438d..dc66bd6 100644
--- a/packages/jupyter-chat/src/components/mui-extras/stacking-alert.tsx
+++ b/packages/jupyter-chat/src/components/mui-extras/stacking-alert.tsx
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import React, { useState, useMemo, useCallback } from 'react';
 import { Alert, AlertColor, Collapse } from '@mui/material';
 
diff --git a/packages/jupyter-chat/src/components/rendermime-markdown.tsx b/packages/jupyter-chat/src/components/rendermime-markdown.tsx
index 3e53340..dfc4659 100644
--- a/packages/jupyter-chat/src/components/rendermime-markdown.tsx
+++ b/packages/jupyter-chat/src/components/rendermime-markdown.tsx
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import React, { useState, useEffect, useRef } from 'react';
 import ReactDOM from 'react-dom';
 
diff --git a/packages/jupyter-chat/src/components/scroll-container.tsx b/packages/jupyter-chat/src/components/scroll-container.tsx
index 90c22b6..a750c68 100644
--- a/packages/jupyter-chat/src/components/scroll-container.tsx
+++ b/packages/jupyter-chat/src/components/scroll-container.tsx
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import React, { useEffect, useMemo } from 'react';
 import { Box, SxProps, Theme } from '@mui/material';
 
diff --git a/packages/jupyter-chat/src/icons.ts b/packages/jupyter-chat/src/icons.ts
index b453450..8823bc7 100644
--- a/packages/jupyter-chat/src/icons.ts
+++ b/packages/jupyter-chat/src/icons.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 // This file is based on iconimports.ts in @jupyterlab/ui-components, but is manually generated.
 
 import { LabIcon } from '@jupyterlab/ui-components';
diff --git a/packages/jupyter-chat/src/index.ts b/packages/jupyter-chat/src/index.ts
index b41fe6b..ab63495 100644
--- a/packages/jupyter-chat/src/index.ts
+++ b/packages/jupyter-chat/src/index.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 export * from './icons';
 export * from './model';
 export * from './types';
diff --git a/packages/jupyter-chat/src/model.ts b/packages/jupyter-chat/src/model.ts
index 482e8fb..9d00e77 100644
--- a/packages/jupyter-chat/src/model.ts
+++ b/packages/jupyter-chat/src/model.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import { IDisposable } from '@lumino/disposable';
 import { ISignal, Signal } from '@lumino/signaling';
 
diff --git a/packages/jupyter-chat/src/theme-provider.ts b/packages/jupyter-chat/src/theme-provider.ts
index 02db8d3..0929000 100644
--- a/packages/jupyter-chat/src/theme-provider.ts
+++ b/packages/jupyter-chat/src/theme-provider.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import { Theme, createTheme } from '@mui/material/styles';
 
 function getCSSVariable(name: string): string {
diff --git a/packages/jupyter-chat/src/types.ts b/packages/jupyter-chat/src/types.ts
index 5a81a52..2cf1b75 100644
--- a/packages/jupyter-chat/src/types.ts
+++ b/packages/jupyter-chat/src/types.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 /**
  * The user description.
  */
diff --git a/packages/jupyter-chat/src/types/mui.d.ts b/packages/jupyter-chat/src/types/mui.d.ts
index 2e63491..a64a9a2 100644
--- a/packages/jupyter-chat/src/types/mui.d.ts
+++ b/packages/jupyter-chat/src/types/mui.d.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import { ReactEventHandler } from 'react';
 
 /**
diff --git a/packages/jupyter-chat/src/types/svg.d.ts b/packages/jupyter-chat/src/types/svg.d.ts
index 68ced84..1d7cdd4 100644
--- a/packages/jupyter-chat/src/types/svg.d.ts
+++ b/packages/jupyter-chat/src/types/svg.d.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 // Excerpted from @jupyterlab/ui-components
 
 // including this file in a package allows for the use of import statements
diff --git a/packages/jupyter-chat/src/widgets/chat-error.tsx b/packages/jupyter-chat/src/widgets/chat-error.tsx
index c492fda..d9b7b7f 100644
--- a/packages/jupyter-chat/src/widgets/chat-error.tsx
+++ b/packages/jupyter-chat/src/widgets/chat-error.tsx
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import { IThemeManager, ReactWidget } from '@jupyterlab/apputils';
 import { Alert, Box } from '@mui/material';
 import React from 'react';
diff --git a/packages/jupyter-chat/src/widgets/chat-sidebar.tsx b/packages/jupyter-chat/src/widgets/chat-sidebar.tsx
index ac4ad4f..1dade83 100644
--- a/packages/jupyter-chat/src/widgets/chat-sidebar.tsx
+++ b/packages/jupyter-chat/src/widgets/chat-sidebar.tsx
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import { IThemeManager, ReactWidget } from '@jupyterlab/apputils';
 import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
 import React from 'react';
diff --git a/packages/jupyter-chat/src/widgets/chat-widget.tsx b/packages/jupyter-chat/src/widgets/chat-widget.tsx
index 9a0060a..f72ce6d 100644
--- a/packages/jupyter-chat/src/widgets/chat-widget.tsx
+++ b/packages/jupyter-chat/src/widgets/chat-widget.tsx
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import { IThemeManager, ReactWidget } from '@jupyterlab/apputils';
 import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
 import React from 'react';
diff --git a/packages/jupyter-chat/style/base.css b/packages/jupyter-chat/style/base.css
index e31a716..4e2dfff 100644
--- a/packages/jupyter-chat/style/base.css
+++ b/packages/jupyter-chat/style/base.css
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 /*
     See the JupyterLab Developer Guide for useful CSS Patterns:
 
diff --git a/packages/jupyter-chat/style/chat-settings.css b/packages/jupyter-chat/style/chat-settings.css
index 46fb409..a075efb 100644
--- a/packages/jupyter-chat/style/chat-settings.css
+++ b/packages/jupyter-chat/style/chat-settings.css
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 .jp-chat-SettingsHeader {
   font-size: var(--jp-ui-font-size3);
   font-weight: 400;
diff --git a/packages/jupyter-chat/style/index.css b/packages/jupyter-chat/style/index.css
index 8a7ea29..c236c5e 100644
--- a/packages/jupyter-chat/style/index.css
+++ b/packages/jupyter-chat/style/index.css
@@ -1,1 +1,6 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 @import url('base.css');
diff --git a/packages/jupyter-chat/style/index.js b/packages/jupyter-chat/style/index.js
index a028a76..71b038b 100644
--- a/packages/jupyter-chat/style/index.js
+++ b/packages/jupyter-chat/style/index.js
@@ -1,1 +1,6 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import './base.css';
diff --git a/packages/jupyter-chat/style/rendermime-markdown.css b/packages/jupyter-chat/style/rendermime-markdown.css
index f917f49..52a1622 100644
--- a/packages/jupyter-chat/style/rendermime-markdown.css
+++ b/packages/jupyter-chat/style/rendermime-markdown.css
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 .jp-chat-rendermime-markdown .jp-RenderedHTMLCommon {
   padding-right: 0;
 }
diff --git a/pyproject.toml b/pyproject.toml
index c0e01a7..8b001d0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,6 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 [build-system]
 requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0.3.2"]
 build-backend = "hatchling.build"
diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh
index 900211b..a721d4b 100755
--- a/scripts/bump-version.sh
+++ b/scripts/bump-version.sh
@@ -1,4 +1,7 @@
 #!/bin/bash
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 
 # script that bumps version for all projects regardless of whether they were
 # changed since last release. needed because `lerna version` only bumps versions for projects
diff --git a/scripts/install.sh b/scripts/install.sh
index 83b42b0..dd423c9 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -1,4 +1,7 @@
 #!/bin/bash
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 
 # install core packages
 pip install jupyterlab~=4.0


Test patch:
diff --git a/conftest.py b/conftest.py
index fe38e44..83bd5b7 100644
--- a/conftest.py
+++ b/conftest.py
@@ -1,3 +1,6 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 import pytest
 
 pytest_plugins = ("pytest_jupyter.jupyter_server", )
diff --git a/packages/jupyter-chat-extension/jupyter_chat_extension/tests/__init__.py b/packages/jupyter-chat-extension/jupyter_chat_extension/tests/__init__.py
index 17fca6b..8dcde00 100644
--- a/packages/jupyter-chat-extension/jupyter_chat_extension/tests/__init__.py
+++ b/packages/jupyter-chat-extension/jupyter_chat_extension/tests/__init__.py
@@ -1,1 +1,4 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 """Python unit tests for jupyter_chat."""
diff --git a/packages/jupyter-chat-extension/jupyter_chat_extension/tests/test_handlers.py b/packages/jupyter-chat-extension/jupyter_chat_extension/tests/test_handlers.py
index 71048a8..902af76 100644
--- a/packages/jupyter-chat-extension/jupyter_chat_extension/tests/test_handlers.py
+++ b/packages/jupyter-chat-extension/jupyter_chat_extension/tests/test_handlers.py
@@ -1,1 +1,4 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 ### TODO ####
diff --git a/packages/jupyter-chat-extension/ui-tests/jupyter_server_test_config.py b/packages/jupyter-chat-extension/ui-tests/jupyter_server_test_config.py
index f2a9478..e958c60 100644
--- a/packages/jupyter-chat-extension/ui-tests/jupyter_server_test_config.py
+++ b/packages/jupyter-chat-extension/ui-tests/jupyter_server_test_config.py
@@ -1,3 +1,6 @@
+# Copyright (c) Jupyter Development Team.
+# Distributed under the terms of the Modified BSD License.
+
 """Server configuration for integration tests.
 
 !! Never use this configuration in production because it
diff --git a/packages/jupyter-chat-extension/ui-tests/playwright.config.js b/packages/jupyter-chat-extension/ui-tests/playwright.config.js
index 9ece6fa..c657f8a 100644
--- a/packages/jupyter-chat-extension/ui-tests/playwright.config.js
+++ b/packages/jupyter-chat-extension/ui-tests/playwright.config.js
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 /**
  * Configuration for Playwright using default from @jupyterlab/galata
  */
diff --git a/packages/jupyter-chat-extension/ui-tests/tests/jupyterlab_chat_extension.spec.ts b/packages/jupyter-chat-extension/ui-tests/tests/jupyterlab_chat_extension.spec.ts
index 56a1d44..cd69a52 100644
--- a/packages/jupyter-chat-extension/ui-tests/tests/jupyterlab_chat_extension.spec.ts
+++ b/packages/jupyter-chat-extension/ui-tests/tests/jupyterlab_chat_extension.spec.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 import { expect, test } from '@jupyterlab/galata';
 
 /**
diff --git a/packages/jupyter-chat/src/__tests__/model.spec.ts b/packages/jupyter-chat/src/__tests__/model.spec.ts
index 132ee20..0d8598b 100644
--- a/packages/jupyter-chat/src/__tests__/model.spec.ts
+++ b/packages/jupyter-chat/src/__tests__/model.spec.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 /**
  * Example of [Jest](https://jestjs.io/docs/getting-started) unit tests
  */
diff --git a/packages/jupyter-chat/src/__tests__/widgets.spec.ts b/packages/jupyter-chat/src/__tests__/widgets.spec.ts
index 3e586ee..315e31b 100644
--- a/packages/jupyter-chat/src/__tests__/widgets.spec.ts
+++ b/packages/jupyter-chat/src/__tests__/widgets.spec.ts
@@ -1,3 +1,8 @@
+/*
+ * Copyright (c) Jupyter Development Team.
+ * Distributed under the terms of the Modified BSD License.
+ */
+
 /**
  * Example of [Jest](https://jestjs.io/docs/getting-started) unit tests
  */