🐛 fix gui connection, ci

This commit is contained in:
Nate Sesti 2023-10-30 23:31:00 -07:00
parent 55437aaf38
commit c5e21dbdb2
6 changed files with 112 additions and 108 deletions

View file

@ -6,47 +6,47 @@ on:
- preview
jobs:
pypi-deployment:
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v2
# pypi-deployment:
# runs-on: ubuntu-20.04
# permissions:
# contents: write
# steps:
# - name: Check out code
# uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10.8"
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.10.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install poetry
- name: Install project dependencies
run: cd server && poetry install
# - name: Install project dependencies
# run: cd server && poetry install
- name: Configure Poetry Token
run: cd server && poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
# - name: Configure Poetry Token
# run: cd server && poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
- name: Bump the version
run: cd server && poetry version patch
# - name: Bump the version
# run: cd server && poetry version patch
- name: Build and publish the package
run: cd server && poetry publish --build
# - name: Build and publish the package
# run: cd server && poetry publish --build
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -am "ci: 🏷 Update PyPI version [skip ci]"
# - name: Commit changes
# run: |
# git config --local user.email "action@github.com"
# git config --local user.name "GitHub Action"
# git commit -am "ci: 🏷 Update PyPI version [skip ci]"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref }}
build:
strategy:
@ -215,7 +215,7 @@ jobs:
- name: Download Apple Silicon Binary
if: matrix.os == 'macos-latest' && matrix.arch == 'arm64'
run: curl -o extensions/vscode/exe/continue_server https://continue-server-binaries.s3.us-west-1.amazonaws.com/apple-silicon/continue_server
run: curl -o extensions/vscode/exe/continue_server https://continue-server-binaries.s3.us-west-1.amazonaws.com/apple-silicon-preview/continue_server
- name: Set permissions
run: |
@ -293,42 +293,42 @@ jobs:
branch: ${{ github.ref }}
# 5. Download binaries and upload to S3
- name: Download Linux build
uses: actions/download-artifact@v2
with:
name: LinuxBinary
path: exe/linux
# - name: Download Linux build
# uses: actions/download-artifact@v2
# with:
# name: LinuxBinary
# path: exe/linux
- name: Download macOS build
uses: actions/download-artifact@v2
with:
name: macOSBinary
path: exe/mac
# - name: Download macOS build
# uses: actions/download-artifact@v2
# with:
# name: macOSBinary
# path: exe/mac
- name: Download Windows build
uses: actions/download-artifact@v2
with:
name: WindowsBinary
path: exe/windows
# - name: Download Windows build
# uses: actions/download-artifact@v2
# with:
# name: WindowsBinary
# path: exe/windows
- name: Upload binaries to S3 (s3.continue.dev)
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: s3.continue.dev
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-west-1"
SOURCE_DIR: "exe"
# - name: Upload binaries to S3 (s3.continue.dev)
# uses: jakejarvis/s3-sync-action@master
# with:
# args: --acl public-read --follow-symlinks
# env:
# AWS_S3_BUCKET: s3.continue.dev
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: "us-west-1"
# SOURCE_DIR: "exe"
- name: Upload binaries to S3 (continue-server-binaries)
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: continue-server-binaries
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-west-1"
SOURCE_DIR: "exe"
# - name: Upload binaries to S3 (continue-server-binaries)
# uses: jakejarvis/s3-sync-action@master
# with:
# args: --acl public-read --follow-symlinks
# env:
# AWS_S3_BUCKET: continue-server-binaries
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: "us-west-1"
# SOURCE_DIR: "exe"

2
.vscode/launch.json vendored
View file

@ -90,7 +90,7 @@
"outFiles": ["${workspaceFolder}/extensions/vscode/out/**/*.js"],
"preLaunchTask": "vscode-extension:build",
"env": {
"CONTINUE_SERVER_URL": "http://localhost:8001"
"CONTINUE_SERVER_URL": "http://localhost:65432"
}
},
// Has to be run after starting the server (separately or using the compound configuration)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -12,10 +12,8 @@ function useContinueGUIProtocol(useVscodeMessagePassing: boolean = true) {
undefined
);
const apiUrl = useSelector((store: RootStore) => store.config.apiUrl);
useEffect(() => {
const serverUrl = apiUrl || (window as any).serverUrl;
const serverUrl = (window as any).serverUrl;
const windowId = (window as any).windowId;
if (serverUrl === undefined || serverUrl === null) return;
if (windowId === undefined || windowId === null) return;
@ -29,7 +27,7 @@ function useContinueGUIProtocol(useVscodeMessagePassing: boolean = true) {
newClient.onConnected(() => {
setClient(newClient);
});
}, [apiUrl, (window as any).windowId]);
}, [(window as any).windowId]);
return client;
}

View file

@ -159,7 +159,13 @@ function GUI(props: GUIProps) {
const [waitingForSteps, setWaitingForSteps] = useState(false);
const [stepsOpen, setStepsOpen] = useState<(boolean | undefined)[]>([]);
const [waitingForClient, setWaitingForClient] = useState(true);
const [showLoading, setShowLoading] = useState(true);
const [showLoading, setShowLoading] = useState(false);
useEffect(() => {
setTimeout(() => {
setShowLoading(true);
}, 5000);
}, []);
// #endregion
@ -590,7 +596,7 @@ function GUI(props: GUIProps) {
</HeaderButtonWithText>
</div>
</GUIHeaderDiv>
{(takenAction || showLoading) && typeof client === "undefined" && (
{takenAction && showLoading && typeof client === "undefined" && (
<>
<RingLoader />
<p