@vladimirven/openswe 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +203 -0
- package/CLAUDE.md +203 -0
- package/README.md +166 -0
- package/bun.lock +447 -0
- package/bunfig.toml +4 -0
- package/package.json +42 -0
- package/src/app.tsx +84 -0
- package/src/components/App.tsx +526 -0
- package/src/components/ConfirmDialog.tsx +88 -0
- package/src/components/Footer.tsx +50 -0
- package/src/components/HelpModal.tsx +136 -0
- package/src/components/IssueSelectorModal.tsx +701 -0
- package/src/components/ManualSessionModal.tsx +191 -0
- package/src/components/PhaseProgress.tsx +45 -0
- package/src/components/Preview.tsx +249 -0
- package/src/components/ProviderSwitcherModal.tsx +156 -0
- package/src/components/ScrollableText.tsx +120 -0
- package/src/components/SessionCard.tsx +60 -0
- package/src/components/SessionList.tsx +79 -0
- package/src/components/SessionTerminal.tsx +89 -0
- package/src/components/StatusBar.tsx +84 -0
- package/src/components/ThemeSwitcherModal.tsx +237 -0
- package/src/components/index.ts +58 -0
- package/src/components/session-utils.ts +337 -0
- package/src/components/theme.ts +206 -0
- package/src/components/types.ts +215 -0
- package/src/config/defaults.ts +44 -0
- package/src/config/env.ts +67 -0
- package/src/config/global.ts +252 -0
- package/src/config/index.ts +171 -0
- package/src/config/types.ts +131 -0
- package/src/core/.gitkeep +0 -0
- package/src/core/index.ts +5 -0
- package/src/core/parser.ts +62 -0
- package/src/core/process-manager.ts +52 -0
- package/src/core/session.ts +423 -0
- package/src/core/tmux.ts +206 -0
- package/src/git/.gitkeep +0 -0
- package/src/git/index.ts +8 -0
- package/src/git/repo.ts +443 -0
- package/src/git/worktree.ts +317 -0
- package/src/github/.gitkeep +0 -0
- package/src/github/client.ts +208 -0
- package/src/github/index.ts +8 -0
- package/src/github/issues.ts +351 -0
- package/src/index.ts +369 -0
- package/src/prompts/.gitkeep +0 -0
- package/src/prompts/index.ts +1 -0
- package/src/prompts/swe-system.ts +22 -0
- package/src/providers/claude.ts +103 -0
- package/src/providers/index.ts +21 -0
- package/src/providers/opencode.ts +98 -0
- package/src/providers/registry.ts +53 -0
- package/src/providers/types.ts +117 -0
- package/src/store/buffers.ts +234 -0
- package/src/store/db.test.ts +579 -0
- package/src/store/db.ts +249 -0
- package/src/store/index.ts +101 -0
- package/src/store/project.ts +119 -0
- package/src/store/schema.sql +71 -0
- package/src/store/sessions.ts +454 -0
- package/src/store/types.ts +194 -0
- package/src/theme/context.tsx +170 -0
- package/src/theme/custom.ts +134 -0
- package/src/theme/index.ts +58 -0
- package/src/theme/loader.ts +264 -0
- package/src/theme/themes/aura.json +69 -0
- package/src/theme/themes/ayu.json +80 -0
- package/src/theme/themes/carbonfox.json +248 -0
- package/src/theme/themes/catppuccin-frappe.json +233 -0
- package/src/theme/themes/catppuccin-macchiato.json +233 -0
- package/src/theme/themes/catppuccin.json +112 -0
- package/src/theme/themes/cobalt2.json +228 -0
- package/src/theme/themes/cursor.json +249 -0
- package/src/theme/themes/dracula.json +219 -0
- package/src/theme/themes/everforest.json +241 -0
- package/src/theme/themes/flexoki.json +237 -0
- package/src/theme/themes/github.json +233 -0
- package/src/theme/themes/gruvbox.json +242 -0
- package/src/theme/themes/kanagawa.json +77 -0
- package/src/theme/themes/lucent-orng.json +237 -0
- package/src/theme/themes/material.json +235 -0
- package/src/theme/themes/matrix.json +77 -0
- package/src/theme/themes/mercury.json +252 -0
- package/src/theme/themes/monokai.json +221 -0
- package/src/theme/themes/nightowl.json +221 -0
- package/src/theme/themes/nord.json +223 -0
- package/src/theme/themes/one-dark.json +84 -0
- package/src/theme/themes/opencode.json +245 -0
- package/src/theme/themes/orng.json +249 -0
- package/src/theme/themes/osaka-jade.json +93 -0
- package/src/theme/themes/palenight.json +222 -0
- package/src/theme/themes/rosepine.json +234 -0
- package/src/theme/themes/solarized.json +223 -0
- package/src/theme/themes/synthwave84.json +226 -0
- package/src/theme/themes/tokyonight.json +243 -0
- package/src/theme/themes/vercel.json +245 -0
- package/src/theme/themes/vesper.json +218 -0
- package/src/theme/themes/zenburn.json +223 -0
- package/src/theme/types.ts +225 -0
- package/src/types/sql.d.ts +4 -0
- package/src/utils/ansi-parser.ts +225 -0
- package/src/utils/format.ts +46 -0
- package/src/utils/id.ts +15 -0
- package/src/utils/logger.ts +112 -0
- package/src/utils/prerequisites.ts +118 -0
- package/src/utils/shell.ts +9 -0
- package/src/wizard/flows.ts +419 -0
- package/src/wizard/index.ts +37 -0
- package/src/wizard/prompts.ts +190 -0
- package/src/workspace/detect.test.ts +51 -0
- package/src/workspace/detect.ts +223 -0
- package/src/workspace/index.ts +71 -0
- package/src/workspace/init.ts +131 -0
- package/src/workspace/paths.ts +143 -0
- package/src/workspace/project.ts +164 -0
- package/tsconfig.json +22 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { For, Show } from "solid-js"
|
|
2
|
+
import { useColors } from "./theme"
|
|
3
|
+
|
|
4
|
+
export interface FooterAction {
|
|
5
|
+
key: string
|
|
6
|
+
label: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface FooterProps {
|
|
10
|
+
actions: FooterAction[]
|
|
11
|
+
message?: string
|
|
12
|
+
bgColor?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const BOLD = 1
|
|
16
|
+
|
|
17
|
+
export function Footer(props: FooterProps) {
|
|
18
|
+
const colors = useColors()
|
|
19
|
+
return (
|
|
20
|
+
<box
|
|
21
|
+
flexDirection="row"
|
|
22
|
+
width="100%"
|
|
23
|
+
height={1}
|
|
24
|
+
backgroundColor={props.bgColor || colors().bg.secondary}
|
|
25
|
+
paddingLeft={1}
|
|
26
|
+
paddingRight={1}
|
|
27
|
+
justifyContent="space-between"
|
|
28
|
+
alignItems="center"
|
|
29
|
+
>
|
|
30
|
+
{/* Actions (Left) */}
|
|
31
|
+
<box flexDirection="row" gap={2}>
|
|
32
|
+
<For each={props.actions}>
|
|
33
|
+
{(action) => (
|
|
34
|
+
<box flexDirection="row" gap={1}>
|
|
35
|
+
<text fg={colors().accent.primary} attributes={BOLD}>
|
|
36
|
+
{action.key}
|
|
37
|
+
</text>
|
|
38
|
+
<text fg={colors().text.secondary}>{action.label}</text>
|
|
39
|
+
</box>
|
|
40
|
+
)}
|
|
41
|
+
</For>
|
|
42
|
+
</box>
|
|
43
|
+
|
|
44
|
+
{/* Message (Right) */}
|
|
45
|
+
<Show when={props.message}>
|
|
46
|
+
<text fg={colors().text.muted}>{props.message}</text>
|
|
47
|
+
</Show>
|
|
48
|
+
</box>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HelpModal component - Displays keybinding help overlay
|
|
3
|
+
*
|
|
4
|
+
* Shows all available keyboard shortcuts organized by category.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { For } from "solid-js"
|
|
8
|
+
import type { HelpModalProps } from "./types"
|
|
9
|
+
import { Footer } from "./Footer"
|
|
10
|
+
import { useColors } from "./theme"
|
|
11
|
+
import { useKeyboard } from "@opentui/solid"
|
|
12
|
+
|
|
13
|
+
// Bold attribute constant
|
|
14
|
+
const BOLD = 1
|
|
15
|
+
|
|
16
|
+
/** Keybinding section for display */
|
|
17
|
+
interface KeySection {
|
|
18
|
+
title: string
|
|
19
|
+
bindings: Array<{ key: string; description: string }>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const KEY_SECTIONS: KeySection[] = [
|
|
23
|
+
{
|
|
24
|
+
title: "Navigation",
|
|
25
|
+
bindings: [
|
|
26
|
+
{ key: "j / \u2193", description: "Move down" },
|
|
27
|
+
{ key: "k / \u2191", description: "Move up" },
|
|
28
|
+
{ key: "Enter", description: "Open session details" },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: "Sessions",
|
|
33
|
+
bindings: [
|
|
34
|
+
{ key: "n", description: "New session" },
|
|
35
|
+
{ key: "d", description: "Delete session" },
|
|
36
|
+
{ key: "p", description: "Pause/resume session" },
|
|
37
|
+
{ key: "r", description: "Refresh data" },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: "Modals",
|
|
42
|
+
bindings: [
|
|
43
|
+
{ key: "t", description: "Change theme" },
|
|
44
|
+
{ key: "a", description: "AI Provider" },
|
|
45
|
+
{ key: "i", description: "Issue selector" },
|
|
46
|
+
{ key: "?", description: "This help" },
|
|
47
|
+
{ key: "Esc", description: "Close modal" },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: "Application",
|
|
52
|
+
bindings: [{ key: "q", description: "Quit" }],
|
|
53
|
+
},
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
export function HelpModal(props: HelpModalProps) {
|
|
57
|
+
const colors = useColors()
|
|
58
|
+
const modalWidth = 44
|
|
59
|
+
const modalHeight = 24
|
|
60
|
+
|
|
61
|
+
useKeyboard((event) => {
|
|
62
|
+
switch (event.name) {
|
|
63
|
+
case "escape":
|
|
64
|
+
props.onClose()
|
|
65
|
+
break
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<box
|
|
71
|
+
position="absolute"
|
|
72
|
+
top={0}
|
|
73
|
+
left={0}
|
|
74
|
+
width="100%"
|
|
75
|
+
height="100%"
|
|
76
|
+
justifyContent="center"
|
|
77
|
+
alignItems="center"
|
|
78
|
+
>
|
|
79
|
+
{/* Modal container */}
|
|
80
|
+
<box
|
|
81
|
+
flexDirection="column"
|
|
82
|
+
width={modalWidth}
|
|
83
|
+
height={modalHeight}
|
|
84
|
+
backgroundColor={colors().bg.secondary}
|
|
85
|
+
borderStyle="rounded"
|
|
86
|
+
borderColor={colors().border.accent}
|
|
87
|
+
overflow="hidden"
|
|
88
|
+
>
|
|
89
|
+
{/* Header */}
|
|
90
|
+
<box
|
|
91
|
+
height={1}
|
|
92
|
+
justifyContent="center"
|
|
93
|
+
paddingLeft={1}
|
|
94
|
+
paddingRight={1}
|
|
95
|
+
>
|
|
96
|
+
<text fg={colors().text.primary} attributes={BOLD}>
|
|
97
|
+
Help
|
|
98
|
+
</text>
|
|
99
|
+
</box>
|
|
100
|
+
|
|
101
|
+
{/* Content */}
|
|
102
|
+
<box flexDirection="column" flexGrow={1} paddingLeft={2} paddingRight={2} >
|
|
103
|
+
<For each={KEY_SECTIONS}>
|
|
104
|
+
{(section) => (
|
|
105
|
+
<box flexDirection="column" paddingTop={1}>
|
|
106
|
+
{/* Section title */}
|
|
107
|
+
<text fg={colors().accent.primary} attributes={BOLD}>
|
|
108
|
+
{section.title}
|
|
109
|
+
</text>
|
|
110
|
+
{/* Keybindings */}
|
|
111
|
+
<For each={section.bindings}>
|
|
112
|
+
{(binding) => (
|
|
113
|
+
<box flexDirection="row" paddingLeft={2}>
|
|
114
|
+
{/* Fixed width box for key to ensure alignment */}
|
|
115
|
+
<box width={14}>
|
|
116
|
+
<text fg={colors().text.primary}>
|
|
117
|
+
{binding.key}
|
|
118
|
+
</text>
|
|
119
|
+
</box>
|
|
120
|
+
<text fg={colors().text.secondary}>
|
|
121
|
+
{binding.description}
|
|
122
|
+
</text>
|
|
123
|
+
</box>
|
|
124
|
+
)}
|
|
125
|
+
</For>
|
|
126
|
+
</box>
|
|
127
|
+
)}
|
|
128
|
+
</For>
|
|
129
|
+
</box>
|
|
130
|
+
|
|
131
|
+
{/* Footer */}
|
|
132
|
+
<Footer actions={[{ key: "Esc", label: "Exit" }]} bgColor={colors().bg.primary} />
|
|
133
|
+
</box>
|
|
134
|
+
</box>
|
|
135
|
+
)
|
|
136
|
+
}
|