kajji 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 (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +128 -0
  3. package/bin/kajji.js +2 -0
  4. package/package.json +56 -0
  5. package/src/App.tsx +229 -0
  6. package/src/commander/bookmarks.ts +129 -0
  7. package/src/commander/diff.ts +186 -0
  8. package/src/commander/executor.ts +285 -0
  9. package/src/commander/files.ts +87 -0
  10. package/src/commander/log.ts +99 -0
  11. package/src/commander/operations.ts +313 -0
  12. package/src/commander/types.ts +21 -0
  13. package/src/components/AnsiText.tsx +77 -0
  14. package/src/components/BorderBox.tsx +124 -0
  15. package/src/components/FileTreeList.tsx +105 -0
  16. package/src/components/Layout.tsx +48 -0
  17. package/src/components/Panel.tsx +143 -0
  18. package/src/components/RevisionPicker.tsx +165 -0
  19. package/src/components/StatusBar.tsx +158 -0
  20. package/src/components/modals/BookmarkNameModal.tsx +170 -0
  21. package/src/components/modals/DescribeModal.tsx +124 -0
  22. package/src/components/modals/HelpModal.tsx +372 -0
  23. package/src/components/modals/RevisionPickerModal.tsx +70 -0
  24. package/src/components/modals/UndoModal.tsx +75 -0
  25. package/src/components/panels/BookmarksPanel.tsx +768 -0
  26. package/src/components/panels/CommandLogPanel.tsx +40 -0
  27. package/src/components/panels/LogPanel.tsx +774 -0
  28. package/src/components/panels/MainArea.tsx +354 -0
  29. package/src/context/command.tsx +106 -0
  30. package/src/context/commandlog.tsx +45 -0
  31. package/src/context/dialog.tsx +217 -0
  32. package/src/context/focus.tsx +63 -0
  33. package/src/context/helper.tsx +24 -0
  34. package/src/context/keybind.tsx +51 -0
  35. package/src/context/loading.tsx +68 -0
  36. package/src/context/sync.tsx +868 -0
  37. package/src/context/theme.tsx +90 -0
  38. package/src/context/types.ts +51 -0
  39. package/src/index.tsx +15 -0
  40. package/src/keybind/index.ts +2 -0
  41. package/src/keybind/parser.ts +88 -0
  42. package/src/keybind/types.ts +83 -0
  43. package/src/theme/index.ts +3 -0
  44. package/src/theme/presets/lazygit.ts +45 -0
  45. package/src/theme/presets/opencode.ts +45 -0
  46. package/src/theme/types.ts +47 -0
  47. package/src/utils/double-click.ts +59 -0
  48. package/src/utils/file-tree.ts +154 -0
@@ -0,0 +1,40 @@
1
+ import { For, Show } from "solid-js"
2
+ import { useCommandLog } from "../../context/commandlog"
3
+ import { useTheme } from "../../context/theme"
4
+
5
+ export function CommandLogPanel() {
6
+ const { colors, style } = useTheme()
7
+ const commandLog = useCommandLog()
8
+
9
+ return (
10
+ <box
11
+ flexDirection="column"
12
+ border
13
+ borderStyle={style().panel.borderStyle}
14
+ borderColor={colors().border}
15
+ title="Command log"
16
+ height={6}
17
+ overflow="hidden"
18
+ >
19
+ <scrollbox flexGrow={1} stickyScroll stickyStart="bottom">
20
+ <Show
21
+ when={commandLog.entries().length > 0}
22
+ fallback={
23
+ <text fg={colors().textMuted}>No commands executed yet</text>
24
+ }
25
+ >
26
+ <For each={commandLog.entries()}>
27
+ {(entry) => (
28
+ <box flexDirection="column">
29
+ <text fg={colors().textMuted}>$ {entry.command}</text>
30
+ <text fg={entry.success ? colors().success : colors().error}>
31
+ {entry.output}
32
+ </text>
33
+ </box>
34
+ )}
35
+ </For>
36
+ </Show>
37
+ </scrollbox>
38
+ </box>
39
+ )
40
+ }