@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.
Files changed (117) hide show
  1. package/AGENTS.md +203 -0
  2. package/CLAUDE.md +203 -0
  3. package/README.md +166 -0
  4. package/bun.lock +447 -0
  5. package/bunfig.toml +4 -0
  6. package/package.json +42 -0
  7. package/src/app.tsx +84 -0
  8. package/src/components/App.tsx +526 -0
  9. package/src/components/ConfirmDialog.tsx +88 -0
  10. package/src/components/Footer.tsx +50 -0
  11. package/src/components/HelpModal.tsx +136 -0
  12. package/src/components/IssueSelectorModal.tsx +701 -0
  13. package/src/components/ManualSessionModal.tsx +191 -0
  14. package/src/components/PhaseProgress.tsx +45 -0
  15. package/src/components/Preview.tsx +249 -0
  16. package/src/components/ProviderSwitcherModal.tsx +156 -0
  17. package/src/components/ScrollableText.tsx +120 -0
  18. package/src/components/SessionCard.tsx +60 -0
  19. package/src/components/SessionList.tsx +79 -0
  20. package/src/components/SessionTerminal.tsx +89 -0
  21. package/src/components/StatusBar.tsx +84 -0
  22. package/src/components/ThemeSwitcherModal.tsx +237 -0
  23. package/src/components/index.ts +58 -0
  24. package/src/components/session-utils.ts +337 -0
  25. package/src/components/theme.ts +206 -0
  26. package/src/components/types.ts +215 -0
  27. package/src/config/defaults.ts +44 -0
  28. package/src/config/env.ts +67 -0
  29. package/src/config/global.ts +252 -0
  30. package/src/config/index.ts +171 -0
  31. package/src/config/types.ts +131 -0
  32. package/src/core/.gitkeep +0 -0
  33. package/src/core/index.ts +5 -0
  34. package/src/core/parser.ts +62 -0
  35. package/src/core/process-manager.ts +52 -0
  36. package/src/core/session.ts +423 -0
  37. package/src/core/tmux.ts +206 -0
  38. package/src/git/.gitkeep +0 -0
  39. package/src/git/index.ts +8 -0
  40. package/src/git/repo.ts +443 -0
  41. package/src/git/worktree.ts +317 -0
  42. package/src/github/.gitkeep +0 -0
  43. package/src/github/client.ts +208 -0
  44. package/src/github/index.ts +8 -0
  45. package/src/github/issues.ts +351 -0
  46. package/src/index.ts +369 -0
  47. package/src/prompts/.gitkeep +0 -0
  48. package/src/prompts/index.ts +1 -0
  49. package/src/prompts/swe-system.ts +22 -0
  50. package/src/providers/claude.ts +103 -0
  51. package/src/providers/index.ts +21 -0
  52. package/src/providers/opencode.ts +98 -0
  53. package/src/providers/registry.ts +53 -0
  54. package/src/providers/types.ts +117 -0
  55. package/src/store/buffers.ts +234 -0
  56. package/src/store/db.test.ts +579 -0
  57. package/src/store/db.ts +249 -0
  58. package/src/store/index.ts +101 -0
  59. package/src/store/project.ts +119 -0
  60. package/src/store/schema.sql +71 -0
  61. package/src/store/sessions.ts +454 -0
  62. package/src/store/types.ts +194 -0
  63. package/src/theme/context.tsx +170 -0
  64. package/src/theme/custom.ts +134 -0
  65. package/src/theme/index.ts +58 -0
  66. package/src/theme/loader.ts +264 -0
  67. package/src/theme/themes/aura.json +69 -0
  68. package/src/theme/themes/ayu.json +80 -0
  69. package/src/theme/themes/carbonfox.json +248 -0
  70. package/src/theme/themes/catppuccin-frappe.json +233 -0
  71. package/src/theme/themes/catppuccin-macchiato.json +233 -0
  72. package/src/theme/themes/catppuccin.json +112 -0
  73. package/src/theme/themes/cobalt2.json +228 -0
  74. package/src/theme/themes/cursor.json +249 -0
  75. package/src/theme/themes/dracula.json +219 -0
  76. package/src/theme/themes/everforest.json +241 -0
  77. package/src/theme/themes/flexoki.json +237 -0
  78. package/src/theme/themes/github.json +233 -0
  79. package/src/theme/themes/gruvbox.json +242 -0
  80. package/src/theme/themes/kanagawa.json +77 -0
  81. package/src/theme/themes/lucent-orng.json +237 -0
  82. package/src/theme/themes/material.json +235 -0
  83. package/src/theme/themes/matrix.json +77 -0
  84. package/src/theme/themes/mercury.json +252 -0
  85. package/src/theme/themes/monokai.json +221 -0
  86. package/src/theme/themes/nightowl.json +221 -0
  87. package/src/theme/themes/nord.json +223 -0
  88. package/src/theme/themes/one-dark.json +84 -0
  89. package/src/theme/themes/opencode.json +245 -0
  90. package/src/theme/themes/orng.json +249 -0
  91. package/src/theme/themes/osaka-jade.json +93 -0
  92. package/src/theme/themes/palenight.json +222 -0
  93. package/src/theme/themes/rosepine.json +234 -0
  94. package/src/theme/themes/solarized.json +223 -0
  95. package/src/theme/themes/synthwave84.json +226 -0
  96. package/src/theme/themes/tokyonight.json +243 -0
  97. package/src/theme/themes/vercel.json +245 -0
  98. package/src/theme/themes/vesper.json +218 -0
  99. package/src/theme/themes/zenburn.json +223 -0
  100. package/src/theme/types.ts +225 -0
  101. package/src/types/sql.d.ts +4 -0
  102. package/src/utils/ansi-parser.ts +225 -0
  103. package/src/utils/format.ts +46 -0
  104. package/src/utils/id.ts +15 -0
  105. package/src/utils/logger.ts +112 -0
  106. package/src/utils/prerequisites.ts +118 -0
  107. package/src/utils/shell.ts +9 -0
  108. package/src/wizard/flows.ts +419 -0
  109. package/src/wizard/index.ts +37 -0
  110. package/src/wizard/prompts.ts +190 -0
  111. package/src/workspace/detect.test.ts +51 -0
  112. package/src/workspace/detect.ts +223 -0
  113. package/src/workspace/index.ts +71 -0
  114. package/src/workspace/init.ts +131 -0
  115. package/src/workspace/paths.ts +143 -0
  116. package/src/workspace/project.ts +164 -0
  117. 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
+ }