Skip to content
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

Migrate to Jupyter fork with AI features #76

Merged
merged 43 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4b4fb71
Moved the old visual version into a new folder
May 9, 2024
521f415
Add Jupyterlab code with changes
May 9, 2024
b2cab87
fix URLs in packages dir
May 10, 2024
4c58d30
fix
May 10, 2024
73ad26a
license
May 10, 2024
1ec8b9b
build works
May 10, 2024
3f7f891
fix some failing checks
May 10, 2024
b0f5a76
add pretzel command
May 14, 2024
bbf9d77
added pretzel command
May 14, 2024
39eb5be
wip
May 15, 2024
c0a5f02
working error fix
May 15, 2024
0760f22
selected code editing works
May 15, 2024
7ce5bcf
fix selection editing
May 16, 2024
bf97364
Refactor (#81)
ramonverse May 16, 2024
18c9fcf
change file extension and fixes
May 16, 2024
e1966bf
refactor to openAiStream
May 16, 2024
2344afc
add azure
May 16, 2024
990e94f
no if else for aiService
May 16, 2024
00ceea7
fixed error correct, only show single line diff, use server
May 16, 2024
ecd1da0
improve prompt
May 16, 2024
fc51b55
remove react
May 16, 2024
ffc7326
render accept / reject buttons
May 16, 2024
2e6c19a
remove console logs
May 16, 2024
04913d1
fix bug
May 16, 2024
0554440
fix total lines
May 16, 2024
5f02a33
rename back to index.ts
May 16, 2024
0c94f8c
splash screen for cookies
May 16, 2024
0580d78
Merge branch 'fix-error-with-ai' of github.com:pretzelai/pretzelai in…
May 16, 2024
b392c86
enter / escape to accept/reject prompt working
May 17, 2024
1ff71db
fix total lines in monaco
May 17, 2024
4027b00
editor improvements
May 17, 2024
7691ab8
add final line editor rendering to right place
May 17, 2024
1bdbf48
posthog fix + cookie consent banner
May 17, 2024
262170b
Merge branch 'fix-error-with-ai' of github.com:pretzelai/pretzelai in…
May 17, 2024
716a065
handle occasional backticks
May 17, 2024
3681ec9
add posthog events back
May 17, 2024
65ad108
Merge branch 'fix-error-with-ai' of github.com:pretzelai/pretzelai in…
May 17, 2024
fcc9ed5
typo
May 17, 2024
d2ee9db
lint fix
May 17, 2024
99948d8
fix selection edit
May 17, 2024
e3026aa
fix editor rendering with selection
May 20, 2024
ed13b22
resolve merge conflicts
May 20, 2024
e7e443c
add missing dependency
May 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
19 changes: 19 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[bumpversion]
current_version = 4, 2, 0, "candidate", 0
commit = False
tag = False
parse = (?P<major>\d+)\,\ (?P<minor>\d+)\,\ (?P<patch>\d+)\,\ \"(?P<release>\S+)\"\,\ (?P<build>\d+)
serialize =
{major}, {minor}, {patch}, "{release}", {build}

[bumpversion:part:release]
optional_value = final
values =
alpha
beta
candidate
final

[bumpversion:part:build]

[bumpversion:file:jupyterlab/_version.py]
25 changes: 25 additions & 0 deletions .cleanignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# files that match any pattern from .cleanignore are NOT removed by
# the `jlpm clean:slate` command. Same syntax as .gitignore (plus the @).
#
# @: if a pattern starts with "@", some includes are automatically added,
# in addition to the base exclude pattern. For example:
#
# @*.foo
#
# will add:
#
# *.foo
# !packages/**/*.foo
# !**/node_modules/**/*.foo
#
# These help ensure that all node_modules dirs are cleaned and that
# sibling installs of labextensions are not cleaned.

# jetbrains IDE stuff
@*.iml
@.idea/

# ms IDE stuff
@*.code-workspace
@.history
@.vscode
67 changes: 67 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
"build": {
"dockerfile": "../docker/Dockerfile",
"context": "..",
"target": "base"
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8888],

// Use 'postCreateCommand' to run commands after the container is created.
// Populate the yarn cache
"postCreateCommand": "micromamba run pip install -e .",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"charliermarsh.ruff",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"meganrogge.template-string-converter",
"ms-python.python",
"streetsidesoftware.code-spell-checker"
],
"settings": {
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.tabSize": 2
},
"[javascriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.tabSize": 2
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2
},
"[python]": {
"editor.tabSize": 4
},
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
"icon": "terminal-bash"
},
"zsh": {
"path": "zsh"
}
}
}
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
49 changes: 43 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
node_modules
npm-debug.log
build
.git
*.md
.gitignore
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

.dockerignore
Dockerfile

# project files
coverage/

dev_mode/listings
dev_mode/schemas
dev_mode/static
dev_mode/themes
dev_mode/workspaces
dev_mode/stats.json

# Skip docs
**/docs/source/_build


junit.xml

jupyterlab/geckodriver
jupyterlab/static
jupyterlab/schemas
jupyterlab/themes
jupyterlab/style.js
jupyterlab/tests/**/static
jupyterlab/tests/**/labextension

# Remove after next release
jupyterlab/imports.css

packages/nbconvert-css/style/
packages/services/examples/node/config.json
packages/services/examples/browser/tmp
packages/theme-*/static

tests/**/coverage
tests/**/.cache-loader

**/node_modules
.yarn
47 changes: 47 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
node_modules
**/build
**/lib
**/node_modules
**/mock_packages
**/static
**/typings
**/schemas
**/themes
coverage
*.map.js
*.bundle.js

dev_mode/index.js
!dev_mode/static/index.out.js
dev_mode/workspaces
docs/_build
docs/api
docs/build
examples/example.spec.ts
examples/federated/core_package/index.template.js
examples/federated/core_package/index.js
examples/federated/labextensions
galata/playwright-report
jupyterlab/chrome-test.js
jupyterlab/geckodriver
jupyterlab/staging/yarn.js
jupyterlab/staging/index.js
jupyterlab/staging/webpack.config.js
packages/codemirror/test/foo*.js
packages/extensionmanager-extension/examples/listings
packages/nbconvert-css/raw.js
packages/services/dist
packages/ui-components/src/icon/iconimports.ts

#TypeDoc

# jetbrains IDE stuff
.idea/

# ms IDE stuff
.history/
.vscode/

# generated LSP interfaces
packages/lsp/src/_*
packages/lsp/schema.js
186 changes: 186 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
module.exports = {
env: {
browser: true,
es6: true,
commonjs: true,
node: true,
'jest/globals': true
},
globals: {
BigInt: 'readonly',
HTMLCollectionOf: 'readonly',
JSX: 'readonly',
NodeJS: 'readonly',
RequestInit: 'readonly',
RequestInfo: 'readonly',
ScrollLogicalPosition: 'readonly'
},
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:react/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'ES2018',
project: ['./tsconfig.eslint.json']
},
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['packages/**/*.spec.ts', 'testutils/**/*.spec.ts'],
plugins: ['jest'],
extends: ['plugin:jest/recommended'],
rules: {
'jest/no-conditional-expect': 'warn',
'jest/valid-title': 'warn',
'jest/no-standalone-expect': [
'error',
{
additionalTestBlockFunctions: ['it']
}
]
}
}
],
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: true
}
}
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/triple-slash-reference': 'warn',
'@typescript-eslint/no-inferrable-types': 'off',
camelcase: [
'error',
{
allow: [
'__webpack_public_path__',
'__webpack_share_scopes__',
'__webpack_init_sharing__',
'_jupyter_types_experimental',
'allow_stdin',
'allowed_extensions',
'allowed_extensions_uris',
'blocked_extensions',
'blocked_extensions_uris',
'bundles_extension',
'cell_type',
'check_update',
'clear_output',
'codemirror_mode',
'comm_close',
'comm_id',
'comm_msg',
'comm_open',
'copy_from',
'creation_date',
'cursor_end',
'cursor_pos',
'cursor_start',
'detail_level',
'display_data',
'display_id',
'display_name',
'embed_options',
'execute_input',
'execute_result',
'execution_count',
'execution_state',
'extension_data',
'extension_name',
'file_extension',
'hash_algorithm',
'help_links',
'hist_access_type',
'ids_only',
'implementation_version',
'installed_version',
'is_allowed',
'jlab_core',
'jupyterlab_extensions',
'jupyterlab_mime_extensions',
'kernel_spec',
'language_info',
'last_modified',
'last_update_date',
'latest_version',
'lineWrap_type',
'msg_type',
'msg_id',
'msgid_plural',
'nbconverter_exporter',
'nbformat_minor',
'needs_restart',
'orig_nbformat',
'output_mimetype',
'output_type',
'outputs_hidden',
'parent_header',
'per_page',
'plugin_name',
'pf_re',
'pkg_type',
'protocol_version',
'pygments_lexer',
'request_seq',
'slide_type',
'source_hidden',
'shutdown_reply',
'stop_on_error',
'store_history',
'target_name',
'target_module',
'UNSAFE_componentWillUpdate',
'UNSAFE_componentWillReceiveProps',
'user_expressions'
]
}
],
'id-match': ['error', '^[a-zA-Z_]+[a-zA-Z0-9_]*$'], // https://certitude.consulting/blog/en/invisible-backdoor/
'no-inner-declarations': 'off',
'no-prototype-builtins': 'off',
'no-control-regex': 'warn',
'no-undef': 'warn',
'no-case-declarations': 'warn',
'no-useless-escape': 'off',
'prefer-const': 'off',
'react/prop-types': 'warn',
'sort-imports': [
'error',
{
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
allowSeparatedGroups: false
}
]
},
settings: {
react: {
version: 'detect'
}
}
};
Loading