Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"svelte-jsoneditor": "^0.21.1",
"svelte-link": "^1.4.0",
"svelte-select": "^5.7.0",
"svelte-splitpanes": "^0.8.0",
"svelvet": "^9.0.0",
"sweetalert2": "^11.6.13",
"swiper": "^10.3.1"
Expand Down
2 changes: 2 additions & 0 deletions src/lib/helpers/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,10 @@ IRichContent.prototype.text;
/**
* @typedef {Object} ContentLogModel
* @property {string} conversation_id - The conversation id.
* @property {string} name - The sender name.
* @property {string} content - The log content.
* @property {Date} created_at - The log sent time.
* @property {boolean} is_collapsed - For UI display.
*/

/**
Expand Down
31 changes: 22 additions & 9 deletions src/lib/scss/custom/pages/_chat.scss
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,8 @@
}
}

.user-chat {
flex: 1;
}

.chat-with-log {
flex: 0.6;
}

.chat-log {
flex: 0.4;
height: 100vh;

.padding-side {
padding-left: 10px;
Expand All @@ -285,11 +277,24 @@
.log-element {
margin-top: 15px;
margin-bottom: 15px;

.log-meta {
font-size: 15px;
color: white;
}

.log-content {
font-size: 15px;
color: white;
}

.log-collapse {
overflow-y: hidden;
height: 10%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 5;
}

.divider {
overflow: visible; /* For IE */
Expand All @@ -299,6 +304,14 @@
color: white;
text-align: center;
}

.toggle-btn {
outline: none;
box-shadow: none;
color: white;
font-size: 15px;
padding-left: 0px;
}
}
}
}
Expand Down
10 changes: 9 additions & 1 deletion src/routes/chat/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@
import { getAgents } from '$lib/services/agent-service.js'

const params = $page.params;
/** @type {import('$types').AgentFilter} */
const filter = {
pager: { page: 1, size: 10, count: 0 },
isEvaluator: false
};

/** @type {import('$types').AgentModel[]} */
let agents = [];
let agentId = 'undefined';

onMount(async () => {
agents = await getAgents({isEvaluator: false});
const response = await getAgents(filter);
agents = response?.items?.map(t => { return { ...t }; }) || [];
const agentSettings = await getSettingDetail("Agent");
// @ts-ignore
agentId = agentSettings.hostAgentId;
});
</script>
Expand Down
Loading