feat: add install readme et al
This commit is contained in:
@@ -32,12 +32,7 @@ const ICONS: Record<HermesRefType, ComponentType<{ className?: string }>> = {
|
||||
const CANONICAL_DIRECTIVE_RE = /:([\w-]{1,64})\[([^\]\n]{1,1024})\](?:\{name=([^}\n]{1,1024})\})?/g
|
||||
|
||||
const HERMES_DIRECTIVE_RE = new RegExp(
|
||||
'@(file|folder|url|image|tool):(' +
|
||||
'`[^`\\n]+`' +
|
||||
'|"[^"\\n]+"' +
|
||||
"|'[^'\\n]+'" +
|
||||
'|\\S+' +
|
||||
')',
|
||||
'@(file|folder|url|image|tool):(' + '`[^`\\n]+`' + '|"[^"\\n]+"' + "|'[^'\\n]+'" + '|\\S+' + ')',
|
||||
'g'
|
||||
)
|
||||
|
||||
@@ -59,7 +54,7 @@ function unwrapRefValue(raw: string): string {
|
||||
}
|
||||
|
||||
function needsQuoting(value: string): boolean {
|
||||
return /[\s()\[\]{}<>"'`]/.test(value)
|
||||
return /[\s()[\]{}<>"'`]/.test(value)
|
||||
}
|
||||
|
||||
export function formatRefValue(value: string): string {
|
||||
|
||||
@@ -21,15 +21,7 @@ import {
|
||||
Volume2Icon,
|
||||
VolumeXIcon
|
||||
} from 'lucide-react'
|
||||
import {
|
||||
type FC,
|
||||
type ReactNode,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useLayoutEffect,
|
||||
useRef,
|
||||
useState
|
||||
} from 'react'
|
||||
import { type FC, type ReactNode, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'
|
||||
|
||||
import { useElapsedSeconds } from '@/components/assistant-ui/activity-timer'
|
||||
import { ActivityTimerText } from '@/components/assistant-ui/activity-timer-text'
|
||||
@@ -256,7 +248,9 @@ export const Thread: FC<{
|
||||
scrollToBottomOnThreadSwitch
|
||||
>
|
||||
<div className="flex w-full flex-col gap-3" ref={contentRef}>
|
||||
<ThreadPrimitive.Messages>{() => <ThreadMessage onBranchInNewChat={onBranchInNewChat} />}</ThreadPrimitive.Messages>
|
||||
<ThreadPrimitive.Messages>
|
||||
{() => <ThreadMessage onBranchInNewChat={onBranchInNewChat} />}
|
||||
</ThreadPrimitive.Messages>
|
||||
{loading === 'response' && <ResponseLoadingIndicator />}
|
||||
{loading === 'working' && <WorkingIndicator />}
|
||||
</div>
|
||||
@@ -384,7 +378,12 @@ const WorkingIndicator: FC = () => {
|
||||
|
||||
return (
|
||||
<StatusRow label="Hermes is still working">
|
||||
<Loader className="size-4 text-muted-foreground/60" label="Still working" strokeScale={0.65} type="spiral-search" />
|
||||
<Loader
|
||||
className="size-4 text-muted-foreground/60"
|
||||
label="Still working"
|
||||
strokeScale={0.65}
|
||||
type="spiral-search"
|
||||
/>
|
||||
<span className="shimmer min-w-0 truncate text-muted-foreground/60">Still working…</span>
|
||||
<ActivityTimerText seconds={elapsed} />
|
||||
</StatusRow>
|
||||
|
||||
@@ -176,4 +176,3 @@ export const ToolFallback = ({ toolName, args, result }: ToolCallMessagePartProp
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,9 @@ function NotificationDetail({ detail }: { detail: string }) {
|
||||
Details
|
||||
</summary>
|
||||
<div className="mt-1 rounded-md border border-border/70 bg-background/65 p-2">
|
||||
<pre className="max-h-32 whitespace-pre-wrap wrap-break-word font-mono text-[0.6875rem] leading-relaxed">{detail}</pre>
|
||||
<pre className="max-h-32 whitespace-pre-wrap wrap-break-word font-mono text-[0.6875rem] leading-relaxed">
|
||||
{detail}
|
||||
</pre>
|
||||
<button
|
||||
className="mt-1 inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.6875rem] text-muted-foreground hover:bg-accent hover:text-foreground"
|
||||
onClick={copyDetail}
|
||||
|
||||
@@ -52,7 +52,10 @@ interface LoaderProps extends Omit<ComponentProps<'div'>, 'children'> {
|
||||
type?: LoaderType
|
||||
}
|
||||
|
||||
interface BaseCurveOptions extends Pick<LoaderCurve, 'durationMs' | 'particleCount' | 'pulseDurationMs' | 'strokeWidth' | 'trailSpan'> {
|
||||
interface BaseCurveOptions extends Pick<
|
||||
LoaderCurve,
|
||||
'durationMs' | 'particleCount' | 'pulseDurationMs' | 'strokeWidth' | 'trailSpan'
|
||||
> {
|
||||
point?: LoaderCurve['point']
|
||||
rotate?: boolean
|
||||
rotationDurationMs?: number
|
||||
@@ -206,8 +209,7 @@ const LOADER_CURVES: Record<LoaderType, LoaderCurve> = {
|
||||
point(progress, detailScale) {
|
||||
const t = progress * Math.PI * 12
|
||||
|
||||
const butterfly =
|
||||
Math.exp(Math.cos(t)) - 2 * Math.cos(4 * t) - Math.sin(t / 12) ** 5
|
||||
const butterfly = Math.exp(Math.cos(t)) - 2 * Math.cos(4 * t) - Math.sin(t / 12) ** 5
|
||||
|
||||
const scale = 4.6 + detailScale * 0.45
|
||||
|
||||
@@ -520,7 +522,9 @@ function buildPath(config: LoaderCurve, detailScale: number, steps: number) {
|
||||
}
|
||||
|
||||
function detailScaleFor(time: number, config: LoaderCurve, phaseOffset: number) {
|
||||
const pulseProgress = ((time + phaseOffset * config.pulseDurationMs) % config.pulseDurationMs) / config.pulseDurationMs
|
||||
const pulseProgress =
|
||||
((time + phaseOffset * config.pulseDurationMs) % config.pulseDurationMs) / config.pulseDurationMs
|
||||
|
||||
const pulseAngle = pulseProgress * TWO_PI
|
||||
|
||||
return 0.52 + ((Math.sin(pulseAngle + 0.55) + 1) / 2) * 0.48
|
||||
@@ -548,5 +552,7 @@ function rotationFor(time: number, config: LoaderCurve, phaseOffset: number) {
|
||||
return 0
|
||||
}
|
||||
|
||||
return -(((time + phaseOffset * config.rotationDurationMs) % config.rotationDurationMs) / config.rotationDurationMs) * 360
|
||||
return (
|
||||
-(((time + phaseOffset * config.rotationDurationMs) % config.rotationDurationMs) / config.rotationDurationMs) * 360
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user