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
1 change: 0 additions & 1 deletion apps/browser-extension/entrypoints/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ export default defineBackground(() => {
})()
return true
}

},
)
})
15 changes: 3 additions & 12 deletions apps/mcp/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,16 @@ export class SupermemoryMCP extends McpAgent<Env, unknown, Props> {
const memorySchema = z.object({
content: z
.string()
.max(
200000,
"Content exceeds maximum length of 200,000 characters",
)
.max(200000, "Content exceeds maximum length of 200,000 characters")
.describe("The memory content to save or forget"),
action: z
.enum(["save", "forget"])
.optional()
.default("save"),
action: z.enum(["save", "forget"]).optional().default("save"),
...(hasRootContainerTag ? {} : containerTagField),
})

const recallSchema = z.object({
query: z
.string()
.max(
1000,
"Query exceeds maximum length of 1,000 characters",
)
.max(1000, "Query exceeds maximum length of 1,000 characters")
.describe("The search query to find relevant memories"),
includeProfile: z.boolean().optional().default(true),
...(hasRootContainerTag ? {} : containerTagField),
Expand Down
5 changes: 3 additions & 2 deletions apps/web/components/add-document/connections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ export function ConnectContent({ selectedProject }: ConnectContentProps) {
useEffect(() => {
if (!autumn.isLoading) {
setIsProUser(
autumn.customer?.products?.some((product) => product.id === "api_pro") ??
false,
autumn.customer?.products?.some(
(product) => product.id === "api_pro",
) ?? false,
)
}
}, [autumn.isLoading, autumn.customer])
Expand Down
45 changes: 39 additions & 6 deletions apps/web/components/chat/message/agent-message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,25 @@ const TOOL_META: Record<string, { label: string; icon: typeof SearchIcon }> = {
cancelSchedule: { label: "Cancel Schedule", icon: XCircleIcon },
}

function ToolCallDisplay({ part }: { part: { type: string; state: string; input?: unknown; output?: unknown; toolCallId?: string } }) {
function ToolCallDisplay({
part,
}: {
part: {
type: string
state: string
input?: unknown
output?: unknown
toolCallId?: string
}
}) {
const [expanded, setExpanded] = useState(false)
const toolName = part.type.replace("tool-", "")
const meta = TOOL_META[toolName]
const Icon = meta?.icon ?? WrenchIcon
const label = meta?.label ?? toolName

const isLoading = part.state === "input-streaming" || part.state === "input-available"
const isLoading =
part.state === "input-streaming" || part.state === "input-available"
const isDone = part.state === "output-available"
const isError = part.state === "error"

Expand All @@ -53,9 +64,27 @@ function ToolCallDisplay({ part }: { part: { type: string; state: string; input?
{isLoading ? (
<Loader2 className="size-3 animate-spin text-blue-400 shrink-0" />
) : (
<Icon className={cn("size-3 shrink-0", isDone ? "text-emerald-400" : isError ? "text-red-400" : "text-white/50")} />
<Icon
className={cn(
"size-3 shrink-0",
isDone
? "text-emerald-400"
: isError
? "text-red-400"
: "text-white/50",
)}
/>
)}
<span className={cn("font-medium", isDone ? "text-emerald-400" : isError ? "text-red-400" : "text-blue-400")}>
<span
className={cn(
"font-medium",
isDone
? "text-emerald-400"
: isError
? "text-red-400"
: "text-blue-400",
)}
>
{label}
</span>
{isLoading && <span className="text-white/40 ml-auto">running...</span>}
Expand All @@ -74,15 +103,19 @@ function ToolCallDisplay({ part }: { part: { type: string; state: string; input?
<div>
<div className="text-white/40 mb-1">Input</div>
<pre className="text-white/70 bg-[#080B10] rounded p-2 overflow-x-auto max-h-40 overflow-y-auto whitespace-pre-wrap break-all">
{typeof part.input === "string" ? part.input : JSON.stringify(part.input, null, 2)}
{typeof part.input === "string"
? part.input
: JSON.stringify(part.input, null, 2)}
</pre>
</div>
)}
{isDone && part.output !== undefined && (
<div>
<div className="text-white/40 mb-1">Output</div>
<pre className="text-white/70 bg-[#080B10] rounded p-2 overflow-x-auto max-h-40 overflow-y-auto whitespace-pre-wrap break-all">
{typeof part.output === "string" ? part.output : JSON.stringify(part.output, null, 2)}
{typeof part.output === "string"
? part.output
: JSON.stringify(part.output, null, 2)}
</pre>
</div>
)}
Expand Down
Loading
Loading