summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/main.yaml9
-rw-r--r--.gitignore1
-rw-r--r--extension/react-app/src/redux/slices/serverStateReducer.ts11
-rw-r--r--run.py8
-rw-r--r--run.spec47
5 files changed, 64 insertions, 12 deletions
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 82e4c78e..03c33dba 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -31,13 +31,8 @@ jobs:
run: |
pip install -r continuedev/requirements.txt
- - name: Build PyInstaller Executable for Windows
- run: pyinstaller run.py --exclude-module numpy --exclude-module jedi -F --add-data 'continuedev;continuedev' --hidden-import=anthropic --hidden-import=github --hidden-import=ripgrepy
- if: matrix.os == 'windows-latest'
-
- - name: Build PyInstaller Executable for Mac/Linux
- run: pyinstaller run.py --exclude-module numpy --exclude-module jedi -F --add-data 'continuedev:continuedev' --hidden-import=anthropic --hidden-import=github --hidden-import=ripgrepy
- if: matrix.os != 'windows-latest'
+ - name: Build PyInstaller Executable
+ run: pyinstaller run.spec
- name: Set permissions
run: |
diff --git a/.gitignore b/.gitignore
index ad37b017..0356fce5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,7 +31,6 @@ MANIFEST
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
-*.spec
# Installer logs
pip-log.txt
diff --git a/extension/react-app/src/redux/slices/serverStateReducer.ts b/extension/react-app/src/redux/slices/serverStateReducer.ts
index 4d9dc326..f9f37aeb 100644
--- a/extension/react-app/src/redux/slices/serverStateReducer.ts
+++ b/extension/react-app/src/redux/slices/serverStateReducer.ts
@@ -36,14 +36,17 @@ export const serverStateSlice = createSlice({
reducers: {
setServerState: (state, action) => {
return {
+ selected_context_items: [],
+ user_input_queue: [],
+ slash_commands: [],
...action.payload,
- selected_context_items: action.payload.selected_context_items || [],
- user_input_queue: action.payload.user_input_queue || [],
- slash_commands: action.payload.slash_commands || [],
};
},
temporarilySetUserInputQueue: (state, action) => {
- state.user_input_queue = action.payload;
+ return {
+ ...state,
+ user_input_queue: action.payload,
+ };
},
},
});
diff --git a/run.py b/run.py
index 7160bbc7..295ed086 100644
--- a/run.py
+++ b/run.py
@@ -1,4 +1,12 @@
from continuedev.main import main
+import os
+import sys
+
+if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
+ ca_bundle_path = os.path.join(sys._MEIPASS, 'ca_bundle', 'cacert.pem')
+ print("Certificates at: ", ca_bundle_path)
+ os.environ['SSL_CERT_FILE'] = ca_bundle_path
+ os.environ['REQUESTS_CA_BUNDLE'] = ca_bundle_path
if __name__ == "__main__":
main()
diff --git a/run.spec b/run.spec
new file mode 100644
index 00000000..3bb46c73
--- /dev/null
+++ b/run.spec
@@ -0,0 +1,47 @@
+# -*- mode: python ; coding: utf-8 -*-
+import certifi
+
+block_cipher = None
+
+
+a = Analysis(
+ ['run.py'],
+ pathex=[],
+ binaries=[],
+ datas=[
+ ('continuedev', 'continuedev'),
+ (certifi.where(), 'ca_bundle')
+ ],
+ hiddenimports=['anthropic', 'github', 'ripgrepy'],
+ hookspath=[],
+ hooksconfig={},
+ runtime_hooks=[],
+ excludes=['numpy', 'jedi'],
+ win_no_prefer_redirects=False,
+ win_private_assemblies=False,
+ cipher=block_cipher,
+ noarchive=False,
+)
+pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
+
+exe = EXE(
+ pyz,
+ a.scripts,
+ a.binaries,
+ a.zipfiles,
+ a.datas,
+ [],
+ name='run',
+ debug=False,
+ bootloader_ignore_signals=False,
+ strip=False,
+ upx=True,
+ upx_exclude=[],
+ runtime_tmpdir=None,
+ console=True,
+ disable_windowed_traceback=False,
+ argv_emulation=False,
+ target_arch=None,
+ codesign_identity=None,
+ entitlements_file=None,
+)