agregado log para ver cuando se envian los mensajes
This commit is contained in:
@@ -21,7 +21,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: "postgresql://planilla:secret@db:5432/planilla_db?schema=public"
|
DATABASE_URL: "postgresql://planilla:secret@db:5432/planilla_db?schema=public"
|
||||||
CONVERSATION_LAYER_ROUTER_URL: 'http://whatsapp-router:3001'
|
CONVERSATION_LAYER_ROUTER_URL: http://whatsapp-router:3001
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
ports:
|
ports:
|
||||||
@@ -35,7 +35,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
VITE_API_EVENTS_URL: https://planilla.interno.com/events
|
VITE_API_EVENTS_URL: https://planilla.interno.com/events
|
||||||
VITE_API_DB_URL: https://planilla.interno.com
|
VITE_API_DB_URL: https://planilla.interno.com
|
||||||
VITE_CONVERSATION_LAYER_ROUTER_URL: 'https://conversation-layer.interno.com/chatUI/sendMessage'
|
VITE_CONVERSATION_LAYER_ROUTER_URL: https://conversation-layer.interno.com/chatUI/sendMessage
|
||||||
ports:
|
ports:
|
||||||
- "3008:80"
|
- "3008:80"
|
||||||
networks: [planilla, principal]
|
networks: [planilla, principal]
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ export const useChat = defineStore('chat', {
|
|||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
add (item) {
|
add (item) {
|
||||||
console.log('agregado');
|
|
||||||
|
|
||||||
this.items.push(item)
|
this.items.push(item)
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -41,6 +39,8 @@ export const useChat = defineStore('chat', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async sendMessage(text) {
|
async sendMessage(text) {
|
||||||
|
console.log('enviando mensaje');
|
||||||
|
|
||||||
const routerUrl =
|
const routerUrl =
|
||||||
import.meta.env.VITE_CONVERSATION_LAYER_ROUTER_URL ||
|
import.meta.env.VITE_CONVERSATION_LAYER_ROUTER_URL ||
|
||||||
window?.RUNTIME_CONFIG?.VITE_CONVERSATION_LAYER_ROUTER_URL ||
|
window?.RUNTIME_CONFIG?.VITE_CONVERSATION_LAYER_ROUTER_URL ||
|
||||||
@@ -93,15 +93,6 @@ export const useChat = defineStore('chat', {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Agregamos de nuevo el mensaje del usuario al principio, ya que fue omitido
|
|
||||||
// newItems.unshift({
|
|
||||||
// id: msgId,
|
|
||||||
// type: 'chat',
|
|
||||||
// owner: 'user',
|
|
||||||
// text,
|
|
||||||
// ts,
|
|
||||||
// });
|
|
||||||
|
|
||||||
this.items = newItems;
|
this.items = newItems;
|
||||||
} else {
|
} else {
|
||||||
console.error('Invalid conversation response format:', conversation);
|
console.error('Invalid conversation response format:', conversation);
|
||||||
|
|||||||
Reference in New Issue
Block a user