forked from Zakaria/hermes-agent
Hermes-agent
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export const LONG_RUN_CHARMS = ['still cooking…', 'polishing edges…', 'asking the void nicely…']
|
||||
@@ -0,0 +1,17 @@
|
||||
export const FACES = [
|
||||
'(。•́︿•̀。)',
|
||||
'(◔_◔)',
|
||||
'(¬‿¬)',
|
||||
'( •_•)>⌐■-■',
|
||||
'(⌐■_■)',
|
||||
'(´・_・`)',
|
||||
'◉_◉',
|
||||
'(°ロ°)',
|
||||
'( ˘⌣˘)♡',
|
||||
'ヽ(>∀<☆)☆',
|
||||
'٩(๑❛ᴗ❛๑)۶',
|
||||
'(⊙_⊙)',
|
||||
'(¬_¬)',
|
||||
'( ͡° ͜ʖ ͡°)',
|
||||
'ಠ_ಠ'
|
||||
]
|
||||
@@ -0,0 +1,30 @@
|
||||
const FORTUNES = [
|
||||
'you are one clean refactor away from clarity',
|
||||
'a tiny rename today prevents a huge bug tomorrow',
|
||||
'your next commit message will be immaculate',
|
||||
'the edge case you are ignoring is already solved in your head',
|
||||
'minimal diff, maximal calm',
|
||||
'today favors bold deletions over new abstractions',
|
||||
'the right helper is already in your codebase',
|
||||
'you will ship before overthinking catches up',
|
||||
'tests are about to save your future self',
|
||||
'your instincts are correctly suspicious of that one branch'
|
||||
]
|
||||
|
||||
const LEGENDARY = [
|
||||
'legendary drop: one-line fix, first try',
|
||||
'legendary drop: every flaky test passes cleanly',
|
||||
'legendary drop: your diff teaches by itself'
|
||||
]
|
||||
|
||||
const hash = (s: string) => [...s].reduce((h, c) => Math.imul(h ^ c.charCodeAt(0), 16777619), 2166136261) >>> 0
|
||||
|
||||
const fromScore = (n: number) => {
|
||||
const rare = n % 20 === 0
|
||||
const bag = rare ? LEGENDARY : FORTUNES
|
||||
|
||||
return `${rare ? '🌟' : '🔮'} ${bag[n % bag.length]}`
|
||||
}
|
||||
|
||||
export const randomFortune = () => fromScore(Math.floor(Math.random() * 0x7fffffff))
|
||||
export const dailyFortune = (seed: null | string) => fromScore(hash(`${seed || 'anon'}|${new Date().toDateString()}`))
|
||||
@@ -0,0 +1,37 @@
|
||||
import { isMac, isRemoteShell } from '../lib/platform.js'
|
||||
|
||||
const action = isMac ? 'Cmd' : 'Ctrl'
|
||||
const paste = isMac ? 'Cmd' : 'Alt'
|
||||
|
||||
const copyHotkeys: [string, string][] = isMac
|
||||
? [
|
||||
['Cmd+C', 'copy selection'],
|
||||
['Ctrl+C', 'interrupt / clear draft / exit']
|
||||
]
|
||||
: isRemoteShell()
|
||||
? [
|
||||
['Cmd+C', 'copy selection when forwarded by the terminal'],
|
||||
['Ctrl+C', 'copy selection / interrupt / clear draft / exit']
|
||||
]
|
||||
: [['Ctrl+C', 'copy selection / interrupt / clear draft / exit']]
|
||||
|
||||
export const HOTKEYS: [string, string][] = [
|
||||
...copyHotkeys,
|
||||
[action + '+D', 'exit'],
|
||||
[action + '+G / Alt+G', 'open $EDITOR (Alt+G fallback for VSCode/Cursor)'],
|
||||
[action + '+L', 'redraw / repaint'],
|
||||
[paste + '+V / /paste', 'paste text; /paste attaches clipboard image'],
|
||||
['Tab', 'apply completion'],
|
||||
['↑/↓', 'completions / queue edit / history'],
|
||||
['Ctrl+X', 'open live session switcher (deletes queued message while editing)'],
|
||||
[action + '+A/E', 'home / end of line'],
|
||||
[action + '+Z / ' + action + '+Y', 'undo / redo input edits'],
|
||||
[action + '+W', 'delete word'],
|
||||
[action + '+U/K', 'delete to start / end'],
|
||||
[action + '+←/→', 'jump word'],
|
||||
['Home/End', 'start / end of line'],
|
||||
['Shift+Enter / Alt+Enter', 'insert newline'],
|
||||
['\\+Enter', 'multi-line continuation (fallback)'],
|
||||
['!<cmd>', 'run a shell command (e.g. !ls, !git status)'],
|
||||
['{!<cmd>}', 'interpolate shell output inline (e.g. "branch is {!git branch --show-current}")']
|
||||
]
|
||||
@@ -0,0 +1,13 @@
|
||||
import { pick } from '../lib/text.js'
|
||||
|
||||
export const PLACEHOLDERS = [
|
||||
'Ask me anything…',
|
||||
'Try "explain this codebase"',
|
||||
'Try "write a test for…"',
|
||||
'Try "refactor the auth module"',
|
||||
'Try "/help" for commands',
|
||||
'Try "fix the lint errors"',
|
||||
'Try "how does the config loader work?"'
|
||||
]
|
||||
|
||||
export const PLACEHOLDER = pick(PLACEHOLDERS)
|
||||
@@ -0,0 +1,17 @@
|
||||
import type { PanelSection } from '../types.js'
|
||||
|
||||
export const SETUP_REQUIRED_TITLE = 'Setup Required'
|
||||
|
||||
export const buildSetupRequiredSections = (): PanelSection[] => [
|
||||
{
|
||||
text: 'Hermes needs a model provider before the TUI can start a session.'
|
||||
},
|
||||
{
|
||||
rows: [
|
||||
['/model', 'configure provider + model in-place'],
|
||||
['/setup', 'run full first-time setup wizard in-place'],
|
||||
['Ctrl+C', 'exit and run `hermes setup` manually']
|
||||
],
|
||||
title: 'Actions'
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,38 @@
|
||||
export const TOOL_VERBS: Record<string, string> = {
|
||||
browser: 'browsing',
|
||||
clarify: 'asking',
|
||||
create_file: 'creating',
|
||||
delegate_task: 'delegating',
|
||||
delete_file: 'deleting',
|
||||
execute_code: 'executing',
|
||||
image_generate: 'generating',
|
||||
list_files: 'listing',
|
||||
memory: 'remembering',
|
||||
patch: 'patching',
|
||||
read_file: 'reading',
|
||||
run_command: 'running',
|
||||
search_code: 'searching',
|
||||
search_files: 'searching',
|
||||
terminal: 'terminal',
|
||||
web_extract: 'extracting',
|
||||
web_search: 'searching',
|
||||
write_file: 'writing'
|
||||
}
|
||||
|
||||
export const VERBS = [
|
||||
'pondering',
|
||||
'contemplating',
|
||||
'musing',
|
||||
'cogitating',
|
||||
'ruminating',
|
||||
'deliberating',
|
||||
'mulling',
|
||||
'reflecting',
|
||||
'processing',
|
||||
'reasoning',
|
||||
'analyzing',
|
||||
'computing',
|
||||
'synthesizing',
|
||||
'formulating',
|
||||
'brainstorming'
|
||||
]
|
||||
Reference in New Issue
Block a user