feat: enhance agent sharing functionality and UI improvements

- Added shared agents state management in Navigation and AgentsList components.
- Implemented fetching and displaying shared agents in the AgentsList.
- Introduced functionality to hide shared agents with appropriate API integration.
- Updated the SharedAgent component layout for better UI consistency.
- Improved error handling in conversation fetching logic.
- Added new API endpoint for hiding shared agents.
- Updated Redux slice to manage shared agents state.
- Refactored AgentCard and AgentSection components for better code organization and readability.
This commit is contained in:
Siddhant Rai
2025-05-17 05:53:56 +05:30
parent 9d8073d468
commit 56793c8db7
11 changed files with 296 additions and 213 deletions

View File

@@ -150,10 +150,7 @@ export function handleFetchAnswerSteaming(
done,
value,
}: ReadableStreamReadResult<Uint8Array>) => {
if (done) {
console.log(counterrr);
return;
}
if (done) return;
counterrr += 1;
@@ -163,7 +160,7 @@ export function handleFetchAnswerSteaming(
const events = buffer.split('\n\n');
buffer = events.pop() ?? '';
for (let event of events) {
for (const event of events) {
if (event.trim().startsWith('data:')) {
const dataLine: string = event
.split('\n')