mirror of
https://github.com/humanlayer/humanlayer.git
synced 2025-08-20 19:01:22 +03:00
Merge branch 'main' of github.com:humanlayer/humanlayer
This commit is contained in:
37
.claude/commands/create_worktree.md
Normal file
37
.claude/commands/create_worktree.md
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
2. set up worktree for implementation:
|
||||
2a. read `hack/create_worktree.sh` and create a new worktree with the Linear branch name: `./hack/create_worktree.sh ENG-XXXX BRANCH_NAME`
|
||||
|
||||
3. determine required data:
|
||||
|
||||
branch name
|
||||
path to plan file (use relative path only)
|
||||
launch prompt
|
||||
command to run
|
||||
|
||||
**IMPORTANT PATH USAGE:**
|
||||
- The thoughts/ directory is synced between the main repo and worktrees
|
||||
- Always use ONLY the relative path starting with `thoughts/shared/...` without any directory prefix
|
||||
- Example: `thoughts/shared/plans/fix-mcp-keepalive-proper.md` (not the full absolute path)
|
||||
- This works because thoughts are synced and accessible from the worktree
|
||||
|
||||
3a. confirm with the user by sending a message to the Human
|
||||
|
||||
```
|
||||
based on the input, I plan to create a worktree with the following details:
|
||||
|
||||
worktree path: ~/wt/humanlayer/ENG-XXXX
|
||||
branch name: BRANCH_NAME
|
||||
path to plan file: $FILEPATH
|
||||
launch prompt:
|
||||
|
||||
/implement_plan at $FILEPATH and when you are done implementing and all tests pass, read ./claude/commands/commit.md and create a commit, then read ./claude/commands/describe_pr.md and create a PR, then add a comment to the Linear ticket with the PR link
|
||||
|
||||
command to run:
|
||||
|
||||
humanlayer launch --model opus -w ~/wt/humanlayer/ENG-XXXX "/implement_plan at $FILEPATH and when you are done implementing and all tests pass, read ./claude/commands/commit.md and create a commit, then read ./claude/commands/describe_pr.md and create a PR, then add a comment to the Linear ticket with the PR link"
|
||||
```
|
||||
|
||||
incorporate any user feedback then:
|
||||
|
||||
4. launch implementation session: `humanlayer launch --model opus -w ~/wt/humanlayer/ENG-XXXX "/implement_plan at $FILEPATH and when you are done implementing and all tests pass, read ./claude/commands/commit.md and create a commit, then read ./claude/commands/describe_pr.md and create a PR, then add a comment to the Linear ticket with the PR link"`
|
||||
@@ -17,6 +17,14 @@ make codelayer-dev
|
||||
|
||||
When the Web UI launches in dev mode, you'll need to launch a managed daemon with it - click the 🐞 icon in the bottom right and launch a managed daemon.
|
||||
|
||||
## Commands cheat sheet
|
||||
|
||||
1. `/research_codebase`
|
||||
2. `/create_plan`
|
||||
3. `/implement_plan`
|
||||
4. `/commit`
|
||||
5. `gh pr create --fill`
|
||||
6. `/describe_pr`
|
||||
|
||||
## Running Tests
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useRef, useEffect } from 'react'
|
||||
import { useRef, useEffect } from 'react'
|
||||
import { Button } from './ui/button'
|
||||
import { SearchInput } from './FuzzySearchInput'
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './ui/select'
|
||||
@@ -52,17 +52,6 @@ export default function CommandInput({
|
||||
}
|
||||
}, [])
|
||||
|
||||
const handleKeyDown = (e: React.KeyboardEvent) => {
|
||||
if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {
|
||||
e.preventDefault()
|
||||
onSubmit()
|
||||
}
|
||||
|
||||
if (e.key === 'Escape') {
|
||||
promptRef.current?.blur()
|
||||
}
|
||||
}
|
||||
|
||||
const getPlatformKey = () => {
|
||||
return navigator.platform.includes('Mac') ? '⌘' : 'Ctrl'
|
||||
}
|
||||
@@ -109,15 +98,13 @@ export default function CommandInput({
|
||||
ref={promptRef}
|
||||
value={value}
|
||||
onChange={e => onChange(e.target.value)}
|
||||
onKeyDown={handleKeyDown}
|
||||
placeholder={placeholder}
|
||||
disabled={isLoading}
|
||||
autoComplete="off"
|
||||
spellCheck={false}
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground mt-1">
|
||||
<kbd className="px-1 py-0.5 bg-muted/50 rounded">{getPlatformKey()}+Enter</kbd> to launch
|
||||
session, <kbd className="ml-1 px-1 py-0.5 bg-muted/50 rounded">Enter</kbd> for new line
|
||||
<kbd className="px-1 py-0.5 bg-muted/50 rounded">Enter</kbd> for new line
|
||||
</p>
|
||||
|
||||
{isLoading && (
|
||||
@@ -159,7 +146,10 @@ export default function CommandInput({
|
||||
Launching...
|
||||
</>
|
||||
) : (
|
||||
'Launch Session'
|
||||
<>
|
||||
Launch Session
|
||||
<kbd className="ml-2 px-1 py-0.5 text-xs bg-muted/50 rounded">{getPlatformKey()}+⏎</kbd>
|
||||
</>
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -33,6 +33,21 @@ export function SessionLauncher({ isOpen, onClose }: SessionLauncherProps) {
|
||||
},
|
||||
)
|
||||
|
||||
useHotkeys(
|
||||
'meta+enter, ctrl+enter',
|
||||
e => {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
handleSubmit()
|
||||
},
|
||||
{
|
||||
enabled: isOpen,
|
||||
enableOnFormTags: true, // Critical: allows the shortcut to work in form inputs
|
||||
scopes: SessionLauncherHotkeysScope,
|
||||
preventDefault: true,
|
||||
},
|
||||
)
|
||||
|
||||
// Only steal scope when actually open
|
||||
useStealHotkeyScope(SessionLauncherHotkeysScope, isOpen)
|
||||
|
||||
@@ -115,8 +130,7 @@ export function SessionLauncher({ isOpen, onClose }: SessionLauncherProps) {
|
||||
|
||||
<div className="flex items-center justify-end text-xs text-muted-foreground">
|
||||
<div className="flex items-center space-x-2">
|
||||
<span>↵ Launch</span>
|
||||
<span>⌘K Close</span>
|
||||
<span>ESC Close</span>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user