Fix: UI components

This commit is contained in:
Harshith Mullapudi 2025-07-18 16:57:08 +05:30
parent 1d8fab67b2
commit d11cc5dc93
11 changed files with 256 additions and 608 deletions

View File

@ -1,42 +1,42 @@
<svg width="282" height="282" viewBox="0 0 282 282" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M80.0827 36.8297C92.7421 5.92292 120.776 19.7406 134.464 31.4565C135.321 32.19 135.792 33.2698 135.792 34.3978V250.904C135.792 252.083 135.253 253.224 134.336 253.966C103.335 279.044 85.2828 259.211 80.0827 245.933C44.9187 241.31 43.965 210.382 47.8837 195.496C15.173 188.351 17.5591 153.64 22.841 137.178C9.34813 109.018 33.9141 91.8201 47.8837 86.7414C40.524 52.2761 66.2831 39.1064 80.0827 36.8297Z" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="94.9384" y2="-2" transform="matrix(0.594988 0.803734 -0.785925 0.618321 77.3574 39.0923)" stroke="#C15E50" stroke-width="4"/>
<path d="M49.1309 86.2527L136.212 177.224" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="90.5781" y2="-2" transform="matrix(0.81717 0.576396 -0.552987 0.83319 32.5566 144.514)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="145.522" y2="-2" transform="matrix(0.689338 -0.72444 0.703134 0.711057 35.4785 140.498)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="77.0207" y2="-2" transform="matrix(0.531085 -0.847319 0.832259 0.554387 49.1133 196.723)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="111.293" y2="-2" transform="matrix(-0.980107 0.198471 -0.187173 -0.982327 135.791 118.41)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="58.2375" y2="-2" transform="matrix(0.535143 -0.844762 0.829524 0.558472 81.252 246.924)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="64.1562" y2="-2" transform="matrix(-0.506896 -0.862007 0.848017 -0.529968 137.443 252.989)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="45.3484" y2="-2" transform="matrix(-0.0859054 0.996303 -0.995828 -0.0912537 110.471 151.542)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="87.7438" y2="-2" transform="matrix(0.998952 -0.04577 0.0430721 0.999072 49.1133 198.731)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="64.1538" y2="-2" transform="matrix(-0.166991 0.985958 -0.984183 -0.177152 100.73 68.2088)" stroke="#C15E50" stroke-width="4"/>
<circle cx="102.68" cy="67.2048" r="9.88852" fill="#C15E50"/>
<ellipse cx="91.965" cy="129.454" rx="10.7131" ry="11.0442" fill="#C15E50"/>
<circle cx="106.574" cy="194.715" r="9.88852" fill="#C15E50"/>
<ellipse cx="49.5993" cy="86.7831" rx="7.30438" ry="7.53012" fill="#C15E50"/>
<ellipse cx="81.7387" cy="38.5903" rx="6.33046" ry="6.5261" fill="#C15E50"/>
<ellipse cx="27.2" cy="141" rx="11.2" ry="11.5462" fill="#C15E50"/>
<circle cx="81.2534" cy="243.912" r="5.93311" fill="#C15E50"/>
<circle cx="52.0352" cy="194.715" r="6.92197" fill="#C15E50"/>
<path d="M201.917 245.17C189.258 276.077 161.224 262.259 147.536 250.543C146.679 249.81 146.208 248.73 146.208 247.602V31.096C146.208 29.9172 146.747 28.7757 147.664 28.0343C178.665 2.95557 196.717 22.7885 201.917 36.0669C237.081 40.6903 238.035 71.618 234.116 86.5039C266.827 93.6492 264.441 128.36 259.159 144.822C272.652 172.982 248.086 190.18 234.116 195.259C241.476 229.724 215.717 242.894 201.917 245.17Z" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="94.9384" y2="-2" transform="matrix(-0.594988 -0.803734 0.785925 -0.618321 204.643 242.908)" stroke="#C15E50" stroke-width="4"/>
<path d="M232.869 195.747L145.788 104.776" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="90.5781" y2="-2" transform="matrix(-0.81717 -0.576396 0.552987 -0.83319 249.443 137.486)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="145.522" y2="-2" transform="matrix(-0.689338 0.72444 -0.703134 -0.711057 246.521 141.502)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="77.0207" y2="-2" transform="matrix(-0.531085 0.847319 -0.832259 -0.554387 232.887 85.2771)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="111.293" y2="-2" transform="matrix(0.980107 -0.198471 0.187173 0.982327 146.209 163.59)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="58.2375" y2="-2" transform="matrix(-0.535143 0.844762 -0.829524 -0.558472 200.748 35.0763)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="64.1562" y2="-2" transform="matrix(0.506896 0.862007 -0.848017 0.529968 144.557 29.0108)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="45.3484" y2="-2" transform="matrix(0.0859054 -0.996303 0.995828 0.0912537 171.529 130.458)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="87.7438" y2="-2" transform="matrix(-0.998952 0.04577 -0.0430721 -0.999072 232.887 83.2691)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="64.1538" y2="-2" transform="matrix(0.166991 -0.985958 0.984183 0.177152 181.27 213.791)" stroke="#C15E50" stroke-width="4"/>
<circle cx="179.32" cy="214.795" r="9.88852" transform="rotate(180 179.32 214.795)" fill="#C15E50"/>
<ellipse cx="190.035" cy="152.546" rx="10.7131" ry="11.0442" transform="rotate(180 190.035 152.546)" fill="#C15E50"/>
<circle cx="175.426" cy="87.2852" r="9.88852" transform="rotate(180 175.426 87.2852)" fill="#C15E50"/>
<ellipse cx="232.401" cy="195.217" rx="7.30438" ry="7.53012" transform="rotate(180 232.401 195.217)" fill="#C15E50"/>
<ellipse cx="200.261" cy="243.41" rx="6.33046" ry="6.5261" transform="rotate(180 200.261 243.41)" fill="#C15E50"/>
<ellipse cx="254.8" cy="141" rx="11.2" ry="11.5462" transform="rotate(180 254.8 141)" fill="#C15E50"/>
<circle cx="200.747" cy="38.0884" r="5.93311" transform="rotate(180 200.747 38.0884)" fill="#C15E50"/>
<circle cx="229.965" cy="87.2852" r="6.92197" transform="rotate(180 229.965 87.2852)" fill="#C15E50"/>
<path d="M80.0827 34.974C92.7457 3.8081 120.792 17.7546 134.476 29.5676C135.325 30.301 135.792 31.3761 135.792 32.4985V250.806C135.792 251.98 135.258 253.117 134.349 253.858C103.339 279.155 85.2835 259.158 80.0827 245.771C44.9187 241.11 43.965 209.932 47.8837 194.925C15.173 187.722 17.5591 152.731 22.841 136.135C9.34813 107.747 33.9141 90.4097 47.8837 85.2899C40.524 50.5456 66.2831 37.2692 80.0827 34.974Z" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="95.4357" y2="-2.5" transform="matrix(0.591888 0.80602 -0.783494 0.6214 77.3574 37.2551)" stroke="#C15E50" stroke-width="5"/>
<path d="M49.1309 84.7972L136.212 176.505" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="90.8224" y2="-2.5" transform="matrix(0.814972 0.5795 -0.549892 0.835235 32.5566 143.53)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="146.141" y2="-2.5" transform="matrix(0.686415 -0.72721 0.700262 0.713886 35.4785 139.482)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="77.4689" y2="-2.5" transform="matrix(0.528012 -0.849237 0.830187 0.557485 49.1133 196.162)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="111.328" y2="-2.5" transform="matrix(-0.979793 0.200014 -0.185721 -0.982602 135.791 117.215)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="58.5744" y2="-2.5" transform="matrix(0.532065 -0.846704 0.827428 0.561572 81.252 246.769)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="64.5426" y2="-2.5" transform="matrix(-0.503861 -0.863784 0.846088 -0.533044 137.443 252.884)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="45.7129" y2="-2.5" transform="matrix(-0.0852204 0.996362 -0.99576 -0.0919863 110.471 150.615)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="87.7453" y2="-2.5" transform="matrix(0.998935 -0.0461398 0.0427267 0.999087 49.1133 198.186)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="64.6589" y2="-2.5" transform="matrix(-0.165686 0.986178 -0.983932 -0.178541 100.73 66.6073)" stroke="#C15E50" stroke-width="5"/>
<circle cx="103.955" cy="66.3968" r="11.0444" fill="#C15E50"/>
<circle cx="90.4996" cy="129.403" r="11.5465" fill="#C15E50"/>
<circle cx="103.955" cy="197.449" r="11.0444" fill="#C15E50"/>
<circle cx="48.4992" cy="86.0547" r="8.53434" fill="#C15E50"/>
<path d="M86.0294 34.6113C86.0294 38.7701 82.6579 42.1416 78.4991 42.1416C74.3402 42.1416 70.9688 38.7701 70.9688 34.6113C70.9688 30.4524 74.3402 27.081 78.4991 27.081C82.6579 27.081 86.0294 30.4524 86.0294 34.6113Z" fill="#C15E50"/>
<circle cx="29.0525" cy="140.996" r="13.0525" fill="#C15E50"/>
<circle cx="79.0009" cy="246.875" r="7.02828" fill="#C15E50"/>
<path d="M53.0314 195.433C53.0314 199.869 49.4352 203.466 44.9991 203.466C40.563 203.466 36.9668 199.869 36.9668 195.433C36.9668 190.997 40.563 187.401 44.9991 187.401C49.4352 187.401 53.0314 190.997 53.0314 195.433Z" fill="#C15E50"/>
<path d="M202.806 247.026C190.143 278.192 162.097 264.245 148.413 252.432C147.563 251.699 147.097 250.624 147.097 249.501V31.1935C147.097 30.0203 147.631 28.8833 148.54 28.1417C179.549 2.84476 197.605 22.8418 202.806 36.2294C237.97 40.8903 238.924 72.0684 235.005 87.0748C267.716 94.2779 265.33 129.269 260.048 145.865C273.541 174.253 248.975 191.59 235.005 196.71C242.365 231.454 216.606 244.731 202.806 247.026Z" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="95.4357" y2="-2.5" transform="matrix(-0.591888 -0.80602 0.783494 -0.6214 205.531 244.745)" stroke="#C15E50" stroke-width="5"/>
<path d="M233.758 197.203L146.677 105.495" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="90.8224" y2="-2.5" transform="matrix(-0.814972 -0.5795 0.549892 -0.835235 250.332 138.47)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="146.141" y2="-2.5" transform="matrix(-0.686415 0.72721 -0.700262 -0.713886 247.41 142.518)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="77.4689" y2="-2.5" transform="matrix(-0.528012 0.849237 -0.830187 -0.557485 233.775 85.838)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="111.328" y2="-2.5" transform="matrix(0.979793 -0.200014 0.185721 0.982602 147.098 164.785)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="58.5744" y2="-2.5" transform="matrix(-0.532065 0.846704 -0.827428 -0.561572 201.637 35.2307)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="64.5426" y2="-2.5" transform="matrix(0.503861 0.863784 -0.846088 0.533044 145.445 29.1161)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="45.7129" y2="-2.5" transform="matrix(0.0852204 -0.996362 0.99576 0.0919863 172.418 131.385)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="87.7453" y2="-2.5" transform="matrix(-0.998935 0.0461398 -0.0427267 -0.999087 233.775 83.8137)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="64.6589" y2="-2.5" transform="matrix(0.165686 -0.986178 0.983932 0.178541 182.158 215.393)" stroke="#C15E50" stroke-width="5"/>
<circle cx="178.934" cy="215.603" r="11.0444" transform="rotate(180 178.934 215.603)" fill="#C15E50"/>
<circle cx="192.389" cy="152.597" r="11.5465" transform="rotate(180 192.389 152.597)" fill="#C15E50"/>
<circle cx="178.934" cy="84.5506" r="11.0444" transform="rotate(180 178.934 84.5506)" fill="#C15E50"/>
<circle cx="234.389" cy="195.945" r="8.53434" transform="rotate(180 234.389 195.945)" fill="#C15E50"/>
<path d="M196.859 247.389C196.859 243.23 200.231 239.858 204.39 239.858C208.548 239.858 211.92 243.23 211.92 247.389C211.92 251.548 208.548 254.919 204.39 254.919C200.231 254.919 196.859 251.548 196.859 247.389Z" fill="#C15E50"/>
<circle cx="253.836" cy="141.004" r="13.0525" transform="rotate(180 253.836 141.004)" fill="#C15E50"/>
<circle cx="203.888" cy="35.1255" r="7.02828" transform="rotate(180 203.888 35.1255)" fill="#C15E50"/>
<path d="M229.857 86.5668C229.857 82.1307 233.453 78.5345 237.89 78.5345C242.326 78.5345 245.922 82.1307 245.922 86.5668C245.922 91.0029 242.326 94.5991 237.89 94.5991C233.453 94.5991 229.857 91.0029 229.857 86.5668Z" fill="#C15E50"/>
</svg>

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

File diff suppressed because one or more lines are too long

View File

@ -99,9 +99,8 @@ export function LogTextCollapse({
<p
className="px-3 py-2 text-sm break-words whitespace-pre-wrap"
style={{ lineHeight: "1.5" }}
>
{text}
</p>
dangerouslySetInnerHTML={{ __html: text }}
/>
</div>
</DialogContent>
</Dialog>

View File

@ -1,7 +1,8 @@
import { json } from "@remix-run/node";
import { createActionApiRoute } from "~/services/routeBuilders/apiBuilder.server";
import { addToQueue, IngestBodyRequest } from "~/lib/ingest.server";
import { addToQueue } from "~/lib/ingest.server";
import { IngestBodyRequest } from "~/trigger/ingest/ingest";
const { action, loader } = createActionApiRoute(
{

View File

@ -1,24 +0,0 @@
// DEPRECATED: This route is deprecated. Please use /api/v1/add instead.
// The API logic has been moved to /api/v1/add. This file is retained for reference only.
import { json } from "@remix-run/node";
import { createActionApiRoute } from "~/services/routeBuilders/apiBuilder.server";
import { addToQueue, IngestBodyRequest } from "~/lib/ingest.server";
const { action, loader } = createActionApiRoute(
{
body: IngestBodyRequest,
allowJWT: true,
authorization: {
action: "ingest",
},
corsStrategy: "all",
},
async ({ body, authentication }) => {
const response = addToQueue(body, authentication.userId);
return json({ ...response });
},
);
export { action, loader };

View File

@ -1,213 +0,0 @@
// import { json } from "@remix-run/node";
// import { z } from "zod";
// import { createActionApiRoute } from "~/services/routeBuilders/apiBuilder.server";
// import { getUserQueue, type IngestBodyRequest } from "~/lib/ingest.server";
// import { prisma } from "~/db.server";
// import { logger } from "~/services/logger.service";
// import { IngestionStatus, type Prisma } from "@core/database";
// const ReingestionBodyRequest = z.object({
// userId: z.string().optional(),
// spaceId: z.string().optional(),
// dryRun: z.boolean().optional().default(false),
// });
// type ReingestionRequest = z.infer<typeof ReingestionBodyRequest>;
// async function getCompletedIngestionsByUser(userId?: string, spaceId?: string) {
// const whereClause: Prisma.IngestionQueueWhereInput = {
// status: IngestionStatus.COMPLETED,
// };
// if (userId) {
// whereClause.workspace = {
// userId: userId,
// };
// }
// if (spaceId) {
// whereClause.spaceId = spaceId;
// }
// const ingestions = await prisma.ingestionQueue.findMany({
// where: whereClause,
// include: {
// workspace: {
// include: {
// user: true,
// },
// },
// },
// orderBy: [
// { createdAt: 'asc' }, // Maintain temporal order
// ],
// });
// return ingestions;
// }
// async function getAllUsers() {
// const users = await prisma.user.findMany({
// include: {
// Workspace: true,
// },
// });
// return users.filter(user => user.Workspace); // Only users with workspaces
// }
// async function reingestionForUser(userId: string, spaceId?: string, dryRun = false) {
// const ingestions = await getCompletedIngestionsByUser(userId, spaceId);
// logger.info(`Found ${ingestions.length} completed ingestions for user ${userId}${spaceId ? ` in space ${spaceId}` : ''}`);
// if (dryRun) {
// return {
// userId,
// ingestionCount: ingestions.length,
// ingestions: ingestions.map(ing => ({
// id: ing.id,
// createdAt: ing.createdAt,
// spaceId: ing.spaceId,
// data: {
// episodeBody: (ing.data as any)?.episodeBody?.substring(0, 100) +
// ((ing.data as any)?.episodeBody?.length > 100 ? '...' : ''),
// source: (ing.data as any)?.source,
// referenceTime: (ing.data as any)?.referenceTime,
// },
// })),
// };
// }
// // Queue ingestions in temporal order (already sorted by createdAt ASC)
// const queuedJobs = [];
// const ingestionQueue = getUserQueue(userId);
// for (const ingestion of ingestions) {
// try {
// // Parse the original data and add reingestion metadata
// const originalData = ingestion.data as z.infer<typeof IngestBodyRequest>;
// const reingestionData = {
// ...originalData,
// source: `reingest-${originalData.source}`,
// metadata: {
// ...originalData.metadata,
// isReingestion: true,
// originalIngestionId: ingestion.id,
// },
// };
// const jobDetails = await ingestionQueue.add(
// `ingest-user-${userId}`,
// {
// queueId: ingestion.id,
// spaceId: ingestion.spaceId,
// userId: userId,
// body: ingestion.data,
// },
// {
// jobId: `${userId}-${Date.now()}`,
// },
// );
// queuedJobs.push({id: jobDetails.id});
// } catch (error) {
// logger.error(`Failed to queue ingestion ${ingestion.id} for user ${userId}:`, {error});
// }
// }
// return {
// userId,
// ingestionCount: ingestions.length,
// queuedJobsCount: queuedJobs.length,
// queuedJobs,
// };
// }
// const { action, loader } = createActionApiRoute(
// {
// body: ReingestionBodyRequest,
// allowJWT: true,
// authorization: {
// action: "reingest",
// },
// corsStrategy: "all",
// },
// async ({ body, authentication }) => {
// const { userId, spaceId, dryRun } = body;
// try {
// // Check if the user is an admin
// const user = await prisma.user.findUnique({
// where: { id: authentication.userId }
// });
// if (!user || user.admin !== true) {
// logger.warn("Unauthorized reingest attempt", {
// requestUserId: authentication.userId,
// });
// return json(
// {
// success: false,
// error: "Unauthorized: Only admin users can perform reingestion"
// },
// { status: 403 }
// );
// }
// if (userId) {
// // Reingest for specific user
// const result = await reingestionForUser(userId, spaceId, dryRun);
// return json({
// success: true,
// type: "single_user",
// result,
// });
// } else {
// // Reingest for all users
// const users = await getAllUsers();
// const results = [];
// logger.info(`Starting reingestion for ${users.length} users`);
// for (const user of users) {
// try {
// const result = await reingestionForUser(user.id, spaceId, dryRun);
// results.push(result);
// if (!dryRun) {
// // Add small delay between users to prevent overwhelming the system
// await new Promise(resolve => setTimeout(resolve, 1000));
// }
// } catch (error) {
// logger.error(`Failed to reingest for user ${user.id}:`, {error});
// results.push({
// userId: user.id,
// error: error instanceof Error ? error.message : "Unknown error",
// });
// }
// }
// return json({
// success: true,
// type: "all_users",
// totalUsers: users.length,
// results,
// summary: {
// totalIngestions: results.reduce((sum, r) => sum, 0),
// totalQueuedJobs: results.reduce((sum, r) => sum, 0),
// },
// });
// }
// } catch (error) {
// logger.error("Reingestion failed:", {error});
// return json(
// {
// success: false,
// error: error instanceof Error ? error.message : "Unknown error",
// },
// { status: 500 }
// );
// }
// }
// );
// export { action, loader };

View File

@ -1,53 +0,0 @@
// DEPRECATED: This route is deprecated. Please use /api/v1/search instead.
// The API logic has been moved to /api/v1/search. This file is retained for reference only.
import { z } from "zod";
import { createActionApiRoute } from "~/services/routeBuilders/apiBuilder.server";
import { SearchService } from "~/services/search.server";
import { json } from "@remix-run/node";
export const SearchBodyRequest = z.object({
query: z.string(),
startTime: z.string().optional(),
endTime: z.string().optional(),
// These are not supported yet, but need to support these
spaceId: z.string().optional(),
limit: z.number().optional(),
maxBfsDepth: z.number().optional(),
includeInvalidated: z.boolean().optional(),
entityTypes: z.array(z.string()).optional(),
scoreThreshold: z.number().optional(),
minResults: z.number().optional(),
});
const searchService = new SearchService();
const { action, loader } = createActionApiRoute(
{
body: SearchBodyRequest,
allowJWT: true,
authorization: {
action: "search",
},
corsStrategy: "all",
},
async ({ body, authentication }) => {
const results = await searchService.search(
body.query,
authentication.userId,
{
startTime: body.startTime ? new Date(body.startTime) : undefined,
endTime: body.endTime ? new Date(body.endTime) : undefined,
limit: body.limit,
maxBfsDepth: body.maxBfsDepth,
includeInvalidated: body.includeInvalidated,
entityTypes: body.entityTypes,
scoreThreshold: body.scoreThreshold,
minResults: body.minResults,
},
);
return json(results);
},
);
export { action, loader };

View File

@ -20,7 +20,10 @@ export interface AddMemoryParams {
export const searchMemory = async (params: SearchMemoryParams) => {
try {
const response = await axios.post("https://core::memory/search", params);
const response = await axios.post(
"https://core::memory/api/v1/search",
params,
);
return response.data;
} catch (error) {
logger.error("Memory search failed", { error, params });
@ -39,7 +42,7 @@ export const addMemory = async (params: AddMemoryParams) => {
};
const response = await axios.post(
"https://core::memory/ingest",
"https://core::memory/api/v1/add",
memoryInput,
);
return response.data;

View File

@ -37,6 +37,7 @@ type CreatePersonalAccessTokenOptions = {
userId: string;
};
// TODO remove from here
// Helper functions for token management
function createToken() {
return `${tokenPrefix}${tokenGenerator()}`;
@ -188,9 +189,9 @@ export const init = async ({ payload }: { payload: InitChatPayload }) => {
if (config.url?.startsWith("https://core::memory")) {
// Handle both search and ingest endpoints
if (config.url.includes("/search")) {
config.url = `${process.env.API_BASE_URL}/search`;
} else if (config.url.includes("/ingest")) {
config.url = `${process.env.API_BASE_URL}/ingest`;
config.url = `${process.env.API_BASE_URL}/api/v1/search`;
} else if (config.url.includes("/add")) {
config.url = `${process.env.API_BASE_URL}/api/v1/add`;
}
config.headers.Authorization = `Bearer ${pat.token}`;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -1,42 +1,42 @@
<svg width="282" height="282" viewBox="0 0 282 282" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M80.0827 36.8297C92.7421 5.92292 120.776 19.7406 134.464 31.4565C135.321 32.19 135.792 33.2698 135.792 34.3978V250.904C135.792 252.083 135.253 253.224 134.336 253.966C103.335 279.044 85.2828 259.211 80.0827 245.933C44.9187 241.31 43.965 210.382 47.8837 195.496C15.173 188.351 17.5591 153.64 22.841 137.178C9.34813 109.018 33.9141 91.8201 47.8837 86.7414C40.524 52.2761 66.2831 39.1064 80.0827 36.8297Z" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="94.9384" y2="-2" transform="matrix(0.594988 0.803734 -0.785925 0.618321 77.3574 39.0923)" stroke="#C15E50" stroke-width="4"/>
<path d="M49.1309 86.2527L136.212 177.224" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="90.5781" y2="-2" transform="matrix(0.81717 0.576396 -0.552987 0.83319 32.5566 144.514)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="145.522" y2="-2" transform="matrix(0.689338 -0.72444 0.703134 0.711057 35.4785 140.498)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="77.0207" y2="-2" transform="matrix(0.531085 -0.847319 0.832259 0.554387 49.1133 196.723)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="111.293" y2="-2" transform="matrix(-0.980107 0.198471 -0.187173 -0.982327 135.791 118.41)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="58.2375" y2="-2" transform="matrix(0.535143 -0.844762 0.829524 0.558472 81.252 246.924)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="64.1562" y2="-2" transform="matrix(-0.506896 -0.862007 0.848017 -0.529968 137.443 252.989)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="45.3484" y2="-2" transform="matrix(-0.0859054 0.996303 -0.995828 -0.0912537 110.471 151.542)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="87.7438" y2="-2" transform="matrix(0.998952 -0.04577 0.0430721 0.999072 49.1133 198.731)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="64.1538" y2="-2" transform="matrix(-0.166991 0.985958 -0.984183 -0.177152 100.73 68.2088)" stroke="#C15E50" stroke-width="4"/>
<circle cx="102.68" cy="67.2048" r="9.88852" fill="#C15E50"/>
<ellipse cx="91.965" cy="129.454" rx="10.7131" ry="11.0442" fill="#C15E50"/>
<circle cx="106.574" cy="194.715" r="9.88852" fill="#C15E50"/>
<ellipse cx="49.5993" cy="86.7831" rx="7.30438" ry="7.53012" fill="#C15E50"/>
<ellipse cx="81.7387" cy="38.5903" rx="6.33046" ry="6.5261" fill="#C15E50"/>
<ellipse cx="27.2" cy="141" rx="11.2" ry="11.5462" fill="#C15E50"/>
<circle cx="81.2534" cy="243.912" r="5.93311" fill="#C15E50"/>
<circle cx="52.0352" cy="194.715" r="6.92197" fill="#C15E50"/>
<path d="M201.917 245.17C189.258 276.077 161.224 262.259 147.536 250.543C146.679 249.81 146.208 248.73 146.208 247.602V31.096C146.208 29.9172 146.747 28.7757 147.664 28.0343C178.665 2.95557 196.717 22.7885 201.917 36.0669C237.081 40.6903 238.035 71.618 234.116 86.5039C266.827 93.6492 264.441 128.36 259.159 144.822C272.652 172.982 248.086 190.18 234.116 195.259C241.476 229.724 215.717 242.894 201.917 245.17Z" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="94.9384" y2="-2" transform="matrix(-0.594988 -0.803734 0.785925 -0.618321 204.643 242.908)" stroke="#C15E50" stroke-width="4"/>
<path d="M232.869 195.747L145.788 104.776" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="90.5781" y2="-2" transform="matrix(-0.81717 -0.576396 0.552987 -0.83319 249.443 137.486)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="145.522" y2="-2" transform="matrix(-0.689338 0.72444 -0.703134 -0.711057 246.521 141.502)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="77.0207" y2="-2" transform="matrix(-0.531085 0.847319 -0.832259 -0.554387 232.887 85.2771)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="111.293" y2="-2" transform="matrix(0.980107 -0.198471 0.187173 0.982327 146.209 163.59)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="58.2375" y2="-2" transform="matrix(-0.535143 0.844762 -0.829524 -0.558472 200.748 35.0763)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="64.1562" y2="-2" transform="matrix(0.506896 0.862007 -0.848017 0.529968 144.557 29.0108)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="45.3484" y2="-2" transform="matrix(0.0859054 -0.996303 0.995828 0.0912537 171.529 130.458)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="87.7438" y2="-2" transform="matrix(-0.998952 0.04577 -0.0430721 -0.999072 232.887 83.2691)" stroke="#C15E50" stroke-width="4"/>
<line y1="-2" x2="64.1538" y2="-2" transform="matrix(0.166991 -0.985958 0.984183 0.177152 181.27 213.791)" stroke="#C15E50" stroke-width="4"/>
<circle cx="179.32" cy="214.795" r="9.88852" transform="rotate(180 179.32 214.795)" fill="#C15E50"/>
<ellipse cx="190.035" cy="152.546" rx="10.7131" ry="11.0442" transform="rotate(180 190.035 152.546)" fill="#C15E50"/>
<circle cx="175.426" cy="87.2852" r="9.88852" transform="rotate(180 175.426 87.2852)" fill="#C15E50"/>
<ellipse cx="232.401" cy="195.217" rx="7.30438" ry="7.53012" transform="rotate(180 232.401 195.217)" fill="#C15E50"/>
<ellipse cx="200.261" cy="243.41" rx="6.33046" ry="6.5261" transform="rotate(180 200.261 243.41)" fill="#C15E50"/>
<ellipse cx="254.8" cy="141" rx="11.2" ry="11.5462" transform="rotate(180 254.8 141)" fill="#C15E50"/>
<circle cx="200.747" cy="38.0884" r="5.93311" transform="rotate(180 200.747 38.0884)" fill="#C15E50"/>
<circle cx="229.965" cy="87.2852" r="6.92197" transform="rotate(180 229.965 87.2852)" fill="#C15E50"/>
<path d="M80.0827 34.974C92.7457 3.8081 120.792 17.7546 134.476 29.5676C135.325 30.301 135.792 31.3761 135.792 32.4985V250.806C135.792 251.98 135.258 253.117 134.349 253.858C103.339 279.155 85.2835 259.158 80.0827 245.771C44.9187 241.11 43.965 209.932 47.8837 194.925C15.173 187.722 17.5591 152.731 22.841 136.135C9.34813 107.747 33.9141 90.4097 47.8837 85.2899C40.524 50.5456 66.2831 37.2692 80.0827 34.974Z" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="95.4357" y2="-2.5" transform="matrix(0.591888 0.80602 -0.783494 0.6214 77.3574 37.2551)" stroke="#C15E50" stroke-width="5"/>
<path d="M49.1309 84.7972L136.212 176.505" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="90.8224" y2="-2.5" transform="matrix(0.814972 0.5795 -0.549892 0.835235 32.5566 143.53)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="146.141" y2="-2.5" transform="matrix(0.686415 -0.72721 0.700262 0.713886 35.4785 139.482)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="77.4689" y2="-2.5" transform="matrix(0.528012 -0.849237 0.830187 0.557485 49.1133 196.162)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="111.328" y2="-2.5" transform="matrix(-0.979793 0.200014 -0.185721 -0.982602 135.791 117.215)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="58.5744" y2="-2.5" transform="matrix(0.532065 -0.846704 0.827428 0.561572 81.252 246.769)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="64.5426" y2="-2.5" transform="matrix(-0.503861 -0.863784 0.846088 -0.533044 137.443 252.884)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="45.7129" y2="-2.5" transform="matrix(-0.0852204 0.996362 -0.99576 -0.0919863 110.471 150.615)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="87.7453" y2="-2.5" transform="matrix(0.998935 -0.0461398 0.0427267 0.999087 49.1133 198.186)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="64.6589" y2="-2.5" transform="matrix(-0.165686 0.986178 -0.983932 -0.178541 100.73 66.6073)" stroke="#C15E50" stroke-width="5"/>
<circle cx="103.955" cy="66.3968" r="11.0444" fill="#C15E50"/>
<circle cx="90.4996" cy="129.403" r="11.5465" fill="#C15E50"/>
<circle cx="103.955" cy="197.449" r="11.0444" fill="#C15E50"/>
<circle cx="48.4992" cy="86.0547" r="8.53434" fill="#C15E50"/>
<path d="M86.0294 34.6113C86.0294 38.7701 82.6579 42.1416 78.4991 42.1416C74.3402 42.1416 70.9688 38.7701 70.9688 34.6113C70.9688 30.4524 74.3402 27.081 78.4991 27.081C82.6579 27.081 86.0294 30.4524 86.0294 34.6113Z" fill="#C15E50"/>
<circle cx="29.0525" cy="140.996" r="13.0525" fill="#C15E50"/>
<circle cx="79.0009" cy="246.875" r="7.02828" fill="#C15E50"/>
<path d="M53.0314 195.433C53.0314 199.869 49.4352 203.466 44.9991 203.466C40.563 203.466 36.9668 199.869 36.9668 195.433C36.9668 190.997 40.563 187.401 44.9991 187.401C49.4352 187.401 53.0314 190.997 53.0314 195.433Z" fill="#C15E50"/>
<path d="M202.806 247.026C190.143 278.192 162.097 264.245 148.413 252.432C147.563 251.699 147.097 250.624 147.097 249.501V31.1935C147.097 30.0203 147.631 28.8833 148.54 28.1417C179.549 2.84476 197.605 22.8418 202.806 36.2294C237.97 40.8903 238.924 72.0684 235.005 87.0748C267.716 94.2779 265.33 129.269 260.048 145.865C273.541 174.253 248.975 191.59 235.005 196.71C242.365 231.454 216.606 244.731 202.806 247.026Z" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="95.4357" y2="-2.5" transform="matrix(-0.591888 -0.80602 0.783494 -0.6214 205.531 244.745)" stroke="#C15E50" stroke-width="5"/>
<path d="M233.758 197.203L146.677 105.495" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="90.8224" y2="-2.5" transform="matrix(-0.814972 -0.5795 0.549892 -0.835235 250.332 138.47)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="146.141" y2="-2.5" transform="matrix(-0.686415 0.72721 -0.700262 -0.713886 247.41 142.518)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="77.4689" y2="-2.5" transform="matrix(-0.528012 0.849237 -0.830187 -0.557485 233.775 85.838)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="111.328" y2="-2.5" transform="matrix(0.979793 -0.200014 0.185721 0.982602 147.098 164.785)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="58.5744" y2="-2.5" transform="matrix(-0.532065 0.846704 -0.827428 -0.561572 201.637 35.2307)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="64.5426" y2="-2.5" transform="matrix(0.503861 0.863784 -0.846088 0.533044 145.445 29.1161)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="45.7129" y2="-2.5" transform="matrix(0.0852204 -0.996362 0.99576 0.0919863 172.418 131.385)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="87.7453" y2="-2.5" transform="matrix(-0.998935 0.0461398 -0.0427267 -0.999087 233.775 83.8137)" stroke="#C15E50" stroke-width="5"/>
<line y1="-2.5" x2="64.6589" y2="-2.5" transform="matrix(0.165686 -0.986178 0.983932 0.178541 182.158 215.393)" stroke="#C15E50" stroke-width="5"/>
<circle cx="178.934" cy="215.603" r="11.0444" transform="rotate(180 178.934 215.603)" fill="#C15E50"/>
<circle cx="192.389" cy="152.597" r="11.5465" transform="rotate(180 192.389 152.597)" fill="#C15E50"/>
<circle cx="178.934" cy="84.5506" r="11.0444" transform="rotate(180 178.934 84.5506)" fill="#C15E50"/>
<circle cx="234.389" cy="195.945" r="8.53434" transform="rotate(180 234.389 195.945)" fill="#C15E50"/>
<path d="M196.859 247.389C196.859 243.23 200.231 239.858 204.39 239.858C208.548 239.858 211.92 243.23 211.92 247.389C211.92 251.548 208.548 254.919 204.39 254.919C200.231 254.919 196.859 251.548 196.859 247.389Z" fill="#C15E50"/>
<circle cx="253.836" cy="141.004" r="13.0525" transform="rotate(180 253.836 141.004)" fill="#C15E50"/>
<circle cx="203.888" cy="35.1255" r="7.02828" transform="rotate(180 203.888 35.1255)" fill="#C15E50"/>
<path d="M229.857 86.5668C229.857 82.1307 233.453 78.5345 237.89 78.5345C242.326 78.5345 245.922 82.1307 245.922 86.5668C245.922 91.0029 242.326 94.5991 237.89 94.5991C233.453 94.5991 229.857 91.0029 229.857 86.5668Z" fill="#C15E50"/>
</svg>

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB