diff --git a/api/.env.example b/api/.env.example index c97adea..603ed55 100644 --- a/api/.env.example +++ b/api/.env.example @@ -5,4 +5,5 @@ # See the documentation for all the connection string options: https://pris.ly/d/connection-strings DATABASE_URL=postgresql://planilla:planilla@localhost:5434/planilla_db?schema=public +CONVERSATION_LAYER_ROUTER_URL='http://your-router-url:port' diff --git a/docker-compose.yml b/docker-compose.yml index 70d4069..79e6bcf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,6 +21,7 @@ services: restart: unless-stopped environment: DATABASE_URL: "postgresql://planilla:secret@db:5432/planilla_db?schema=public" + CONVERSATION_LAYER_ROUTER_URL: 'http://your-router-url:port' depends_on: - db ports: @@ -34,6 +35,7 @@ services: environment: VITE_API_EVENTS_URL: https://planilla.interno.com/events VITE_API_DB_URL: https://planilla.interno.com + VITE_CONVERSATION_LAYER_ROUTER_URL: 'http://your-router-url:port' ports: - "3008:80" networks: [planilla, principal] diff --git a/ui/runtime-env.sh b/ui/runtime-env.sh index 6664c60..a2dbd7d 100644 --- a/ui/runtime-env.sh +++ b/ui/runtime-env.sh @@ -1,5 +1,6 @@ #!/bin/sh echo "window.RUNTIME_CONFIG = {" > /usr/share/nginx/html/config.js echo " VITE_API_EVENTS_URL: '${VITE_API_EVENTS_URL}'," >> /usr/share/nginx/html/config.js -echo " VITE_API_DB_URL: '${VITE_API_DB_URL}'" >> /usr/share/nginx/html/config.js +echo " VITE_API_DB_URL: '${VITE_API_DB_URL}'," >> /usr/share/nginx/html/config.js +echo " VITE_CONVERSATION_LAYER_ROUTER_URL: '${VITE_CONVERSATION_LAYER_ROUTER_URL}'," >> /usr/share/nginx/html/config.js echo "};" >> /usr/share/nginx/html/config.js diff --git a/ui/src/components/chat/CanvasChat.vue b/ui/src/components/chat/CanvasChat.vue index 9846d08..2ea00ff 100644 --- a/ui/src/components/chat/CanvasChat.vue +++ b/ui/src/components/chat/CanvasChat.vue @@ -28,7 +28,7 @@ function send () { if (!t) return if (t.startsWith('/')) chat.run(t.slice(1)) - else chat.add({ type: 'text', owner: 'yo', text: t }) + else chat.sendMessage(t) msg.value = '' scrollBottom() @@ -58,12 +58,12 @@ watch(() => chat.items.length, scrollBottom)