mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
fmt(js): npm run fix on merge (#74751)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
9650f555d0
commit
3b47e0c436
6 changed files with 11 additions and 19 deletions
|
|
@ -23,15 +23,17 @@ function gatewayStub(latencyMs = 40) {
|
|||
function setup(latencyMs = 40) {
|
||||
const { calls, gateway } = gatewayStub(latencyMs)
|
||||
|
||||
const { result } = renderHook(() =>
|
||||
useAtCompletions({ gateway: gateway as never, sessionId: 's1', cwd: '/repo' })
|
||||
)
|
||||
const { result } = renderHook(() => useAtCompletions({ gateway: gateway as never, sessionId: 's1', cwd: '/repo' }))
|
||||
|
||||
return { calls, result }
|
||||
}
|
||||
|
||||
/** Type a burst of keystrokes `gapMs` apart, like a person. */
|
||||
async function type(result: { current: { adapter: { search?: (q: string) => unknown } } }, queries: string[], gapMs: number) {
|
||||
async function type(
|
||||
result: { current: { adapter: { search?: (q: string) => unknown } } },
|
||||
queries: string[],
|
||||
gapMs: number
|
||||
) {
|
||||
for (const q of queries) {
|
||||
act(() => {
|
||||
result.current.adapter.search?.(q)
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ export function useAtCompletions(options: {
|
|||
const result = await cachedPathCompletion(cacheKey(query), () =>
|
||||
gateway.request<{ items?: CompletionEntry[] }>('complete.path', params)
|
||||
)
|
||||
|
||||
const items = result.items ?? []
|
||||
|
||||
return { items: items.length > 0 ? items : starters, query }
|
||||
|
|
|
|||
|
|
@ -282,8 +282,7 @@ export function useComposerTrigger({
|
|||
// and a pick must be exactly one undo step.
|
||||
recordUndoPoint?.()
|
||||
|
||||
const rebuildAround = (insert: DocumentFragment | string) =>
|
||||
rebuildAroundCaret(editor, trigger.tokenLength, insert)
|
||||
const rebuildAround = (insert: DocumentFragment | string) => rebuildAroundCaret(editor, trigger.tokenLength, insert)
|
||||
|
||||
// Action items (e.g. "Browse all sessions…") run a side effect instead of
|
||||
// inserting a chip: strip the typed trigger token, then fire the action.
|
||||
|
|
|
|||
|
|
@ -93,8 +93,7 @@ const OPTION_ROW_CLASS =
|
|||
// field-sizing on top of Textarea's shared chrome; kill min-h-16 for one-liners.
|
||||
const CLARIFY_TEXTAREA_CLASS = 'field-sizing-content max-h-40 min-h-0 resize-none'
|
||||
|
||||
const CLARIFY_SHELL_CLASS =
|
||||
`${WIDGET_SHELL_CLASS} text-[length:var(--conversation-text-font-size)] text-(--ui-text-primary)`
|
||||
const CLARIFY_SHELL_CLASS = `${WIDGET_SHELL_CLASS} text-[length:var(--conversation-text-font-size)] text-(--ui-text-primary)`
|
||||
|
||||
const CLARIFY_ICON_CLASS = 'mt-px size-4 shrink-0 text-(--ui-text-tertiary)'
|
||||
|
||||
|
|
@ -522,11 +521,7 @@ function ClarifyToolPending({ args }: ToolCallMessagePartProps) {
|
|||
|
||||
if (loading) {
|
||||
return (
|
||||
<ClarifyShell
|
||||
aria-label={copy.loadingQuestion}
|
||||
className="my-1.5 grid min-h-12 place-items-center"
|
||||
role="status"
|
||||
>
|
||||
<ClarifyShell aria-label={copy.loadingQuestion} className="my-1.5 grid min-h-12 place-items-center" role="status">
|
||||
<Loader2 aria-hidden className="size-4 animate-spin text-(--ui-text-tertiary)" />
|
||||
</ClarifyShell>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ export function refAttrsHtml(kind?: string): string {
|
|||
return kind ? `class="ref" data-ref="${referenceKind(kind)}"` : 'class="ref"'
|
||||
}
|
||||
|
||||
|
||||
/** SVG markup string for embedding directly in HTML (composer contenteditable). */
|
||||
export function directiveIconSvg(type: string) {
|
||||
const inner = iconPathsFor(type)
|
||||
|
|
|
|||
|
|
@ -369,11 +369,7 @@ function MarkdownImageContent({ className, src, alt, ...props }: ComponentProps<
|
|||
return (
|
||||
<span className="my-2 block text-sm text-muted-foreground">
|
||||
Couldn't load {name}.{' '}
|
||||
<button
|
||||
className="ref font-medium text-foreground"
|
||||
onClick={open}
|
||||
type="button"
|
||||
>
|
||||
<button className="ref font-medium text-foreground" onClick={open} type="button">
|
||||
Open image
|
||||
</button>
|
||||
{openFailed && <OpenMediaFailedNote name={name} />}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue