Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5773279

Browse files
Merge branch 'bot_ui' into 'master'
Bot UI See merge request postgres-ai/database-lab!856
2 parents 648d066 + 0ed58ce commit 5773279

File tree

49 files changed

+3324
-43
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3324
-43
lines changed

‎ui/packages/platform/.env_example_dev

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
REACT_APP_API_URL_PREFIX=https://v2.postgres.ai/api/general
22
REACT_APP_TOKEN_DEBUG=__YOUR_JWT_TOKEN_FROM_STAGING__
3+
REACT_APP_WS_URL=ws://127.0.0.1:9100/

‎ui/packages/platform/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ ENV REACT_APP_STRIPE_API_KEY=$ARG_REACT_APP_STRIPE_API_KEY
4444
ARG ARG_REACT_APP_SENTRY_DSN
4545
ENV REACT_APP_SENTRY_DSN=$ARG_REACT_APP_SENTRY_DSN
4646

47+
ARG ARG_REACT_APP_WS_URL
48+
ENV REACT_APP_WS_URL=$ARG_REACT_APP_WS_URL
49+
4750
RUN apk add --no-cache --update git && \
4851
npm i -g pnpm@7.30.5; \
4952
pnpm config set store-dir /app/.pnpm-store; \

‎ui/packages/platform/ci_docker_build_push.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ DOCKER_BUILDKIT=1 docker build \
3737
--build-arg ARG_REACT_APP_AUTH_URL="${REACT_APP_AUTH_URL}" \
3838
--build-arg ARG_REACT_APP_ROOT_URL="${REACT_APP_ROOT_URL}" \
3939
--build-arg ARG_REACT_APP_SENTRY_DSN="${REACT_APP_SENTRY_DSN}" \
40+
--build-arg ARG_REACT_APP_WS_URL="${REACT_APP_WS_URL}" \
4041
$tags_build --file ./ui/packages/platform/Dockerfile .
4142
set +x
4243

‎ui/packages/platform/deploy/configs/dev.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,9 @@ export REACT_APP_ROOT_URL="https://v2.postgres.ai"
1717
export PUBLIC_URL=""
1818

1919
# Public Stripe key, it is ok to keep it here.
20-
export REACT_APP_STRIPE_API_KEY="pk_test_f8joWMK94CaOPVnc0QzqEGOX00PwnHa3BG"
20+
export REACT_APP_STRIPE_API_KEY="xxx"
2121
export REACT_APP_SENTRY_DSN=""
22+
23+
# AI Bot
24+
# don't forget trailing slash if GET path is used!
25+
export REACT_APP_WS_URL="wss://v2.postgres.ai/ai-bot-ws/" # we use staging for now, since dev env is not fullfledged yet

‎ui/packages/platform/deploy/configs/dev1.imgdata.ru.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ export REACT_APP_ROOT_URL="https://postgres.ai"
1717
export PUBLIC_URL=""
1818

1919
# Public Stripe key, it is ok to keep it here.
20-
export REACT_APP_STRIPE_API_KEY="pk_test_f8joWMK94CaOPVnc0QzqEGOX00PwnHa3BG"
20+
export REACT_APP_STRIPE_API_KEY="xxx"
2121
export REACT_APP_SENTRY_DSN=""

‎ui/packages/platform/deploy/configs/local.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ export REACT_APP_ROOT_URL="https://postgres.ai"
1717
export PUBLIC_URL=""
1818

1919
# Public Stripe key, it is ok to keep it here.
20-
export REACT_APP_STRIPE_API_KEY="pk_test_f8joWMK94CaOPVnc0QzqEGOX00PwnHa3BG"
20+
export REACT_APP_STRIPE_API_KEY="xxx"
2121
export REACT_APP_SENTRY_DSN=""
22+
23+
# AI Bot
24+
export REACT_APP_WS_URL="ws://localhost:9100/" # don't forget trailing slash if GET path is used!

‎ui/packages/platform/deploy/configs/production.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ export REACT_APP_ROOT_URL="https://postgres.ai"
1717
export PUBLIC_URL=""
1818

1919
# Public Stripe key, it is ok to keep it here.
20-
export REACT_APP_STRIPE_API_KEY="pk_live_X5yTnxXNtoVDl4Rl5oxY6X1400fwxOS1x3"
20+
export REACT_APP_STRIPE_API_KEY="xxx"
2121

2222
# Sentry.
2323
export REACT_APP_SENTRY_DSN="https://91517477289e477cb8880f2f07a82632@sentry.postgres.ai/2"
24+
25+
# AI Bot
26+
export REACT_APP_WS_URL="wss://postgres.ai/ai-bot-wss/" # don't forget trailing slash!

‎ui/packages/platform/deploy/configs/staging.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ export REACT_APP_ROOT_URL="https://v2.postgres.ai"
1717
export PUBLIC_URL=""
1818

1919
# Public Stripe key, it is ok to keep it here.
20-
export REACT_APP_STRIPE_API_KEY="pk_test_f8joWMK94CaOPVnc0QzqEGOX00PwnHa3BG"
20+
export REACT_APP_STRIPE_API_KEY="xxx"
2121
export REACT_APP_SENTRY_DSN=""
22+
23+
# AI Bot
24+
export REACT_APP_WS_URL="wss://v2.postgres.ai/ai-bot-ws/" # don't forget trailing slash!

‎ui/packages/platform/deploy/platform-console.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ spec:
4747
value: "$REACT_APP_EXPLAIN_DEPESZ_SERVER"
4848
- name: REACT_APP_STRIPE_API_KEY
4949
value: "$REACT_APP_STRIPE_API_KEY"
50+
- name: REACT_APP_WS_URL
51+
value: "$REACT_APP_WS_URL"

‎ui/packages/platform/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"react-router-hash-link": "^1.2.2",
6868
"react-scripts": "^5.0.0",
6969
"react-syntax-highlighter": "^15.5.0",
70+
"react-use-websocket": "3.0.0",
7071
"reflux": "^6.4.1",
7172
"rehype-raw": "^6.1.1",
7273
"remark-gfm": "^3.0.1",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /