@vibe80/vibe80 0.1.1
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/LICENSE +201 -0
- package/README.md +52 -0
- package/bin/vibe80.js +176 -0
- package/client/dist/assets/DiffPanel-C_IGzKI5.js +1 -0
- package/client/dist/assets/ExplorerPanel-BtlyAT00.js +11 -0
- package/client/dist/assets/LogsPanel-BW79JWzR.js +1 -0
- package/client/dist/assets/SettingsPanel-b9B7ygP_.js +1 -0
- package/client/dist/assets/TerminalPanel-C3fc1HbK.js +1 -0
- package/client/dist/assets/browser-e3WgtMs-.js +8 -0
- package/client/dist/assets/index-CgqGyssr.css +32 -0
- package/client/dist/assets/index-DnwKjoj7.js +706 -0
- package/client/dist/assets/vibe80_dark-D7OVPKcU.svg +51 -0
- package/client/dist/assets/vibe80_light-BJK37ybI.svg +50 -0
- package/client/dist/favicon.ico +0 -0
- package/client/dist/favicon.png +0 -0
- package/client/dist/favicon.svg +35 -0
- package/client/dist/index.html +14 -0
- package/client/index.html +16 -0
- package/client/package.json +34 -0
- package/client/public/favicon.ico +0 -0
- package/client/public/favicon.png +0 -0
- package/client/public/favicon.svg +35 -0
- package/client/public/pwa-192x192.png +0 -0
- package/client/public/pwa-512x512.png +0 -0
- package/client/src/App.jsx +3131 -0
- package/client/src/assets/logo_small.png +0 -0
- package/client/src/assets/vibe80_dark.svg +51 -0
- package/client/src/assets/vibe80_light.svg +50 -0
- package/client/src/components/Chat/ChatComposer.jsx +228 -0
- package/client/src/components/Chat/ChatMessages.jsx +811 -0
- package/client/src/components/Chat/ChatToolbar.jsx +109 -0
- package/client/src/components/Chat/useChatComposer.js +462 -0
- package/client/src/components/Diff/DiffPanel.jsx +129 -0
- package/client/src/components/Explorer/ExplorerPanel.jsx +449 -0
- package/client/src/components/Logs/LogsPanel.jsx +80 -0
- package/client/src/components/SessionGate/SessionGate.jsx +874 -0
- package/client/src/components/Settings/SettingsPanel.jsx +212 -0
- package/client/src/components/Terminal/TerminalPanel.jsx +39 -0
- package/client/src/components/Topbar/Topbar.jsx +101 -0
- package/client/src/components/WorktreeTabs.css +419 -0
- package/client/src/components/WorktreeTabs.jsx +604 -0
- package/client/src/hooks/useAttachments.jsx +125 -0
- package/client/src/hooks/useBacklog.js +254 -0
- package/client/src/hooks/useChatClear.js +90 -0
- package/client/src/hooks/useChatCollapse.js +42 -0
- package/client/src/hooks/useChatCommands.js +294 -0
- package/client/src/hooks/useChatExport.js +144 -0
- package/client/src/hooks/useChatMessagesState.js +69 -0
- package/client/src/hooks/useChatSend.js +158 -0
- package/client/src/hooks/useChatSocket.js +1239 -0
- package/client/src/hooks/useDiffNavigation.js +19 -0
- package/client/src/hooks/useExplorerActions.js +1184 -0
- package/client/src/hooks/useGitIdentity.js +114 -0
- package/client/src/hooks/useLayoutMode.js +31 -0
- package/client/src/hooks/useLocalPreferences.js +131 -0
- package/client/src/hooks/useMessageSync.js +30 -0
- package/client/src/hooks/useNotifications.js +132 -0
- package/client/src/hooks/usePaneNavigation.js +67 -0
- package/client/src/hooks/usePanelState.js +13 -0
- package/client/src/hooks/useProviderSelection.js +70 -0
- package/client/src/hooks/useRepoBranchesModels.js +218 -0
- package/client/src/hooks/useRepoStatus.js +350 -0
- package/client/src/hooks/useRpcLogActions.js +19 -0
- package/client/src/hooks/useRpcLogView.js +58 -0
- package/client/src/hooks/useSessionHandoff.js +97 -0
- package/client/src/hooks/useSessionLifecycle.js +287 -0
- package/client/src/hooks/useSessionReset.js +63 -0
- package/client/src/hooks/useSessionResync.js +77 -0
- package/client/src/hooks/useTerminalSession.js +328 -0
- package/client/src/hooks/useToolbarExport.js +27 -0
- package/client/src/hooks/useTurnInterrupt.js +43 -0
- package/client/src/hooks/useVibe80Forms.js +128 -0
- package/client/src/hooks/useWorkspaceAuth.js +932 -0
- package/client/src/hooks/useWorktreeCloseConfirm.js +46 -0
- package/client/src/hooks/useWorktrees.js +396 -0
- package/client/src/i18n.jsx +87 -0
- package/client/src/index.css +5147 -0
- package/client/src/locales/en.json +37 -0
- package/client/src/locales/fr.json +321 -0
- package/client/src/main.jsx +16 -0
- package/client/vite.config.js +62 -0
- package/docs/api/asyncapi.json +1511 -0
- package/docs/api/openapi.json +3242 -0
- package/git_hooks/prepare-commit-msg +35 -0
- package/package.json +36 -0
- package/server/package.json +29 -0
- package/server/scripts/rotate-workspace-secret.js +101 -0
- package/server/src/claudeClient.js +454 -0
- package/server/src/clientEvents.js +594 -0
- package/server/src/clientFactory.js +164 -0
- package/server/src/codexClient.js +468 -0
- package/server/src/config.js +27 -0
- package/server/src/helpers.js +138 -0
- package/server/src/index.js +1641 -0
- package/server/src/middleware/auth.js +93 -0
- package/server/src/middleware/debug.js +89 -0
- package/server/src/middleware/errorTypes.js +60 -0
- package/server/src/providerLogger.js +60 -0
- package/server/src/routes/files.js +114 -0
- package/server/src/routes/git.js +183 -0
- package/server/src/routes/health.js +13 -0
- package/server/src/routes/sessions.js +407 -0
- package/server/src/routes/workspaces.js +296 -0
- package/server/src/routes/worktrees.js +993 -0
- package/server/src/runAs.js +458 -0
- package/server/src/runtimeStore.js +32 -0
- package/server/src/services/auth.js +157 -0
- package/server/src/services/claudeThreadDirectory.js +33 -0
- package/server/src/services/session.js +918 -0
- package/server/src/services/workspace.js +858 -0
- package/server/src/storage/index.js +17 -0
- package/server/src/storage/redis.js +412 -0
- package/server/src/storage/sqlite.js +649 -0
- package/server/src/worktreeManager.js +717 -0
- package/server/tests/README.md +13 -0
- package/server/tests/factories/workspaceFactory.js +13 -0
- package/server/tests/fixtures/workspaceCredentials.json +4 -0
- package/server/tests/integration/routes/workspaces-routes.test.js +626 -0
- package/server/tests/setup/env.js +9 -0
- package/server/tests/unit/helpers.test.js +95 -0
- package/server/tests/unit/services/auth.test.js +181 -0
- package/server/tests/unit/services/workspace.test.js +115 -0
- package/server/vitest.config.js +23 -0
|
Binary file
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="64.759033mm"
|
|
6
|
+
height="24.066999mm"
|
|
7
|
+
viewBox="0 0 64.759033 24.066999"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg5"
|
|
10
|
+
xml:space="preserve"
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
|
13
|
+
id="defs2" /><g
|
|
14
|
+
id="layer1"
|
|
15
|
+
transform="translate(-58.452736,-136.1182)"><g
|
|
16
|
+
id="g2481-6-9"
|
|
17
|
+
transform="matrix(0.61694389,0,0,0.61694389,15.812344,50.295217)"
|
|
18
|
+
style="fill:#333333"><path
|
|
19
|
+
style="fill:#333333;stroke-width:0.116444"
|
|
20
|
+
d="m 124.4332,166.70241 c -6.00101,-0.69923 -10.50396,-3.48634 -12.7204,-7.87331 -0.53644,-1.06176 -0.82317,-2.05256 -0.96733,-3.34257 -0.11336,-1.01451 -0.10299,-1.40841 0.0691,-2.62469 0.25224,-1.78262 0.67348,-2.95794 1.53457,-4.28174 2.39474,-3.68158 7.04291,-5.94077 12.69376,-6.16968 6.60357,-0.2675 13.18504,2.52141 15.99573,6.77823 l 0.6151,0.93156 1.26391,0.0627 c 1.1346,0.0563 1.29571,0.092 1.57469,0.34934 0.53911,0.4973 0.63008,0.8897 0.63008,2.7179 v 1.68183 l -0.35827,0.30147 c -0.30875,0.25979 -0.46798,0.30146 -1.15198,0.30146 -0.8695,0 -0.93508,0.0522 -0.93508,0.74448 0,0.54701 -0.40676,2.01336 -0.80423,2.89926 -1.54093,3.43444 -5.15495,6.06224 -9.79221,7.12004 -2.05593,0.46898 -5.51868,0.6518 -7.64746,0.40376 z m 6.59946,-2.95664 c 3.65125,-0.69463 6.24561,-2.22148 7.78548,-4.58197 0.93753,-1.43715 1.11704,-2.09343 1.12001,-4.09471 0.002,-1.36374 -0.0402,-1.8116 -0.21944,-2.32889 -1.05303,-3.03857 -3.84979,-5.52352 -7.68462,-6.82783 -1.9595,-0.66647 -4.78753,-0.9633 -7.11821,-0.74714 -2.03306,0.18856 -3.48769,0.57799 -5.00366,1.33957 -2.31277,1.16186 -3.9415,2.86464 -4.73905,4.95451 -0.36436,0.95478 -0.37784,1.05156 -0.38111,2.73645 -0.004,1.93464 0.0946,2.38323 0.83012,3.78444 1.62872,3.10299 5.43555,5.36218 10.00848,5.93961 1.15415,0.14573 4.24448,0.0462 5.402,-0.17404 z m 6.75375,-9.23396 c -40.345556,-56.38935 -20.17278,-28.19467 0,0 z"
|
|
21
|
+
id="path295-6-0" /><g
|
|
22
|
+
id="g2323-6-0"
|
|
23
|
+
style="fill:#333333;fill-opacity:1"
|
|
24
|
+
transform="matrix(0.44010471,0,0,0.44010471,77.268074,69.927782)"><path
|
|
25
|
+
d="m 108.94876,204.22063 c -0.94588,-0.4317 -1.76712,-0.82983 -1.82499,-0.88472 -0.18962,-0.17995 5.86349,-22.12073 6.29574,-22.82011 0.16515,-0.26723 0.61124,-0.23264 2.16807,0.16811 1.07807,0.27752 1.94585,0.61121 1.92836,0.74155 -0.0533,0.3976 -1.95781,7.27734 -2.48263,8.96824 -0.27102,0.87312 -1.28929,4.445 -2.26285,7.9375 -0.97356,3.4925 -1.84478,6.42297 -1.93601,6.51217 -0.0913,0.0892 -0.9398,-0.19104 -1.88569,-0.62274 z M 98.8946,198.18607 c -3.274214,-2.04392 -6.816324,-4.21056 -7.871354,-4.81475 -1.71506,-0.98218 -2.32063,-1.52242 -1.70654,-1.52242 0.19859,0 5.88167,-3.23174 12.721034,-7.23396 1.65595,-0.96903 3.05493,-1.76187 3.10885,-1.76187 0.0539,0 0.098,1.05318 0.098,2.34039 v 2.34039 l -4.81399,2.31189 -4.814014,2.3119 1.30829,0.73684 c 0.719524,0.40527 2.885834,1.59343 4.813984,2.64036 l 3.50573,1.90351 v 2.23236 c 0,1.2278 -0.0893,2.23219 -0.19844,2.23197 -0.10914,-2.2e-4 -2.87734,-1.67269 -6.15156,-3.71661 z"
|
|
26
|
+
style="fill:#333333;fill-opacity:1;stroke-width:0.264583"
|
|
27
|
+
id="path351-1-0" /><path
|
|
28
|
+
d="m 126.09199,187.66114 c 3.27421,2.04392 6.81632,4.21056 7.87135,4.81475 1.71506,0.98218 2.32063,1.52242 1.70654,1.52242 -0.19859,0 -5.88167,3.23174 -12.72103,7.23396 -1.65595,0.96903 -3.05493,1.76187 -3.10885,1.76187 -0.0539,0 -0.098,-1.05318 -0.098,-2.34039 v -2.34039 l 4.81399,-2.31189 4.81401,-2.3119 -1.30829,-0.73684 c -0.71952,-0.40527 -2.88583,-1.59343 -4.81398,-2.64036 l -3.50573,-1.90351 v -2.23236 c 0,-1.2278 0.0893,-2.23219 0.19844,-2.23197 0.10914,2.2e-4 2.87734,1.67269 6.15156,3.71661 z"
|
|
29
|
+
style="fill:#333333;fill-opacity:1;stroke-width:0.264583"
|
|
30
|
+
id="path374-6-6" /></g></g><g
|
|
31
|
+
aria-label="vibe"
|
|
32
|
+
id="text225"
|
|
33
|
+
style="font-size:22.5778px;letter-spacing:-0.5715px;fill:#ffffff;stroke-width:0.264583"><g
|
|
34
|
+
id="g194"
|
|
35
|
+
transform="matrix(1,0,0,0.85070708,-0.01220311,23.440282)"
|
|
36
|
+
style="font-size:22.5778px;letter-spacing:-0.5715px;fill:#ffffff;stroke-width:0.264583"><path
|
|
37
|
+
d="m 63.64411,157.18062 -3.567293,-11.19859 h 3.025425 l 2.596448,9.12143 h 0.4064 l 2.596447,-9.12143 h 3.025425 l -3.567292,11.19859 z"
|
|
38
|
+
style="font-weight:bold;font-family:'Space Grotesk';-inkscape-font-specification:'Space Grotesk Bold';fill:#ffffff"
|
|
39
|
+
id="path184" /><path
|
|
40
|
+
d="m 73.097161,157.18062 v -11.19859 h 2.844803 v 11.19859 z m 1.422402,-12.5081 q -0.767646,0 -1.309513,-0.49671 -0.519289,-0.49672 -0.519289,-1.30952 0,-0.8128 0.519289,-1.30951 0.541867,-0.49671 1.309513,-0.49671 0.790223,0 1.309512,0.49671 0.519289,0.49671 0.519289,1.30951 0,0.8128 -0.519289,1.30952 -0.519289,0.49671 -1.309512,0.49671 z"
|
|
41
|
+
style="font-weight:bold;font-family:'Space Grotesk';-inkscape-font-specification:'Space Grotesk Bold';fill:#ffffff"
|
|
42
|
+
id="path186" /><path
|
|
43
|
+
d="m 85.259558,157.49671 q -1.512712,0 -2.325513,-0.51929 -0.812801,-0.51929 -1.196624,-1.15147 h -0.4064 v 1.35467 h -2.799647 v -15.80446 h 2.844803 v 5.8928 h 0.4064 q 0.248356,-0.4064 0.654756,-0.76764 0.428979,-0.36125 1.106313,-0.58702 0.699911,-0.24836 1.715912,-0.24836 1.354668,0 2.506136,0.67733 1.151468,0.65476 1.85138,1.94169 0.699912,1.28694 0.699912,3.11574 v 0.36125 q 0,1.8288 -0.699912,3.11573 -0.699912,1.28694 -1.85138,1.96427 -1.151468,0.65476 -2.506136,0.65476 z m -0.857956,-2.48356 q 1.309512,0 2.190047,-0.83538 0.880534,-0.85796 0.880534,-2.48356 v -0.22578 q 0,-1.6256 -0.880534,-2.46098 -0.857957,-0.85795 -2.190047,-0.85795 -1.309512,0 -2.190047,0.85795 -0.880534,0.83538 -0.880534,2.46098 v 0.22578 q 0,1.6256 0.880534,2.48356 0.880535,0.83538 2.190047,0.83538 z"
|
|
44
|
+
style="font-weight:bold;font-family:'Space Grotesk';-inkscape-font-specification:'Space Grotesk Bold';fill:#ffffff"
|
|
45
|
+
id="path188" /><path
|
|
46
|
+
d="m 97.467104,157.49671 q -1.670757,0 -2.957692,-0.69991 -1.264357,-0.72249 -1.986847,-2.00943 -0.699911,-1.30951 -0.699911,-3.07058 v -0.27093 q 0,-1.76107 0.699911,-3.04801 0.699912,-1.30951 1.964269,-2.00942 1.264357,-0.72249 2.935114,-0.72249 1.64818,0 2.867382,0.74507 1.2192,0.72249 1.89653,2.032 0.67734,1.28693 0.67734,3.00285 v 0.97084 h -8.150588 q 0.04516,1.15147 0.857957,1.87396 0.8128,0.72249 1.986846,0.72249 1.196623,0 1.761068,-0.51929 0.564445,-0.51929 0.857957,-1.15147 l 2.32551,1.2192 q -0.31609,0.58703 -0.92569,1.28694 -0.58702,0.67733 -1.580443,1.17404 -0.993423,0.47414 -2.528713,0.47414 z m -2.731914,-7.20232 h 5.23805 q -0.09031,-0.97085 -0.790223,-1.55787 -0.677334,-0.58702 -1.783647,-0.58702 -1.151467,0 -1.828801,0.58702 -0.677334,0.58702 -0.835379,1.55787 z"
|
|
47
|
+
style="font-weight:bold;font-family:'Space Grotesk';-inkscape-font-specification:'Space Grotesk Bold';fill:#ffffff"
|
|
48
|
+
id="path190" /></g></g><path
|
|
49
|
+
d="m 106.40885,151.30184 c -1.51466,-0.19751 -2.6024,-0.85168 -3.12237,-1.87779 -0.55652,-1.09823 -0.0393,-2.46987 1.14417,-3.03421 0.29113,-0.13884 0.40561,-0.29684 0.21507,-0.29684 -0.18492,0 -0.78234,-0.61632 -0.94546,-0.97536 -0.18587,-0.40913 -0.23205,-1.36833 -0.0846,-1.75625 0.13039,-0.34294 0.72204,-0.96408 1.16632,-1.22444 0.65217,-0.38219 1.2396,-0.51836 2.46697,-0.57182 0.99505,-0.0433 1.2803,-0.0217 1.9502,0.14767 1.77808,0.44964 2.69082,1.61909 2.32476,2.97858 -0.11368,0.42199 -0.80607,1.25627 -1.12728,1.35822 -0.2665,0.0846 -0.21555,0.17315 0.22189,0.38567 1.10883,0.53872 1.59516,1.44142 1.36207,2.52828 -0.30976,1.44434 -1.73103,2.30208 -3.94486,2.38074 -0.56245,0.02 -1.29456,7.2e-4 -1.62692,-0.0424 z m 2.45818,-1.85006 c 1.09175,-0.48294 1.03868,-1.74309 -0.0949,-2.25315 -0.81701,-0.3676 -2.09847,-0.30559 -2.74937,0.13304 -0.66961,0.45125 -0.68086,1.38731 -0.0228,1.8893 0.67708,0.51643 1.98351,0.6216 2.86698,0.23081 z m -0.67146,-4.01364 c 0.80517,-0.22362 1.1694,-0.87069 0.85869,-1.52547 -0.22827,-0.48104 -0.75531,-0.73448 -1.53373,-0.73755 -0.78022,-0.004 -1.2745,0.23284 -1.51878,0.72485 -0.50485,1.01684 0.79341,1.9271 2.19382,1.53817 z m 7.81345,5.81064 c -2.46278,-0.66326 -3.79865,-3.18528 -3.23834,-6.11375 0.43213,-2.25856 2.11815,-3.59741 4.53023,-3.59741 1.01249,0 1.63981,0.13008 2.3557,0.48847 1.00937,0.50531 1.49641,1.00444 2.04407,2.09483 0.7703,1.53364 0.52919,4.17315 -0.5069,5.5492 -0.51178,0.67971 -1.36837,1.27614 -2.203,1.53394 -0.73088,0.22573 -2.22632,0.24818 -2.98176,0.0447 z m 2.39702,-1.90425 c 0.44621,-0.22763 0.8796,-0.75354 1.06637,-1.29403 0.2287,-0.66183 0.27287,-1.79923 0.10118,-2.60548 -0.28228,-1.32551 -0.95902,-2.0327 -2.02086,-2.11182 -0.51742,-0.0386 -0.65666,-0.0105 -1.10346,0.219 -0.36166,0.18609 -0.59937,0.39487 -0.81218,0.71332 -0.41364,0.61893 -0.5229,1.06874 -0.5229,2.15286 0,0.51131 0.05,1.10358 0.111,1.31615 0.13302,0.46317 0.62092,1.20626 0.95055,1.44773 0.63705,0.46667 1.50926,0.53014 2.23031,0.16227 z m -16.12139,-3.00529 0.0611,0.86935"
|
|
50
|
+
style="fill:#fe6629;fill-opacity:1;stroke-width:0.0929665"
|
|
51
|
+
id="path328-9" /></g></svg>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="64.759033mm"
|
|
6
|
+
height="24.066999mm"
|
|
7
|
+
viewBox="0 0 64.759033 24.066999"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg5"
|
|
10
|
+
xml:space="preserve"
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
|
13
|
+
id="defs2" /><g
|
|
14
|
+
id="layer1"
|
|
15
|
+
transform="translate(-58.452736,-136.1182)"><g
|
|
16
|
+
id="g2481-6-9"
|
|
17
|
+
transform="matrix(0.61694389,0,0,0.61694389,15.812344,50.295217)"
|
|
18
|
+
style="fill:#e6e6e6"><path
|
|
19
|
+
style="fill:#e6e6e6;stroke-width:0.116444"
|
|
20
|
+
d="m 124.4332,166.70241 c -6.00101,-0.69923 -10.50396,-3.48634 -12.7204,-7.87331 -0.53644,-1.06176 -0.82317,-2.05256 -0.96733,-3.34257 -0.11336,-1.01451 -0.10299,-1.40841 0.0691,-2.62469 0.25224,-1.78262 0.67348,-2.95794 1.53457,-4.28174 2.39474,-3.68158 7.04291,-5.94077 12.69376,-6.16968 6.60357,-0.2675 13.18504,2.52141 15.99573,6.77823 l 0.6151,0.93156 1.26391,0.0627 c 1.1346,0.0563 1.29571,0.092 1.57469,0.34934 0.53911,0.4973 0.63008,0.8897 0.63008,2.7179 v 1.68183 l -0.35827,0.30147 c -0.30875,0.25979 -0.46798,0.30146 -1.15198,0.30146 -0.8695,0 -0.93508,0.0522 -0.93508,0.74448 0,0.54701 -0.40676,2.01336 -0.80423,2.89926 -1.54093,3.43444 -5.15495,6.06224 -9.79221,7.12004 -2.05593,0.46898 -5.51868,0.6518 -7.64746,0.40376 z m 6.59946,-2.95664 c 3.65125,-0.69463 6.24561,-2.22148 7.78548,-4.58197 0.93753,-1.43715 1.11704,-2.09343 1.12001,-4.09471 0.002,-1.36374 -0.0402,-1.8116 -0.21944,-2.32889 -1.05303,-3.03857 -3.84979,-5.52352 -7.68462,-6.82783 -1.9595,-0.66647 -4.78753,-0.9633 -7.11821,-0.74714 -2.03306,0.18856 -3.48769,0.57799 -5.00366,1.33957 -2.31277,1.16186 -3.9415,2.86464 -4.73905,4.95451 -0.36436,0.95478 -0.37784,1.05156 -0.38111,2.73645 -0.004,1.93464 0.0946,2.38323 0.83012,3.78444 1.62872,3.10299 5.43555,5.36218 10.00848,5.93961 1.15415,0.14573 4.24448,0.0462 5.402,-0.17404 z m 6.75375,-9.23396 c -40.345556,-56.38935 -20.17278,-28.19467 0,0 z"
|
|
21
|
+
id="path295-6-0" /><g
|
|
22
|
+
id="g2323-6-0"
|
|
23
|
+
style="fill:#e6e6e6;fill-opacity:1"
|
|
24
|
+
transform="matrix(0.44010471,0,0,0.44010471,77.268074,69.927782)"><path
|
|
25
|
+
d="m 108.94876,204.22063 c -0.94588,-0.4317 -1.76712,-0.82983 -1.82499,-0.88472 -0.18962,-0.17995 5.86349,-22.12073 6.29574,-22.82011 0.16515,-0.26723 0.61124,-0.23264 2.16807,0.16811 1.07807,0.27752 1.94585,0.61121 1.92836,0.74155 -0.0533,0.3976 -1.95781,7.27734 -2.48263,8.96824 -0.27102,0.87312 -1.28929,4.445 -2.26285,7.9375 -0.97356,3.4925 -1.84478,6.42297 -1.93601,6.51217 -0.0913,0.0892 -0.9398,-0.19104 -1.88569,-0.62274 z M 98.8946,198.18607 c -3.274214,-2.04392 -6.816324,-4.21056 -7.871354,-4.81475 -1.71506,-0.98218 -2.32063,-1.52242 -1.70654,-1.52242 0.19859,0 5.88167,-3.23174 12.721034,-7.23396 1.65595,-0.96903 3.05493,-1.76187 3.10885,-1.76187 0.0539,0 0.098,1.05318 0.098,2.34039 v 2.34039 l -4.81399,2.31189 -4.814014,2.3119 1.30829,0.73684 c 0.719524,0.40527 2.885834,1.59343 4.813984,2.64036 l 3.50573,1.90351 v 2.23236 c 0,1.2278 -0.0893,2.23219 -0.19844,2.23197 -0.10914,-2.2e-4 -2.87734,-1.67269 -6.15156,-3.71661 z"
|
|
26
|
+
style="fill:#e6e6e6;fill-opacity:1;stroke-width:0.264583"
|
|
27
|
+
id="path351-1-0" /><path
|
|
28
|
+
d="m 126.09199,187.66114 c 3.27421,2.04392 6.81632,4.21056 7.87135,4.81475 1.71506,0.98218 2.32063,1.52242 1.70654,1.52242 -0.19859,0 -5.88167,3.23174 -12.72103,7.23396 -1.65595,0.96903 -3.05493,1.76187 -3.10885,1.76187 -0.0539,0 -0.098,-1.05318 -0.098,-2.34039 v -2.34039 l 4.81399,-2.31189 4.81401,-2.3119 -1.30829,-0.73684 c -0.71952,-0.40527 -2.88583,-1.59343 -4.81398,-2.64036 l -3.50573,-1.90351 v -2.23236 c 0,-1.2278 0.0893,-2.23219 0.19844,-2.23197 0.10914,2.2e-4 2.87734,1.67269 6.15156,3.71661 z"
|
|
29
|
+
style="fill:#e6e6e6;fill-opacity:1;stroke-width:0.264583"
|
|
30
|
+
id="path374-6-6" /></g></g><g
|
|
31
|
+
aria-label="vibe"
|
|
32
|
+
id="text225"
|
|
33
|
+
style="font-size:22.5778px;letter-spacing:-0.5715px;stroke-width:0.264583"><g
|
|
34
|
+
id="g194"
|
|
35
|
+
transform="matrix(1,0,0,0.85070708,0,23.513144)"><path
|
|
36
|
+
d="m 63.64411,157.18062 -3.567293,-11.19859 h 3.025425 l 2.596448,9.12143 h 0.4064 l 2.596447,-9.12143 h 3.025425 l -3.567292,11.19859 z"
|
|
37
|
+
style="font-weight:bold;font-family:'Space Grotesk';-inkscape-font-specification:'Space Grotesk Bold'"
|
|
38
|
+
id="path184" /><path
|
|
39
|
+
d="m 73.097161,157.18062 v -11.19859 h 2.844803 v 11.19859 z m 1.422402,-12.5081 q -0.767646,0 -1.309513,-0.49671 -0.519289,-0.49672 -0.519289,-1.30952 0,-0.8128 0.519289,-1.30951 0.541867,-0.49671 1.309513,-0.49671 0.790223,0 1.309512,0.49671 0.519289,0.49671 0.519289,1.30951 0,0.8128 -0.519289,1.30952 -0.519289,0.49671 -1.309512,0.49671 z"
|
|
40
|
+
style="font-weight:bold;font-family:'Space Grotesk';-inkscape-font-specification:'Space Grotesk Bold'"
|
|
41
|
+
id="path186" /><path
|
|
42
|
+
d="m 85.259558,157.49671 q -1.512712,0 -2.325513,-0.51929 -0.812801,-0.51929 -1.196624,-1.15147 h -0.4064 v 1.35467 h -2.799647 v -15.80446 h 2.844803 v 5.8928 h 0.4064 q 0.248356,-0.4064 0.654756,-0.76764 0.428979,-0.36125 1.106313,-0.58702 0.699911,-0.24836 1.715912,-0.24836 1.354668,0 2.506136,0.67733 1.151468,0.65476 1.85138,1.94169 0.699912,1.28694 0.699912,3.11574 v 0.36125 q 0,1.8288 -0.699912,3.11573 -0.699912,1.28694 -1.85138,1.96427 -1.151468,0.65476 -2.506136,0.65476 z m -0.857956,-2.48356 q 1.309512,0 2.190047,-0.83538 0.880534,-0.85796 0.880534,-2.48356 v -0.22578 q 0,-1.6256 -0.880534,-2.46098 -0.857957,-0.85795 -2.190047,-0.85795 -1.309512,0 -2.190047,0.85795 -0.880534,0.83538 -0.880534,2.46098 v 0.22578 q 0,1.6256 0.880534,2.48356 0.880535,0.83538 2.190047,0.83538 z"
|
|
43
|
+
style="font-weight:bold;font-family:'Space Grotesk';-inkscape-font-specification:'Space Grotesk Bold'"
|
|
44
|
+
id="path188" /><path
|
|
45
|
+
d="m 97.467104,157.49671 q -1.670757,0 -2.957692,-0.69991 -1.264357,-0.72249 -1.986847,-2.00943 -0.699911,-1.30951 -0.699911,-3.07058 v -0.27093 q 0,-1.76107 0.699911,-3.04801 0.699912,-1.30951 1.964269,-2.00942 1.264357,-0.72249 2.935114,-0.72249 1.64818,0 2.867382,0.74507 1.2192,0.72249 1.89653,2.032 0.67734,1.28693 0.67734,3.00285 v 0.97084 h -8.150588 q 0.04516,1.15147 0.857957,1.87396 0.8128,0.72249 1.986846,0.72249 1.196623,0 1.761068,-0.51929 0.564445,-0.51929 0.857957,-1.15147 l 2.32551,1.2192 q -0.31609,0.58703 -0.92569,1.28694 -0.58702,0.67733 -1.580443,1.17404 -0.993423,0.47414 -2.528713,0.47414 z m -2.731914,-7.20232 h 5.23805 q -0.09031,-0.97085 -0.790223,-1.55787 -0.677334,-0.58702 -1.783647,-0.58702 -1.151467,0 -1.828801,0.58702 -0.677334,0.58702 -0.835379,1.55787 z"
|
|
46
|
+
style="font-weight:bold;font-family:'Space Grotesk';-inkscape-font-specification:'Space Grotesk Bold'"
|
|
47
|
+
id="path190" /></g></g><path
|
|
48
|
+
d="m 106.40885,151.30184 c -1.51466,-0.19751 -2.6024,-0.85168 -3.12237,-1.87779 -0.55652,-1.09823 -0.0393,-2.46987 1.14417,-3.03421 0.29113,-0.13884 0.40561,-0.29684 0.21507,-0.29684 -0.18492,0 -0.78234,-0.61632 -0.94546,-0.97536 -0.18587,-0.40913 -0.23205,-1.36833 -0.0846,-1.75625 0.13039,-0.34294 0.72204,-0.96408 1.16632,-1.22444 0.65217,-0.38219 1.2396,-0.51836 2.46697,-0.57182 0.99505,-0.0433 1.2803,-0.0217 1.9502,0.14767 1.77808,0.44964 2.69082,1.61909 2.32476,2.97858 -0.11368,0.42199 -0.80607,1.25627 -1.12728,1.35822 -0.2665,0.0846 -0.21555,0.17315 0.22189,0.38567 1.10883,0.53872 1.59516,1.44142 1.36207,2.52828 -0.30976,1.44434 -1.73103,2.30208 -3.94486,2.38074 -0.56245,0.02 -1.29456,7.2e-4 -1.62692,-0.0424 z m 2.45818,-1.85006 c 1.09175,-0.48294 1.03868,-1.74309 -0.0949,-2.25315 -0.81701,-0.3676 -2.09847,-0.30559 -2.74937,0.13304 -0.66961,0.45125 -0.68086,1.38731 -0.0228,1.8893 0.67708,0.51643 1.98351,0.6216 2.86698,0.23081 z m -0.67146,-4.01364 c 0.80517,-0.22362 1.1694,-0.87069 0.85869,-1.52547 -0.22827,-0.48104 -0.75531,-0.73448 -1.53373,-0.73755 -0.78022,-0.004 -1.2745,0.23284 -1.51878,0.72485 -0.50485,1.01684 0.79341,1.9271 2.19382,1.53817 z m 7.81345,5.81064 c -2.46278,-0.66326 -3.79865,-3.18528 -3.23834,-6.11375 0.43213,-2.25856 2.11815,-3.59741 4.53023,-3.59741 1.01249,0 1.63981,0.13008 2.3557,0.48847 1.00937,0.50531 1.49641,1.00444 2.04407,2.09483 0.7703,1.53364 0.52919,4.17315 -0.5069,5.5492 -0.51178,0.67971 -1.36837,1.27614 -2.203,1.53394 -0.73088,0.22573 -2.22632,0.24818 -2.98176,0.0447 z m 2.39702,-1.90425 c 0.44621,-0.22763 0.8796,-0.75354 1.06637,-1.29403 0.2287,-0.66183 0.27287,-1.79923 0.10118,-2.60548 -0.28228,-1.32551 -0.95902,-2.0327 -2.02086,-2.11182 -0.51742,-0.0386 -0.65666,-0.0105 -1.10346,0.219 -0.36166,0.18609 -0.59937,0.39487 -0.81218,0.71332 -0.41364,0.61893 -0.5229,1.06874 -0.5229,2.15286 0,0.51131 0.05,1.10358 0.111,1.31615 0.13302,0.46317 0.62092,1.20626 0.95055,1.44773 0.63705,0.46667 1.50926,0.53014 2.23031,0.16227 z m -16.12139,-3.00529 0.0611,0.86935"
|
|
49
|
+
style="fill:#fe6629;fill-opacity:1;stroke-width:0.0929665"
|
|
50
|
+
id="path328-9" /></g></svg>
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
+
import { faXmark } from "@fortawesome/free-solid-svg-icons";
|
|
4
|
+
import { Command, CommandList, CommandItem } from "cmdk";
|
|
5
|
+
|
|
6
|
+
export default function ChatComposer({
|
|
7
|
+
t,
|
|
8
|
+
activePane,
|
|
9
|
+
isDraggingAttachments,
|
|
10
|
+
onSubmit,
|
|
11
|
+
onDragEnterComposer,
|
|
12
|
+
onDragOverComposer,
|
|
13
|
+
onDragLeaveComposer,
|
|
14
|
+
onDropAttachments,
|
|
15
|
+
composerRef,
|
|
16
|
+
draftAttachments,
|
|
17
|
+
getAttachmentExtension,
|
|
18
|
+
formatAttachmentSize,
|
|
19
|
+
removeDraftAttachment,
|
|
20
|
+
commandMenuOpen,
|
|
21
|
+
filteredCommands,
|
|
22
|
+
setInput,
|
|
23
|
+
setCommandMenuOpen,
|
|
24
|
+
setCommandQuery,
|
|
25
|
+
inputRef,
|
|
26
|
+
commandSelection,
|
|
27
|
+
triggerAttachmentPicker,
|
|
28
|
+
attachmentSession,
|
|
29
|
+
attachmentsLoading,
|
|
30
|
+
isMobileLayout,
|
|
31
|
+
uploadInputRef,
|
|
32
|
+
onUploadAttachments,
|
|
33
|
+
input,
|
|
34
|
+
handleInputChange,
|
|
35
|
+
handleComposerKeyDown,
|
|
36
|
+
onPasteAttachments,
|
|
37
|
+
canInterrupt,
|
|
38
|
+
interruptTurn,
|
|
39
|
+
connected,
|
|
40
|
+
modelSelectorVisible,
|
|
41
|
+
modelOptions,
|
|
42
|
+
selectedModel,
|
|
43
|
+
modelLoading,
|
|
44
|
+
modelDisabled,
|
|
45
|
+
modelError,
|
|
46
|
+
onModelChange,
|
|
47
|
+
isCodexReady,
|
|
48
|
+
interactionBlocked,
|
|
49
|
+
attachmentsError,
|
|
50
|
+
}) {
|
|
51
|
+
if (activePane !== "chat") {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<form
|
|
57
|
+
className={`composer composer--sticky ${
|
|
58
|
+
isDraggingAttachments ? "is-dragging" : ""
|
|
59
|
+
}`}
|
|
60
|
+
onSubmit={onSubmit}
|
|
61
|
+
onDragEnter={onDragEnterComposer}
|
|
62
|
+
onDragOver={onDragOverComposer}
|
|
63
|
+
onDragLeave={onDragLeaveComposer}
|
|
64
|
+
onDrop={onDropAttachments}
|
|
65
|
+
ref={composerRef}
|
|
66
|
+
>
|
|
67
|
+
<div className="composer-inner">
|
|
68
|
+
{draftAttachments.length ? (
|
|
69
|
+
<div
|
|
70
|
+
className="composer-attachments"
|
|
71
|
+
aria-label={t("Selected attachments")}
|
|
72
|
+
>
|
|
73
|
+
{draftAttachments.map((attachment) => {
|
|
74
|
+
const label = attachment?.name || attachment?.path || "";
|
|
75
|
+
const key = attachment?.path || attachment?.name || label;
|
|
76
|
+
const extension = getAttachmentExtension(attachment, t);
|
|
77
|
+
const sizeLabel =
|
|
78
|
+
attachment?.lineCount || attachment?.lines
|
|
79
|
+
? t("{{count}} lines", {
|
|
80
|
+
count: attachment.lineCount || attachment.lines,
|
|
81
|
+
})
|
|
82
|
+
: formatAttachmentSize(attachment?.size, t);
|
|
83
|
+
return (
|
|
84
|
+
<div className="attachment-card" key={key}>
|
|
85
|
+
<div className="attachment-card-body">
|
|
86
|
+
<div className="attachment-card-title">{label}</div>
|
|
87
|
+
{sizeLabel ? (
|
|
88
|
+
<div className="attachment-card-meta">{sizeLabel}</div>
|
|
89
|
+
) : null}
|
|
90
|
+
</div>
|
|
91
|
+
<div className="attachment-card-footer">
|
|
92
|
+
<span className="attachment-card-type">{extension}</span>
|
|
93
|
+
<button
|
|
94
|
+
type="button"
|
|
95
|
+
className="attachment-card-remove"
|
|
96
|
+
aria-label={t("Remove {{label}}", {
|
|
97
|
+
label,
|
|
98
|
+
})}
|
|
99
|
+
onClick={() =>
|
|
100
|
+
removeDraftAttachment(
|
|
101
|
+
attachment?.path || attachment?.name
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
>
|
|
105
|
+
<FontAwesomeIcon icon={faXmark} />
|
|
106
|
+
</button>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
);
|
|
110
|
+
})}
|
|
111
|
+
</div>
|
|
112
|
+
) : null}
|
|
113
|
+
{commandMenuOpen && (
|
|
114
|
+
<div className="composer-command-menu">
|
|
115
|
+
<Command className="command-menu" shouldFilter={false}>
|
|
116
|
+
<CommandList>
|
|
117
|
+
{filteredCommands.length ? (
|
|
118
|
+
filteredCommands.map((cmd) => (
|
|
119
|
+
<CommandItem
|
|
120
|
+
key={cmd.id}
|
|
121
|
+
onSelect={() => {
|
|
122
|
+
setInput(cmd.insert);
|
|
123
|
+
setCommandMenuOpen(false);
|
|
124
|
+
setCommandQuery("");
|
|
125
|
+
inputRef.current?.focus();
|
|
126
|
+
}}
|
|
127
|
+
className={`command-item${
|
|
128
|
+
cmd.id === commandSelection ? " is-selected" : ""
|
|
129
|
+
}`}
|
|
130
|
+
>
|
|
131
|
+
<span className="command-item-label">{cmd.label}</span>
|
|
132
|
+
<span className="command-item-desc">
|
|
133
|
+
{cmd.description}
|
|
134
|
+
</span>
|
|
135
|
+
</CommandItem>
|
|
136
|
+
))
|
|
137
|
+
) : (
|
|
138
|
+
<div className="command-empty">{t("No commands found.")}</div>
|
|
139
|
+
)}
|
|
140
|
+
</CommandList>
|
|
141
|
+
</Command>
|
|
142
|
+
</div>
|
|
143
|
+
)}
|
|
144
|
+
<div className="composer-main">
|
|
145
|
+
<button
|
|
146
|
+
type="button"
|
|
147
|
+
className="icon-button composer-attach-button"
|
|
148
|
+
aria-label={t("Add attachment")}
|
|
149
|
+
onClick={triggerAttachmentPicker}
|
|
150
|
+
disabled={!attachmentSession || attachmentsLoading}
|
|
151
|
+
>
|
|
152
|
+
+
|
|
153
|
+
{isMobileLayout ? (
|
|
154
|
+
<span className="attachment-badge">{draftAttachments.length}</span>
|
|
155
|
+
) : null}
|
|
156
|
+
</button>
|
|
157
|
+
<input
|
|
158
|
+
ref={uploadInputRef}
|
|
159
|
+
type="file"
|
|
160
|
+
multiple
|
|
161
|
+
onChange={onUploadAttachments}
|
|
162
|
+
disabled={!attachmentSession || attachmentsLoading}
|
|
163
|
+
className="visually-hidden"
|
|
164
|
+
/>
|
|
165
|
+
<textarea
|
|
166
|
+
className="composer-input"
|
|
167
|
+
value={input}
|
|
168
|
+
onChange={handleInputChange}
|
|
169
|
+
onKeyDown={handleComposerKeyDown}
|
|
170
|
+
onPaste={onPasteAttachments}
|
|
171
|
+
placeholder={t("Write your message…")}
|
|
172
|
+
rows={1}
|
|
173
|
+
ref={inputRef}
|
|
174
|
+
/>
|
|
175
|
+
{modelSelectorVisible ? (
|
|
176
|
+
<select
|
|
177
|
+
className="composer-model-select"
|
|
178
|
+
value={selectedModel || ""}
|
|
179
|
+
onChange={(event) => onModelChange?.(event.target.value)}
|
|
180
|
+
disabled={modelDisabled}
|
|
181
|
+
aria-label={t("Model")}
|
|
182
|
+
title={modelError || t("Model")}
|
|
183
|
+
>
|
|
184
|
+
{modelLoading ? (
|
|
185
|
+
<option value="">{t("Loading...")}</option>
|
|
186
|
+
) : null}
|
|
187
|
+
<option value="">{t("Default model")}</option>
|
|
188
|
+
{(Array.isArray(modelOptions) ? modelOptions : []).map((model) => (
|
|
189
|
+
<option key={model.id || model.model} value={model.model || ""}>
|
|
190
|
+
{model.displayName || model.model || ""}
|
|
191
|
+
</option>
|
|
192
|
+
))}
|
|
193
|
+
</select>
|
|
194
|
+
) : null}
|
|
195
|
+
{canInterrupt ? (
|
|
196
|
+
<button
|
|
197
|
+
type="button"
|
|
198
|
+
className="primary stop-button"
|
|
199
|
+
onClick={interruptTurn}
|
|
200
|
+
aria-label={t("Stop")}
|
|
201
|
+
title={t("Stop")}
|
|
202
|
+
>
|
|
203
|
+
<span className="stop-icon">⏹</span>
|
|
204
|
+
</button>
|
|
205
|
+
) : (
|
|
206
|
+
<button
|
|
207
|
+
type="submit"
|
|
208
|
+
className="primary send-button"
|
|
209
|
+
disabled={
|
|
210
|
+
!connected || !input.trim() || !isCodexReady || interactionBlocked
|
|
211
|
+
}
|
|
212
|
+
aria-label={t("Send")}
|
|
213
|
+
title={t("Send")}
|
|
214
|
+
>
|
|
215
|
+
<span className="send-icon">➤</span>
|
|
216
|
+
</button>
|
|
217
|
+
)}
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
{attachmentsError && (
|
|
221
|
+
<div className="attachments-error composer-attachments-error">
|
|
222
|
+
{attachmentsError}
|
|
223
|
+
</div>
|
|
224
|
+
)}
|
|
225
|
+
</div>
|
|
226
|
+
</form>
|
|
227
|
+
);
|
|
228
|
+
}
|