codex-mobile-re 0.1.102 → 0.1.103

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 (28) hide show
  1. package/LICENSE +11 -11
  2. package/README.md +214 -214
  3. package/dist/assets/{AutomationsPanel-ulx5N8pM.css → AutomationsPanel-BBeoQ-Fx.css} +1 -1
  4. package/dist/assets/{AutomationsPanel-BZ73-GJE.js → AutomationsPanel-CnK1Yuru.js} +1 -1
  5. package/dist/assets/{DirectoryHub-DWtUbt5I.js → DirectoryHub-BunsdSMs.js} +2 -2
  6. package/dist/assets/{DirectoryHub-BOBZNd77.css → DirectoryHub-Ce5pFnd0.css} +1 -1
  7. package/dist/assets/{ReviewPane-Cd7kjB6d.js → ReviewPane-C02hbV2G.js} +1 -1
  8. package/dist/assets/{ReviewPane-B8ZRIB5L.css → ReviewPane-CyX0PWor.css} +1 -1
  9. package/dist/assets/{ThreadConversation-BFAPAWUd.js → ThreadConversation-BS09bMfR.js} +5 -5
  10. package/dist/assets/{ThreadConversation-Db8A09JM.css → ThreadConversation-D0SQKKN2.css} +1 -1
  11. package/dist/assets/{ThreadTerminalPanel-O7IxAyfy.css → ThreadTerminalPanel-BHXovq7A.css} +1 -1
  12. package/dist/assets/{ThreadTerminalPanel-C0cuIPzx.js → ThreadTerminalPanel-juDCK2c0.js} +2 -2
  13. package/dist/assets/index-DDchNpQh.js +87 -0
  14. package/dist/assets/{index-bLpg1m_q.css → index-DM1MDzKD.css} +1 -1
  15. package/dist/assets/{index.esm-Cxn_LBGD.js → index.esm-Cls06s1L.js} +1 -1
  16. package/dist/icons/codexui-icon.svg +52 -52
  17. package/dist/icons/pwa-icon.svg +38 -38
  18. package/dist/icons/pwa-maskable.svg +36 -36
  19. package/dist/index.html +21 -21
  20. package/dist/manifest.webmanifest +36 -36
  21. package/dist/sw.js +92 -92
  22. package/dist-cli/index.js +0 -0
  23. package/dist-cli/index.js.map +1 -1
  24. package/package.json +94 -94
  25. package/scripts/dev-random-home.cjs +21 -21
  26. package/scripts/dev.cjs +69 -69
  27. package/scripts/fix-pty-native-build.cjs +70 -70
  28. package/dist/assets/index-BALsV_-J.js +0 -86
package/LICENSE CHANGED
@@ -1,11 +1,11 @@
1
- MIT License
2
-
3
- Copyright 2026 Pavel Voronin, Igor Levochkin
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10
-
11
-
1
+ MIT License
2
+
3
+ Copyright 2026 Pavel Voronin, Igor Levochkin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10
+
11
+
package/README.md CHANGED
@@ -1,214 +1,214 @@
1
- # 🔥 codex-mobile-re
2
-
3
- ### 🚀 Run Codex App UI Anywhere: Linux, Windows, or Termux on Android 🚀
4
-
5
- [![npm](https://img.shields.io/npm/v/codex-mobile-re?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/package/codex-mobile-re)
6
- [![platform](https://img.shields.io/badge/Platform-Linux%20%7C%20Windows%20%7C%20Android-blue?style=for-the-badge)](#-quick-start)
7
- [![node](https://img.shields.io/badge/Node-18%2B-339933?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/)
8
- [![license](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](./LICENSE)
9
-
10
- > **Codex UI in your browser. No drama. One command.**
11
- >
12
- > **Yes, that is your Codex desktop app experience exposed over web UI. Yes, it runs cross-platform.**
13
-
14
- > **codex-mobile-re** is a fork rebuild of `codexapp` (upstream: [friuns2/codex-mobile](https://github.com/friuns2/codex-mobile), originally from [pavel-voronin/codex-web-local](https://github.com/pavel-voronin/codex-web-local)), focused on mobile-first web UI, thread/message rendering refinements, and long-session stability. It is published on npm as `codex-mobile-re` and released on GitHub as `cattails-lgao/codex-mobile`.
15
-
16
- ```text
17
- ██████╗ ██████╗ ██████╗ ███████╗██╗ ██╗██╗ ██╗██╗
18
- ██╔════╝██╔═══██╗██╔══██╗██╔════╝╚██╗██╔╝██║ ██║██║
19
- ██║ ██║ ██║██║ ██║█████╗ ╚███╔╝ ██║ ██║██║
20
- ██║ ██║ ██║██║ ██║██╔══╝ ██╔██╗ ██║ ██║██║
21
- ╚██████╗╚██████╔╝██████╔╝███████╗██╔╝ ██╗╚██████╔╝██║
22
- ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝
23
- ```
24
-
25
- ---
26
-
27
- ## 🤯 What Is This?
28
- **`codex-mobile-re`** is a lightweight bridge that gives you a browser-accessible UI for Codex app-server workflows.
29
-
30
- You run one command. It starts a local web server. You open it from your machine, your LAN, or wherever your setup allows.
31
-
32
- **TL;DR 🧠: Codex app UI, unlocked for Linux, Windows, and Termux-powered Android setups.**
33
-
34
- ---
35
-
36
- ## ⚡ Quick Start
37
- > **The main event.**
38
-
39
- ```bash
40
- # 🔓 Run instantly (recommended)
41
- npx codex-mobile-re
42
-
43
- # 🌐 Then open in browser
44
- # http://localhost:5900
45
- ```
46
-
47
- By default, `codex-mobile-re` now also starts:
48
-
49
- ```bash
50
- cloudflared tunnel --url http://localhost:<port>
51
- ```
52
-
53
- It prints the tunnel URL, terminal QR code, and password together in startup output.
54
- Use `--no-tunnel` to disable this behavior.
55
-
56
- If you are using a provider or AI gateway that is already authenticated and do not want `codex-mobile-re` to force `codex login` during startup, use:
57
-
58
- ```bash
59
- npx codex-mobile-re --no-login
60
- ```
61
-
62
- ### Linux 🐧
63
- ```bash
64
- node -v # should be 18+
65
- npx codex-mobile-re
66
- ```
67
-
68
- ### Windows 🪟 (PowerShell)
69
- ```powershell
70
- node -v # 18+
71
- npx codex-mobile-re
72
- ```
73
-
74
- ### Termux (Android) 🤖
75
- ```bash
76
- pkg update && pkg upgrade -y
77
- pkg install nodejs -y
78
- npx codex-mobile-re
79
- ```
80
-
81
- Android background requirements:
82
-
83
- 1. Keep `codex-mobile-re` running in the current Termux session (do not close it).
84
- 2. In Android settings, disable battery optimization for `Termux`.
85
- 3. Keep the persistent Termux notification enabled so Android is less likely to kill it.
86
- 4. Optional but recommended in Termux:
87
- ```bash
88
- termux-wake-lock
89
- ```
90
- 5. Open the shown URL in your Android browser. If the app is killed, return to Termux and run `npx codex-mobile-re` again.
91
-
92
- ---
93
-
94
- ## ✨ Features
95
- > **The payload.**
96
-
97
- - 🚀 One-command launch with `npx codex-mobile-re`
98
- - 🌍 Cross-platform support for Linux, Windows, and Termux on Android
99
- - 🖥️ Browser-first Codex UI flow on `http://localhost:5900`
100
- - 🌐 LAN-friendly access from other devices on the same network
101
- - 🧪 Remote/headless-friendly setup for server-based Codex usage
102
- - 🔌 Works with reverse proxies and tunneling setups
103
- - ⚡ No global install required for quick experimentation
104
- - 🎙️ Built-in hold-to-dictate voice input with transcription to composer draft
105
- - 🤖 Optional Telegram bot bridge: send messages to bot, forward into mapped thread, send assistant reply back to Telegram
106
- - 💾 Project portability: export a project as a ZIP from project or thread menus, including matching Codex chat JSONL history under `.codex-project/chats/`
107
- - 📦 Project import: restore exported project ZIPs from the browser via `Import Project`
108
- - 🔁 Imported chats are rewritten for the destination `CODEX_HOME`, project path, and currently selected provider/model so they can be resumed in the new environment
109
- - ⚙️ Project ZIP performance: exports stream ZIP bytes with response backpressure handling and skip generated/git-ignored folders; imports still buffer the selected ZIP once because the browser upload arrives as a single file
110
-
111
- ### Telegram Bot Bridge (Optional)
112
-
113
- Set these environment variables before starting `codex-mobile-re`:
114
-
115
- ```bash
116
- export TELEGRAM_BOT_TOKEN="<your-telegram-bot-token>"
117
- export TELEGRAM_ALLOWED_USER_IDS="<your-telegram-user-id>,<optional-second-id>"
118
- export TELEGRAM_DEFAULT_CWD="$PWD" # optional, defaults to current working directory
119
- npx codex-mobile-re
120
- ```
121
-
122
- `TELEGRAM_ALLOWED_USER_IDS` is required for safe access. Only allowlisted Telegram user IDs can use the bridge. If no allowed user IDs are configured, incoming Telegram messages are rejected.
123
-
124
- To find your Telegram user ID:
125
-
126
- 1. Send a message to your bot.
127
- 2. Run `curl "https://api.telegram.org/bot<your-telegram-bot-token>/getUpdates"`.
128
- 3. Read `message.from.id` from the returned update payload.
129
-
130
- Bot commands:
131
-
132
- - `/start` show quick help and thread picker
133
- - `/threads` list recent threads and pick one
134
- - `/newthread` create and map a new Codex thread for this Telegram chat
135
- - `/thread <threadId>` map current Telegram chat to an existing thread
136
- - `/current` show currently connected thread for this chat
137
- - `/history` show recent history for current thread
138
- - `/status` show bridge/mapping status
139
- - `/whoami` show your Telegram user/chat IDs and authorization state
140
- - `/help` show command reference
141
-
142
- Outgoing assistant messages are sent with Telegram `parse_mode=HTML` for formatting, with automatic plain-text fallback if HTML delivery fails.
143
-
144
- ---
145
-
146
- ## 🌍 What Can You Do With This?
147
-
148
- | 🔥 Use Case | 💥 What You Get |
149
- |---|---|
150
- | 💻 Linux workstation | Run Codex UI in browser without depending on desktop shell |
151
- | 🪟 Windows machine | Launch web UI and access from Chrome/Edge quickly |
152
- | 📱 Termux on Android | Start service in Termux and control from mobile browser |
153
- | 🧪 Remote dev box | Keep Codex process on server, view UI from client device |
154
- | 🌐 LAN sharing | Open UI from another device on same network |
155
- | 🧰 Headless workflows | Keep terminal + browser split for productivity |
156
- | 🔌 Custom routing | Put behind reverse proxy/tunnel if needed |
157
- | ⚡ Fast experiments | `npx` run without full global setup |
158
-
159
- ---
160
-
161
- ## 🏗️ Architecture
162
-
163
- ```text
164
- ┌─────────────────────────────┐
165
- │ Browser (Desktop/Mobile) │
166
- └──────────────┬──────────────┘
167
- │ HTTP/WebSocket
168
- ┌──────────────▼──────────────┐
169
- │ codex-mobile-re │
170
- │ (Express + Vue UI bridge) │
171
- └──────────────┬──────────────┘
172
- │ RPC/Bridge calls
173
- ┌──────────────▼──────────────┐
174
- │ Codex App Server │
175
- └─────────────────────────────┘
176
- ```
177
-
178
- ---
179
-
180
- ## 🎯 Requirements
181
- - ✅ Node.js `18+`
182
- - ✅ Codex app-server environment available
183
- - ✅ Browser access to host/port
184
- - ✅ Microphone permission (only for voice dictation)
185
-
186
- ---
187
-
188
- ## 🐛 Troubleshooting
189
-
190
- | ❌ Problem | ✅ Fix |
191
- |---|---|
192
- | Port already in use | Run on a free port (`--port <port>`) or stop old process |
193
- | `npx` fails | Update npm/node, then retry |
194
- | Termux install fails | `pkg update && pkg upgrade` then reinstall `nodejs` |
195
- | Can’t open from other device | Check firewall, bind address, and LAN routing |
196
-
197
- ---
198
-
199
- ## 🤝 Contributing
200
- Issues and PRs are welcome.
201
- Bring bug reports, platform notes, and setup improvements.
202
-
203
- ---
204
-
205
- ## ⭐ Star This Repo
206
- If you believe Codex UI should be accessible from **any machine, any OS, any screen**, star this project and share it. ⭐
207
-
208
- <div align="center">
209
- Built for speed, portability, and a little bit of chaos 😏
210
- </div>
211
-
212
- ---
213
-
214
- Forked from [friuns2/codex-mobile](https://github.com/friuns2/codex-mobile), originally from [pavel-voronin/codex-web-local](https://github.com/pavel-voronin/codex-web-local).
1
+ # 🔥 codex-mobile-re
2
+
3
+ ### 🚀 Run Codex App UI Anywhere: Linux, Windows, or Termux on Android 🚀
4
+
5
+ [![npm](https://img.shields.io/npm/v/codex-mobile-re?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/package/codex-mobile-re)
6
+ [![platform](https://img.shields.io/badge/Platform-Linux%20%7C%20Windows%20%7C%20Android-blue?style=for-the-badge)](#-quick-start)
7
+ [![node](https://img.shields.io/badge/Node-18%2B-339933?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/)
8
+ [![license](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](./LICENSE)
9
+
10
+ > **Codex UI in your browser. No drama. One command.**
11
+ >
12
+ > **Yes, that is your Codex desktop app experience exposed over web UI. Yes, it runs cross-platform.**
13
+
14
+ > **codex-mobile-re** is a fork rebuild of `codexapp` (upstream: [friuns2/codex-mobile](https://github.com/friuns2/codex-mobile), originally from [pavel-voronin/codex-web-local](https://github.com/pavel-voronin/codex-web-local)), focused on mobile-first web UI, thread/message rendering refinements, and long-session stability. It is published on npm as `codex-mobile-re` and released on GitHub as `cattails-lgao/codex-mobile`.
15
+
16
+ ```text
17
+ ██████╗ ██████╗ ██████╗ ███████╗██╗ ██╗██╗ ██╗██╗
18
+ ██╔════╝██╔═══██╗██╔══██╗██╔════╝╚██╗██╔╝██║ ██║██║
19
+ ██║ ██║ ██║██║ ██║█████╗ ╚███╔╝ ██║ ██║██║
20
+ ██║ ██║ ██║██║ ██║██╔══╝ ██╔██╗ ██║ ██║██║
21
+ ╚██████╗╚██████╔╝██████╔╝███████╗██╔╝ ██╗╚██████╔╝██║
22
+ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝
23
+ ```
24
+
25
+ ---
26
+
27
+ ## 🤯 What Is This?
28
+ **`codex-mobile-re`** is a lightweight bridge that gives you a browser-accessible UI for Codex app-server workflows.
29
+
30
+ You run one command. It starts a local web server. You open it from your machine, your LAN, or wherever your setup allows.
31
+
32
+ **TL;DR 🧠: Codex app UI, unlocked for Linux, Windows, and Termux-powered Android setups.**
33
+
34
+ ---
35
+
36
+ ## ⚡ Quick Start
37
+ > **The main event.**
38
+
39
+ ```bash
40
+ # 🔓 Run instantly (recommended)
41
+ npx codex-mobile-re
42
+
43
+ # 🌐 Then open in browser
44
+ # http://localhost:5900
45
+ ```
46
+
47
+ By default, `codex-mobile-re` now also starts:
48
+
49
+ ```bash
50
+ cloudflared tunnel --url http://localhost:<port>
51
+ ```
52
+
53
+ It prints the tunnel URL, terminal QR code, and password together in startup output.
54
+ Use `--no-tunnel` to disable this behavior.
55
+
56
+ If you are using a provider or AI gateway that is already authenticated and do not want `codex-mobile-re` to force `codex login` during startup, use:
57
+
58
+ ```bash
59
+ npx codex-mobile-re --no-login
60
+ ```
61
+
62
+ ### Linux 🐧
63
+ ```bash
64
+ node -v # should be 18+
65
+ npx codex-mobile-re
66
+ ```
67
+
68
+ ### Windows 🪟 (PowerShell)
69
+ ```powershell
70
+ node -v # 18+
71
+ npx codex-mobile-re
72
+ ```
73
+
74
+ ### Termux (Android) 🤖
75
+ ```bash
76
+ pkg update && pkg upgrade -y
77
+ pkg install nodejs -y
78
+ npx codex-mobile-re
79
+ ```
80
+
81
+ Android background requirements:
82
+
83
+ 1. Keep `codex-mobile-re` running in the current Termux session (do not close it).
84
+ 2. In Android settings, disable battery optimization for `Termux`.
85
+ 3. Keep the persistent Termux notification enabled so Android is less likely to kill it.
86
+ 4. Optional but recommended in Termux:
87
+ ```bash
88
+ termux-wake-lock
89
+ ```
90
+ 5. Open the shown URL in your Android browser. If the app is killed, return to Termux and run `npx codex-mobile-re` again.
91
+
92
+ ---
93
+
94
+ ## ✨ Features
95
+ > **The payload.**
96
+
97
+ - 🚀 One-command launch with `npx codex-mobile-re`
98
+ - 🌍 Cross-platform support for Linux, Windows, and Termux on Android
99
+ - 🖥️ Browser-first Codex UI flow on `http://localhost:5900`
100
+ - 🌐 LAN-friendly access from other devices on the same network
101
+ - 🧪 Remote/headless-friendly setup for server-based Codex usage
102
+ - 🔌 Works with reverse proxies and tunneling setups
103
+ - ⚡ No global install required for quick experimentation
104
+ - 🎙️ Built-in hold-to-dictate voice input with transcription to composer draft
105
+ - 🤖 Optional Telegram bot bridge: send messages to bot, forward into mapped thread, send assistant reply back to Telegram
106
+ - 💾 Project portability: export a project as a ZIP from project or thread menus, including matching Codex chat JSONL history under `.codex-project/chats/`
107
+ - 📦 Project import: restore exported project ZIPs from the browser via `Import Project`
108
+ - 🔁 Imported chats are rewritten for the destination `CODEX_HOME`, project path, and currently selected provider/model so they can be resumed in the new environment
109
+ - ⚙️ Project ZIP performance: exports stream ZIP bytes with response backpressure handling and skip generated/git-ignored folders; imports still buffer the selected ZIP once because the browser upload arrives as a single file
110
+
111
+ ### Telegram Bot Bridge (Optional)
112
+
113
+ Set these environment variables before starting `codex-mobile-re`:
114
+
115
+ ```bash
116
+ export TELEGRAM_BOT_TOKEN="<your-telegram-bot-token>"
117
+ export TELEGRAM_ALLOWED_USER_IDS="<your-telegram-user-id>,<optional-second-id>"
118
+ export TELEGRAM_DEFAULT_CWD="$PWD" # optional, defaults to current working directory
119
+ npx codex-mobile-re
120
+ ```
121
+
122
+ `TELEGRAM_ALLOWED_USER_IDS` is required for safe access. Only allowlisted Telegram user IDs can use the bridge. If no allowed user IDs are configured, incoming Telegram messages are rejected.
123
+
124
+ To find your Telegram user ID:
125
+
126
+ 1. Send a message to your bot.
127
+ 2. Run `curl "https://api.telegram.org/bot<your-telegram-bot-token>/getUpdates"`.
128
+ 3. Read `message.from.id` from the returned update payload.
129
+
130
+ Bot commands:
131
+
132
+ - `/start` show quick help and thread picker
133
+ - `/threads` list recent threads and pick one
134
+ - `/newthread` create and map a new Codex thread for this Telegram chat
135
+ - `/thread <threadId>` map current Telegram chat to an existing thread
136
+ - `/current` show currently connected thread for this chat
137
+ - `/history` show recent history for current thread
138
+ - `/status` show bridge/mapping status
139
+ - `/whoami` show your Telegram user/chat IDs and authorization state
140
+ - `/help` show command reference
141
+
142
+ Outgoing assistant messages are sent with Telegram `parse_mode=HTML` for formatting, with automatic plain-text fallback if HTML delivery fails.
143
+
144
+ ---
145
+
146
+ ## 🌍 What Can You Do With This?
147
+
148
+ | 🔥 Use Case | 💥 What You Get |
149
+ |---|---|
150
+ | 💻 Linux workstation | Run Codex UI in browser without depending on desktop shell |
151
+ | 🪟 Windows machine | Launch web UI and access from Chrome/Edge quickly |
152
+ | 📱 Termux on Android | Start service in Termux and control from mobile browser |
153
+ | 🧪 Remote dev box | Keep Codex process on server, view UI from client device |
154
+ | 🌐 LAN sharing | Open UI from another device on same network |
155
+ | 🧰 Headless workflows | Keep terminal + browser split for productivity |
156
+ | 🔌 Custom routing | Put behind reverse proxy/tunnel if needed |
157
+ | ⚡ Fast experiments | `npx` run without full global setup |
158
+
159
+ ---
160
+
161
+ ## 🏗️ Architecture
162
+
163
+ ```text
164
+ ┌─────────────────────────────┐
165
+ │ Browser (Desktop/Mobile) │
166
+ └──────────────┬──────────────┘
167
+ │ HTTP/WebSocket
168
+ ┌──────────────▼──────────────┐
169
+ │ codex-mobile-re │
170
+ │ (Express + Vue UI bridge) │
171
+ └──────────────┬──────────────┘
172
+ │ RPC/Bridge calls
173
+ ┌──────────────▼──────────────┐
174
+ │ Codex App Server │
175
+ └─────────────────────────────┘
176
+ ```
177
+
178
+ ---
179
+
180
+ ## 🎯 Requirements
181
+ - ✅ Node.js `18+`
182
+ - ✅ Codex app-server environment available
183
+ - ✅ Browser access to host/port
184
+ - ✅ Microphone permission (only for voice dictation)
185
+
186
+ ---
187
+
188
+ ## 🐛 Troubleshooting
189
+
190
+ | ❌ Problem | ✅ Fix |
191
+ |---|---|
192
+ | Port already in use | Run on a free port (`--port <port>`) or stop old process |
193
+ | `npx` fails | Update npm/node, then retry |
194
+ | Termux install fails | `pkg update && pkg upgrade` then reinstall `nodejs` |
195
+ | Can’t open from other device | Check firewall, bind address, and LAN routing |
196
+
197
+ ---
198
+
199
+ ## 🤝 Contributing
200
+ Issues and PRs are welcome.
201
+ Bring bug reports, platform notes, and setup improvements.
202
+
203
+ ---
204
+
205
+ ## ⭐ Star This Repo
206
+ If you believe Codex UI should be accessible from **any machine, any OS, any screen**, star this project and share it. ⭐
207
+
208
+ <div align="center">
209
+ Built for speed, portability, and a little bit of chaos 😏
210
+ </div>
211
+
212
+ ---
213
+
214
+ Forked from [friuns2/codex-mobile](https://github.com/friuns2/codex-mobile), originally from [pavel-voronin/codex-web-local](https://github.com/pavel-voronin/codex-web-local).
@@ -1 +1 @@
1
- /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-v-4cfc5dc0],[data-v-4cfc5dc0]:before,[data-v-4cfc5dc0]:after,[data-v-4cfc5dc0]::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-leading:initial}}}.automations-panel[data-v-4cfc5dc0]{gap:calc(var(--spacing,.25rem) * 3);min-height:0;padding-inline:calc(var(--spacing,.25rem) * 2);padding-bottom:calc(var(--spacing,.25rem) * 3);flex-direction:column;flex:1;display:flex}@media (min-width:40rem){.automations-panel[data-v-4cfc5dc0]{padding-inline:calc(var(--spacing,.25rem) * 6);padding-bottom:calc(var(--spacing,.25rem) * 6)}}.automations-toolbar[data-v-4cfc5dc0]{justify-content:space-between;align-items:center;gap:calc(var(--spacing,.25rem) * 3);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));padding-bottom:calc(var(--spacing,.25rem) * 3);flex-shrink:0;display:flex}.automations-summary[data-v-4cfc5dc0]{align-items:center;gap:calc(var(--spacing,.25rem) * 2);min-width:0;font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-500,oklch(55.2% .016 285.938));flex-wrap:wrap;display:flex}.automations-summary span[data-v-4cfc5dc0]{background-color:var(--color-zinc-100,oklch(96.7% .001 286.375));padding-inline:calc(var(--spacing,.25rem) * 2);padding-block:var(--spacing,.25rem);border-radius:3.40282e38px}.automations-actions[data-v-4cfc5dc0]{align-items:center;gap:calc(var(--spacing,.25rem) * 2);flex-shrink:0;display:flex}.automations-refresh[data-v-4cfc5dc0],.automations-create[data-v-4cfc5dc0]{height:calc(var(--spacing,.25rem) * 8);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);padding-inline:calc(var(--spacing,.25rem) * 3);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-700,oklch(37% .013 285.805));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));border-radius:3.40282e38px;flex-shrink:0}@media (hover:hover){:is(.automations-refresh[data-v-4cfc5dc0],.automations-create[data-v-4cfc5dc0]):hover{background-color:var(--color-zinc-50,oklch(98.5% 0 none))}}:is(.automations-refresh[data-v-4cfc5dc0],.automations-create[data-v-4cfc5dc0]):disabled{opacity:.6}.automations-error[data-v-4cfc5dc0]{border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-rose-200,oklch(89.2% .058 10.001));background-color:var(--color-rose-50,oklch(96.9% .015 12.422));padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));color:var(--color-rose-700,oklch(51.4% .222 16.935));margin:0}.automations-layout[data-v-4cfc5dc0]{gap:calc(var(--spacing,.25rem) * 3);flex:1;grid-template-columns:repeat(1,minmax(0,1fr));min-height:0;display:grid}@media (min-width:64rem){.automations-layout[data-v-4cfc5dc0]{grid-template-columns:minmax(0,1fr) minmax(320px,420px)}}.automations-list[data-v-4cfc5dc0]{border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);min-height:0;overflow-y:auto}.automation-row[data-v-4cfc5dc0]{align-items:center;gap:calc(var(--spacing,.25rem) * 3);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-zinc-100,oklch(96.7% .001 286.375));width:100%;padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 3);text-align:left;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));grid-template-columns:auto minmax(0,1fr) auto auto;display:grid}.automation-row[data-v-4cfc5dc0]:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.automation-row[data-v-4cfc5dc0]:hover{background-color:var(--color-zinc-50,oklch(98.5% 0 none))}}.automation-row.is-selected[data-v-4cfc5dc0]{background-color:var(--color-zinc-100,oklch(96.7% .001 286.375))}.automation-row-icon[data-v-4cfc5dc0],.automation-detail-icon[data-v-4cfc5dc0]{height:calc(var(--spacing,.25rem) * 8);width:calc(var(--spacing,.25rem) * 8);background-color:var(--color-emerald-100,oklch(95% .052 163.051));color:var(--color-emerald-700,oklch(50.8% .118 165.612));border-radius:3.40282e38px;flex-shrink:0;justify-content:center;align-items:center;display:flex}.automation-row-icon[data-status=PAUSED][data-v-4cfc5dc0],.automation-detail-icon[data-status=PAUSED][data-v-4cfc5dc0]{background-color:var(--color-zinc-100,oklch(96.7% .001 286.375));color:var(--color-zinc-500,oklch(55.2% .016 285.938))}:is(.automation-row-icon[data-v-4cfc5dc0] svg,.automation-detail-icon[data-v-4cfc5dc0] svg){height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4)}.automation-row-main[data-v-4cfc5dc0]{gap:calc(var(--spacing,.25rem) * .5);flex-direction:column;min-width:0;display:flex}.automation-row-title[data-v-4cfc5dc0]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-950,oklch(14.1% .005 285.823));overflow:hidden}.automation-row-meta[data-v-4cfc5dc0]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-zinc-500,oklch(55.2% .016 285.938));overflow:hidden}.automation-row-side[data-v-4cfc5dc0]{min-width:calc(var(--spacing,.25rem) * 24);align-items:flex-end;gap:calc(var(--spacing,.25rem) * .5);text-align:right;flex-direction:column;display:flex}.automation-row-status[data-v-4cfc5dc0]{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-emerald-700,oklch(50.8% .118 165.612))}.automation-row-status[data-status=PAUSED][data-v-4cfc5dc0]{color:var(--color-zinc-500,oklch(55.2% .016 285.938))}.automation-row-schedule[data-v-4cfc5dc0]{max-width:calc(var(--spacing,.25rem) * 36);text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-zinc-500,oklch(55.2% .016 285.938));overflow:hidden}.automation-edit-button[data-v-4cfc5dc0],.automation-detail-edit[data-v-4cfc5dc0]{height:calc(var(--spacing,.25rem) * 7);border-radius:var(--radius-md,.375rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);padding-inline:calc(var(--spacing,.25rem) * 2);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-700,oklch(37% .013 285.805));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));flex-shrink:0}@media (hover:hover){:is(.automation-edit-button[data-v-4cfc5dc0],.automation-detail-edit[data-v-4cfc5dc0]):hover{background-color:var(--color-zinc-50,oklch(98.5% 0 none))}}.automation-detail-edit[data-v-4cfc5dc0]{margin-left:auto}.automation-detail[data-v-4cfc5dc0]{gap:calc(var(--spacing,.25rem) * 4);border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);min-height:0;padding:calc(var(--spacing,.25rem) * 4);flex-direction:column;display:flex;overflow-y:auto}.automation-detail-heading[data-v-4cfc5dc0]{align-items:center;gap:calc(var(--spacing,.25rem) * 3);min-width:0;display:flex}.automation-detail-title-wrap[data-v-4cfc5dc0]{gap:calc(var(--spacing,.25rem) * .5);flex-direction:column;min-width:0;display:flex}.automation-detail-title-wrap h2[data-v-4cfc5dc0]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600);color:var(--color-zinc-950,oklch(14.1% .005 285.823));margin:0;overflow:hidden}.automation-detail-title-wrap span[data-v-4cfc5dc0]{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);--tw-tracking:.14em;letter-spacing:.14em;color:var(--color-zinc-500,oklch(55.2% .016 285.938));text-transform:uppercase}.automation-detail-grid[data-v-4cfc5dc0]{gap:calc(var(--spacing,.25rem) * 2);grid-template-columns:repeat(1,minmax(0,1fr));display:grid}@media (min-width:40rem){.automation-detail-grid[data-v-4cfc5dc0]{grid-template-columns:repeat(2,minmax(0,1fr))}}.automation-detail-grid div[data-v-4cfc5dc0]{border-radius:var(--radius-lg,.5rem);background-color:var(--color-zinc-50,oklch(98.5% 0 none));min-width:0;padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2)}.automation-detail-grid dt[data-v-4cfc5dc0]{--tw-font-weight:var(--font-weight-medium,500);font-size:11px;font-weight:var(--font-weight-medium,500);--tw-tracking:.12em;letter-spacing:.12em;color:var(--color-zinc-500,oklch(55.2% .016 285.938));text-transform:uppercase}.automation-detail-grid dd[data-v-4cfc5dc0]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));color:var(--color-zinc-900,oklch(21% .006 285.885));margin:0;overflow:hidden}.automation-detail-prompt[data-v-4cfc5dc0]{gap:calc(var(--spacing,.25rem) * 2);flex-direction:column;min-height:0;display:flex}.automation-detail-prompt h3[data-v-4cfc5dc0]{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);--tw-tracking:.14em;letter-spacing:.14em;color:var(--color-zinc-500,oklch(55.2% .016 285.938));text-transform:uppercase;margin:0}.automation-detail-prompt p[data-v-4cfc5dc0]{border-radius:var(--radius-lg,.5rem);background-color:var(--color-zinc-50,oklch(98.5% 0 none));padding:calc(var(--spacing,.25rem) * 3);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-leading:calc(var(--spacing,.25rem) * 6);line-height:calc(var(--spacing,.25rem) * 6);white-space:pre-wrap;color:var(--color-zinc-800,oklch(27.4% .006 286.033));margin:0}.automations-empty[data-v-4cfc5dc0]{min-height:calc(var(--spacing,.25rem) * 72);width:100%;max-width:var(--container-xl,36rem);justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem) * 2);text-align:center;color:var(--color-zinc-500,oklch(55.2% .016 285.938));flex-direction:column;flex:1;margin-inline:auto;display:flex}.automations-empty-icon[data-v-4cfc5dc0]{height:calc(var(--spacing,.25rem) * 8);width:calc(var(--spacing,.25rem) * 8);color:var(--color-zinc-400,oklch(70.5% .015 286.067))}.automations-empty p[data-v-4cfc5dc0]{font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-800,oklch(27.4% .006 286.033));margin:0}.automations-empty span[data-v-4cfc5dc0]{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-leading{syntax:"*";inherits:false}
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-v-88d5cc3a],[data-v-88d5cc3a]:before,[data-v-88d5cc3a]:after,[data-v-88d5cc3a]::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-leading:initial}}}.automations-panel[data-v-88d5cc3a]{gap:calc(var(--spacing,.25rem) * 3);min-height:0;padding-inline:calc(var(--spacing,.25rem) * 2);padding-bottom:calc(var(--spacing,.25rem) * 3);flex-direction:column;flex:1;display:flex}@media (min-width:40rem){.automations-panel[data-v-88d5cc3a]{padding-inline:calc(var(--spacing,.25rem) * 6);padding-bottom:calc(var(--spacing,.25rem) * 6)}}.automations-toolbar[data-v-88d5cc3a]{justify-content:space-between;align-items:center;gap:calc(var(--spacing,.25rem) * 3);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));padding-bottom:calc(var(--spacing,.25rem) * 3);flex-shrink:0;display:flex}.automations-summary[data-v-88d5cc3a]{align-items:center;gap:calc(var(--spacing,.25rem) * 2);min-width:0;font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-500,oklch(55.2% .016 285.938));flex-wrap:wrap;display:flex}.automations-summary span[data-v-88d5cc3a]{background-color:var(--color-zinc-100,oklch(96.7% .001 286.375));padding-inline:calc(var(--spacing,.25rem) * 2);padding-block:var(--spacing,.25rem);border-radius:3.40282e38px}.automations-actions[data-v-88d5cc3a]{align-items:center;gap:calc(var(--spacing,.25rem) * 2);flex-shrink:0;display:flex}.automations-refresh[data-v-88d5cc3a],.automations-create[data-v-88d5cc3a]{height:calc(var(--spacing,.25rem) * 8);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);padding-inline:calc(var(--spacing,.25rem) * 3);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-700,oklch(37% .013 285.805));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));border-radius:3.40282e38px;flex-shrink:0}@media (hover:hover){:is(.automations-refresh[data-v-88d5cc3a],.automations-create[data-v-88d5cc3a]):hover{background-color:var(--color-zinc-50,oklch(98.5% 0 none))}}:is(.automations-refresh[data-v-88d5cc3a],.automations-create[data-v-88d5cc3a]):disabled{opacity:.6}.automations-error[data-v-88d5cc3a]{border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-rose-200,oklch(89.2% .058 10.001));background-color:var(--color-rose-50,oklch(96.9% .015 12.422));padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));color:var(--color-rose-700,oklch(51.4% .222 16.935));margin:0}.automations-layout[data-v-88d5cc3a]{gap:calc(var(--spacing,.25rem) * 3);flex:1;grid-template-columns:repeat(1,minmax(0,1fr));min-height:0;display:grid}@media (min-width:64rem){.automations-layout[data-v-88d5cc3a]{grid-template-columns:minmax(0,1fr) minmax(320px,420px)}}.automations-list[data-v-88d5cc3a]{border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);min-height:0;overflow-y:auto}.automation-row[data-v-88d5cc3a]{align-items:center;gap:calc(var(--spacing,.25rem) * 3);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-zinc-100,oklch(96.7% .001 286.375));width:100%;padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 3);text-align:left;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));grid-template-columns:auto minmax(0,1fr) auto auto;display:grid}.automation-row[data-v-88d5cc3a]:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.automation-row[data-v-88d5cc3a]:hover{background-color:var(--color-zinc-50,oklch(98.5% 0 none))}}.automation-row.is-selected[data-v-88d5cc3a]{background-color:var(--color-zinc-100,oklch(96.7% .001 286.375))}.automation-row-icon[data-v-88d5cc3a],.automation-detail-icon[data-v-88d5cc3a]{height:calc(var(--spacing,.25rem) * 8);width:calc(var(--spacing,.25rem) * 8);background-color:var(--color-emerald-100,oklch(95% .052 163.051));color:var(--color-emerald-700,oklch(50.8% .118 165.612));border-radius:3.40282e38px;flex-shrink:0;justify-content:center;align-items:center;display:flex}.automation-row-icon[data-status=PAUSED][data-v-88d5cc3a],.automation-detail-icon[data-status=PAUSED][data-v-88d5cc3a]{background-color:var(--color-zinc-100,oklch(96.7% .001 286.375));color:var(--color-zinc-500,oklch(55.2% .016 285.938))}:is(.automation-row-icon[data-v-88d5cc3a] svg,.automation-detail-icon[data-v-88d5cc3a] svg){height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4)}.automation-row-main[data-v-88d5cc3a]{gap:calc(var(--spacing,.25rem) * .5);flex-direction:column;min-width:0;display:flex}.automation-row-title[data-v-88d5cc3a]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-950,oklch(14.1% .005 285.823));overflow:hidden}.automation-row-meta[data-v-88d5cc3a]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-zinc-500,oklch(55.2% .016 285.938));overflow:hidden}.automation-row-side[data-v-88d5cc3a]{min-width:calc(var(--spacing,.25rem) * 24);align-items:flex-end;gap:calc(var(--spacing,.25rem) * .5);text-align:right;flex-direction:column;display:flex}.automation-row-status[data-v-88d5cc3a]{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-emerald-700,oklch(50.8% .118 165.612))}.automation-row-status[data-status=PAUSED][data-v-88d5cc3a]{color:var(--color-zinc-500,oklch(55.2% .016 285.938))}.automation-row-schedule[data-v-88d5cc3a]{max-width:calc(var(--spacing,.25rem) * 36);text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-zinc-500,oklch(55.2% .016 285.938));overflow:hidden}.automation-edit-button[data-v-88d5cc3a],.automation-detail-edit[data-v-88d5cc3a]{height:calc(var(--spacing,.25rem) * 7);border-radius:var(--radius-md,.375rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);padding-inline:calc(var(--spacing,.25rem) * 2);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-700,oklch(37% .013 285.805));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));flex-shrink:0}@media (hover:hover){:is(.automation-edit-button[data-v-88d5cc3a],.automation-detail-edit[data-v-88d5cc3a]):hover{background-color:var(--color-zinc-50,oklch(98.5% 0 none))}}.automation-detail-edit[data-v-88d5cc3a]{margin-left:auto}.automation-detail[data-v-88d5cc3a]{gap:calc(var(--spacing,.25rem) * 4);border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-200,oklch(92% .004 286.32));background-color:var(--color-white,#fff);min-height:0;padding:calc(var(--spacing,.25rem) * 4);flex-direction:column;display:flex;overflow-y:auto}.automation-detail-heading[data-v-88d5cc3a]{align-items:center;gap:calc(var(--spacing,.25rem) * 3);min-width:0;display:flex}.automation-detail-title-wrap[data-v-88d5cc3a]{gap:calc(var(--spacing,.25rem) * .5);flex-direction:column;min-width:0;display:flex}.automation-detail-title-wrap h2[data-v-88d5cc3a]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600);color:var(--color-zinc-950,oklch(14.1% .005 285.823));margin:0;overflow:hidden}.automation-detail-title-wrap span[data-v-88d5cc3a]{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);--tw-tracking:.14em;letter-spacing:.14em;color:var(--color-zinc-500,oklch(55.2% .016 285.938));text-transform:uppercase}.automation-detail-grid[data-v-88d5cc3a]{gap:calc(var(--spacing,.25rem) * 2);grid-template-columns:repeat(1,minmax(0,1fr));display:grid}@media (min-width:40rem){.automation-detail-grid[data-v-88d5cc3a]{grid-template-columns:repeat(2,minmax(0,1fr))}}.automation-detail-grid div[data-v-88d5cc3a]{border-radius:var(--radius-lg,.5rem);background-color:var(--color-zinc-50,oklch(98.5% 0 none));min-width:0;padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2)}.automation-detail-grid dt[data-v-88d5cc3a]{--tw-font-weight:var(--font-weight-medium,500);font-size:11px;font-weight:var(--font-weight-medium,500);--tw-tracking:.12em;letter-spacing:.12em;color:var(--color-zinc-500,oklch(55.2% .016 285.938));text-transform:uppercase}.automation-detail-grid dd[data-v-88d5cc3a]{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));color:var(--color-zinc-900,oklch(21% .006 285.885));margin:0;overflow:hidden}.automation-detail-prompt[data-v-88d5cc3a]{gap:calc(var(--spacing,.25rem) * 2);flex-direction:column;min-height:0;display:flex}.automation-detail-prompt h3[data-v-88d5cc3a]{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);--tw-tracking:.14em;letter-spacing:.14em;color:var(--color-zinc-500,oklch(55.2% .016 285.938));text-transform:uppercase;margin:0}.automation-detail-prompt p[data-v-88d5cc3a]{border-radius:var(--radius-lg,.5rem);background-color:var(--color-zinc-50,oklch(98.5% 0 none));padding:calc(var(--spacing,.25rem) * 3);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-leading:calc(var(--spacing,.25rem) * 6);line-height:calc(var(--spacing,.25rem) * 6);white-space:pre-wrap;color:var(--color-zinc-800,oklch(27.4% .006 286.033));margin:0}.automations-empty[data-v-88d5cc3a]{min-height:calc(var(--spacing,.25rem) * 72);width:100%;max-width:var(--container-xl,36rem);justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem) * 2);text-align:center;color:var(--color-zinc-500,oklch(55.2% .016 285.938));flex-direction:column;flex:1;margin-inline:auto;display:flex}.automations-empty-icon[data-v-88d5cc3a]{height:calc(var(--spacing,.25rem) * 8);width:calc(var(--spacing,.25rem) * 8);color:var(--color-zinc-400,oklch(70.5% .015 286.067))}.automations-empty p[data-v-88d5cc3a]{font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-zinc-800,oklch(27.4% .006 286.033));margin:0}.automations-empty span[data-v-88d5cc3a]{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-leading{syntax:"*";inherits:false}
@@ -1 +1 @@
1
- import{d as X,q as f,l as w,N as Z,at as tt,au as at,o as r,a as v,b as e,t as n,u as i,e as B,g as U,av as A,F as et,r as ot,$ as x,w as I,n as st,c as L,aw as F,j as nt,k as _,_ as ut}from"./index-BALsV_-J.js";const it={class:"automations-panel"},lt={class:"automations-toolbar"},ct={class:"automations-summary"},rt={class:"automations-actions"},dt=["title"],mt=["disabled"],pt={key:0,class:"automations-error"},vt={key:1,class:"automations-empty"},ht={key:2,class:"automations-empty"},ft={key:3,class:"automations-layout"},_t=["aria-label"],yt=["onClick","onKeydown"],bt=["data-status"],gt={class:"automation-row-main"},At={class:"automation-row-title"},Lt={class:"automation-row-meta"},Et={class:"automation-row-side"},kt=["data-status"],Ct={class:"automation-row-schedule"},wt=["onClick"],It=["aria-label"],jt={class:"automation-detail-heading"},Rt=["data-status"],$t={class:"automation-detail-title-wrap"},Nt={class:"automation-detail-grid"},Tt=["title"],Kt={class:"automation-detail-prompt"},Mt=X({__name:"AutomationsPanel",props:{groups:{},projectCwdByName:{},projectDisplayNameById:{},selectedAutomationId:{}},emits:["select-automation","edit-automation","create-automation"],setup(V,{expose:Q,emit:Y}){const h=V,E=Y,j=f({}),R=f({}),{t:s}=nt(),y=f(!1),b=f(""),d=f(h.selectedAutomationId??""),p=f(""),z=_(()=>{const t=new Map;for(const a of h.groups)for(const o of a.threads)t.set(o.id,o.title);return t}),H=_(()=>{var a,o;const t=new Map;for(const l of h.groups){const u=(a=h.projectCwdByName[l.projectName])==null?void 0:a.trim(),g=((o=h.projectDisplayNameById[l.projectName])==null?void 0:o.trim())||l.projectName;u&&t.set(u,g)}return t}),m=_(()=>{const t=[];for(const[a,o]of Object.entries(j.value)){const l=z.value.get(a)??a;for(const u of o)t.push({rowKey:K("thread",a,u.id),automation:u,scope:"thread",scopeLabel:s("Heartbeat"),targetLabel:l,targetTitle:a,scheduleLabel:M(u)})}for(const[a,o]of Object.entries(R.value)){const l=H.value.get(a)??J(a);for(const u of o)t.push({rowKey:K("project",a,u.id),automation:u,scope:"project",scopeLabel:s("Project"),targetLabel:l,targetTitle:a,scheduleLabel:M(u)})}return t.sort((a,o)=>{const l=a.automation.status==="ACTIVE"?0:1,u=o.automation.status==="ACTIVE"?0:1;if(l!==u)return l-u;const g=a.automation.createdAtMs??0,P=o.automation.createdAtMs??0;if(g!==P)return P-g;const D=a.automation.updatedAtMs??0,S=o.automation.updatedAtMs??0;return D!==S?S-D:a.automation.name.localeCompare(o.automation.name)})}),O=_(()=>m.value.filter(t=>t.automation.status==="ACTIVE").length),W=_(()=>m.value.filter(t=>t.automation.status==="PAUSED").length),c=_(()=>m.value.find(t=>t.rowKey===p.value)??m.value.find(t=>t.automation.id===d.value)??m.value[0]??null);w(()=>h.selectedAutomationId,t=>{t&&(d.value=t,p.value=T(t))}),w(d,t=>{t&&E("select-automation",t)}),w(m,t=>{if(t.length===0){d.value="",p.value="";return}if(!(p.value&&t.some(a=>a.rowKey===p.value))){if(d.value&&t.some(a=>a.automation.id===d.value)){p.value=T(d.value);return}(!d.value||!t.some(a=>a.automation.id===d.value))&&(d.value=t[0].automation.id,p.value=t[0].rowKey)}}),Z(()=>{k()}),Q({loadAutomations:k});async function k(){y.value=!0,b.value="";try{const[t,a]=await Promise.all([tt(),at()]);j.value=t,R.value=a}catch(t){b.value=t instanceof Error?t.message:s("Failed to load automations")}finally{y.value=!1}}function $(t){return s(t==="PAUSED"?"Paused":"Active")}function N(t){E("edit-automation",{scope:t.scope,target:t.targetTitle,automation:t.automation})}function q(){E("create-automation")}function C(t){p.value=t.rowKey,d.value=t.automation.id}function T(t){var a;return((a=m.value.find(o=>o.automation.id===t))==null?void 0:a.rowKey)??""}function K(t,a,o){return`${t}:${a}:${o}`}function M(t){var o,l;if(t.status==="PAUSED")return s("Paused");if(t.nextRunAtMs)return`${s("Next")} ${G(t.nextRunAtMs)}`;const a=t.rrule.trim();if(/FREQ=MINUTELY/i.test(a)){const u=((o=/INTERVAL=(\d+)/i.exec(a))==null?void 0:o[1])??"1";return u==="1"?s("Every minute"):`${s("Every")} ${u} ${s("minutes")}`}if(/FREQ=HOURLY/i.test(a)){const u=((l=/INTERVAL=(\d+)/i.exec(a))==null?void 0:l[1])??"1";return u==="1"?s("Hourly"):`${s("Every")} ${u} ${s("hours")}`}return/FREQ=DAILY/i.test(a)?s("Daily"):/FREQ=WEEKLY/i.test(a)?s("Weekly"):s("Custom schedule")}function G(t){return new Date(t).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function J(t){return t.replace(/\/+$/,"").split("/").filter(Boolean).pop()??t}return(t,a)=>(r(),v("div",it,[e("div",lt,[e("div",ct,[e("span",null,n(m.value.length)+" "+n(i(s)("total")),1),e("span",null,n(O.value)+" "+n(i(s)("active")),1),e("span",null,n(W.value)+" "+n(i(s)("paused")),1)]),e("div",rt,[e("button",{class:"automations-create",type:"button",title:i(s)("Create a new automation"),onClick:q},n(i(s)("New automation")),9,dt),e("button",{class:"automations-refresh",type:"button",disabled:y.value,onClick:k},n(y.value?i(s)("Refreshing..."):i(s)("Refresh")),9,mt)])]),b.value?(r(),v("p",pt,n(b.value),1)):B("",!0),y.value&&m.value.length===0?(r(),v("div",vt,[U(A,{class:"automations-empty-icon"}),e("p",null,n(i(s)("Loading automations...")),1)])):m.value.length===0?(r(),v("div",ht,[U(A,{class:"automations-empty-icon"}),e("p",null,n(i(s)("No automations yet")),1),e("span",null,n(i(s)("Use a thread or project menu to add an automation.")),1)])):(r(),v("div",ft,[e("section",{class:"automations-list","aria-label":i(s)("Automations")},[(r(!0),v(et,null,ot(m.value,o=>(r(),v("div",{key:o.rowKey,class:st(["automation-row",{"is-selected":p.value===o.rowKey}]),role:"button",tabindex:"0",onClick:l=>C(o),onKeydown:[x(I(l=>C(o),["prevent"]),["enter"]),x(I(l=>C(o),["prevent"]),["space"])]},[e("span",{class:"automation-row-icon","data-status":o.automation.status},[o.automation.status==="PAUSED"?(r(),L(F,{key:0})):(r(),L(A,{key:1}))],8,bt),e("span",gt,[e("span",At,n(o.automation.name),1),e("span",Lt,n(o.scopeLabel)+" • "+n(o.targetLabel),1)]),e("span",Et,[e("span",{class:"automation-row-status","data-status":o.automation.status},n($(o.automation.status)),9,kt),e("span",Ct,n(o.scheduleLabel),1)]),e("button",{class:"automation-edit-button",type:"button",onClick:I(l=>N(o),["stop"])},n(i(s)("Edit")),9,wt)],42,yt))),128))],8,_t),c.value?(r(),v("aside",{key:0,class:"automation-detail","aria-label":i(s)("Automation details")},[e("div",jt,[e("span",{class:"automation-detail-icon","data-status":c.value.automation.status},[c.value.automation.status==="PAUSED"?(r(),L(F,{key:0})):(r(),L(A,{key:1}))],8,Rt),e("div",$t,[e("h2",null,n(c.value.automation.name),1),e("span",null,n(c.value.scopeLabel),1)]),e("button",{class:"automation-detail-edit",type:"button",onClick:a[0]||(a[0]=o=>N(c.value))},n(i(s)("Edit")),1)]),e("dl",Nt,[e("div",null,[e("dt",null,n(i(s)("Status")),1),e("dd",null,n($(c.value.automation.status)),1)]),e("div",null,[e("dt",null,n(i(s)("Schedule")),1),e("dd",null,n(c.value.scheduleLabel),1)]),e("div",null,[e("dt",null,n(i(s)("Target")),1),e("dd",{title:c.value.targetTitle},n(c.value.targetLabel),9,Tt)]),e("div",null,[a[1]||(a[1]=e("dt",null,"ID",-1)),e("dd",null,n(c.value.automation.id),1)])]),e("section",Kt,[e("h3",null,n(i(s)("Prompt")),1),e("p",null,n(c.value.automation.prompt),1)])],8,It)):B("",!0)]))]))}}),Dt=ut(Mt,[["__scopeId","data-v-4cfc5dc0"]]);export{Dt as default};
1
+ import{d as X,q as f,l as w,N as Z,at as tt,au as at,o as r,a as v,b as e,t as n,u as i,e as B,g as U,av as A,F as et,r as ot,$ as x,w as I,n as st,c as L,aw as F,j as nt,k as _,_ as ut}from"./index-DDchNpQh.js";const it={class:"automations-panel"},lt={class:"automations-toolbar"},ct={class:"automations-summary"},rt={class:"automations-actions"},dt=["title"],mt=["disabled"],pt={key:0,class:"automations-error"},vt={key:1,class:"automations-empty"},ht={key:2,class:"automations-empty"},ft={key:3,class:"automations-layout"},_t=["aria-label"],yt=["onClick","onKeydown"],bt=["data-status"],gt={class:"automation-row-main"},At={class:"automation-row-title"},Lt={class:"automation-row-meta"},Et={class:"automation-row-side"},kt=["data-status"],Ct={class:"automation-row-schedule"},wt=["onClick"],It=["aria-label"],jt={class:"automation-detail-heading"},Rt=["data-status"],$t={class:"automation-detail-title-wrap"},Nt={class:"automation-detail-grid"},Tt=["title"],Kt={class:"automation-detail-prompt"},Mt=X({__name:"AutomationsPanel",props:{groups:{},projectCwdByName:{},projectDisplayNameById:{},selectedAutomationId:{}},emits:["select-automation","edit-automation","create-automation"],setup(V,{expose:Q,emit:Y}){const h=V,E=Y,j=f({}),R=f({}),{t:s}=nt(),y=f(!1),b=f(""),d=f(h.selectedAutomationId??""),p=f(""),z=_(()=>{const t=new Map;for(const a of h.groups)for(const o of a.threads)t.set(o.id,o.title);return t}),H=_(()=>{var a,o;const t=new Map;for(const l of h.groups){const u=(a=h.projectCwdByName[l.projectName])==null?void 0:a.trim(),g=((o=h.projectDisplayNameById[l.projectName])==null?void 0:o.trim())||l.projectName;u&&t.set(u,g)}return t}),m=_(()=>{const t=[];for(const[a,o]of Object.entries(j.value)){const l=z.value.get(a)??a;for(const u of o)t.push({rowKey:K("thread",a,u.id),automation:u,scope:"thread",scopeLabel:s("Heartbeat"),targetLabel:l,targetTitle:a,scheduleLabel:M(u)})}for(const[a,o]of Object.entries(R.value)){const l=H.value.get(a)??J(a);for(const u of o)t.push({rowKey:K("project",a,u.id),automation:u,scope:"project",scopeLabel:s("Project"),targetLabel:l,targetTitle:a,scheduleLabel:M(u)})}return t.sort((a,o)=>{const l=a.automation.status==="ACTIVE"?0:1,u=o.automation.status==="ACTIVE"?0:1;if(l!==u)return l-u;const g=a.automation.createdAtMs??0,P=o.automation.createdAtMs??0;if(g!==P)return P-g;const D=a.automation.updatedAtMs??0,S=o.automation.updatedAtMs??0;return D!==S?S-D:a.automation.name.localeCompare(o.automation.name)})}),O=_(()=>m.value.filter(t=>t.automation.status==="ACTIVE").length),W=_(()=>m.value.filter(t=>t.automation.status==="PAUSED").length),c=_(()=>m.value.find(t=>t.rowKey===p.value)??m.value.find(t=>t.automation.id===d.value)??m.value[0]??null);w(()=>h.selectedAutomationId,t=>{t&&(d.value=t,p.value=T(t))}),w(d,t=>{t&&E("select-automation",t)}),w(m,t=>{if(t.length===0){d.value="",p.value="";return}if(!(p.value&&t.some(a=>a.rowKey===p.value))){if(d.value&&t.some(a=>a.automation.id===d.value)){p.value=T(d.value);return}(!d.value||!t.some(a=>a.automation.id===d.value))&&(d.value=t[0].automation.id,p.value=t[0].rowKey)}}),Z(()=>{k()}),Q({loadAutomations:k});async function k(){y.value=!0,b.value="";try{const[t,a]=await Promise.all([tt(),at()]);j.value=t,R.value=a}catch(t){b.value=t instanceof Error?t.message:s("Failed to load automations")}finally{y.value=!1}}function $(t){return s(t==="PAUSED"?"Paused":"Active")}function N(t){E("edit-automation",{scope:t.scope,target:t.targetTitle,automation:t.automation})}function q(){E("create-automation")}function C(t){p.value=t.rowKey,d.value=t.automation.id}function T(t){var a;return((a=m.value.find(o=>o.automation.id===t))==null?void 0:a.rowKey)??""}function K(t,a,o){return`${t}:${a}:${o}`}function M(t){var o,l;if(t.status==="PAUSED")return s("Paused");if(t.nextRunAtMs)return`${s("Next")} ${G(t.nextRunAtMs)}`;const a=t.rrule.trim();if(/FREQ=MINUTELY/i.test(a)){const u=((o=/INTERVAL=(\d+)/i.exec(a))==null?void 0:o[1])??"1";return u==="1"?s("Every minute"):`${s("Every")} ${u} ${s("minutes")}`}if(/FREQ=HOURLY/i.test(a)){const u=((l=/INTERVAL=(\d+)/i.exec(a))==null?void 0:l[1])??"1";return u==="1"?s("Hourly"):`${s("Every")} ${u} ${s("hours")}`}return/FREQ=DAILY/i.test(a)?s("Daily"):/FREQ=WEEKLY/i.test(a)?s("Weekly"):s("Custom schedule")}function G(t){return new Date(t).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function J(t){return t.replace(/\/+$/,"").split("/").filter(Boolean).pop()??t}return(t,a)=>(r(),v("div",it,[e("div",lt,[e("div",ct,[e("span",null,n(m.value.length)+" "+n(i(s)("total")),1),e("span",null,n(O.value)+" "+n(i(s)("active")),1),e("span",null,n(W.value)+" "+n(i(s)("paused")),1)]),e("div",rt,[e("button",{class:"automations-create",type:"button",title:i(s)("Create a new automation"),onClick:q},n(i(s)("New automation")),9,dt),e("button",{class:"automations-refresh",type:"button",disabled:y.value,onClick:k},n(y.value?i(s)("Refreshing..."):i(s)("Refresh")),9,mt)])]),b.value?(r(),v("p",pt,n(b.value),1)):B("",!0),y.value&&m.value.length===0?(r(),v("div",vt,[U(A,{class:"automations-empty-icon"}),e("p",null,n(i(s)("Loading automations...")),1)])):m.value.length===0?(r(),v("div",ht,[U(A,{class:"automations-empty-icon"}),e("p",null,n(i(s)("No automations yet")),1),e("span",null,n(i(s)("Use a thread or project menu to add an automation.")),1)])):(r(),v("div",ft,[e("section",{class:"automations-list","aria-label":i(s)("Automations")},[(r(!0),v(et,null,ot(m.value,o=>(r(),v("div",{key:o.rowKey,class:st(["automation-row",{"is-selected":p.value===o.rowKey}]),role:"button",tabindex:"0",onClick:l=>C(o),onKeydown:[x(I(l=>C(o),["prevent"]),["enter"]),x(I(l=>C(o),["prevent"]),["space"])]},[e("span",{class:"automation-row-icon","data-status":o.automation.status},[o.automation.status==="PAUSED"?(r(),L(F,{key:0})):(r(),L(A,{key:1}))],8,bt),e("span",gt,[e("span",At,n(o.automation.name),1),e("span",Lt,n(o.scopeLabel)+" • "+n(o.targetLabel),1)]),e("span",Et,[e("span",{class:"automation-row-status","data-status":o.automation.status},n($(o.automation.status)),9,kt),e("span",Ct,n(o.scheduleLabel),1)]),e("button",{class:"automation-edit-button",type:"button",onClick:I(l=>N(o),["stop"])},n(i(s)("Edit")),9,wt)],42,yt))),128))],8,_t),c.value?(r(),v("aside",{key:0,class:"automation-detail","aria-label":i(s)("Automation details")},[e("div",jt,[e("span",{class:"automation-detail-icon","data-status":c.value.automation.status},[c.value.automation.status==="PAUSED"?(r(),L(F,{key:0})):(r(),L(A,{key:1}))],8,Rt),e("div",$t,[e("h2",null,n(c.value.automation.name),1),e("span",null,n(c.value.scopeLabel),1)]),e("button",{class:"automation-detail-edit",type:"button",onClick:a[0]||(a[0]=o=>N(c.value))},n(i(s)("Edit")),1)]),e("dl",Nt,[e("div",null,[e("dt",null,n(i(s)("Status")),1),e("dd",null,n($(c.value.automation.status)),1)]),e("div",null,[e("dt",null,n(i(s)("Schedule")),1),e("dd",null,n(c.value.scheduleLabel),1)]),e("div",null,[e("dt",null,n(i(s)("Target")),1),e("dd",{title:c.value.targetTitle},n(c.value.targetLabel),9,Tt)]),e("div",null,[a[1]||(a[1]=e("dt",null,"ID",-1)),e("dd",null,n(c.value.automation.id),1)])]),e("section",Kt,[e("h3",null,n(i(s)("Prompt")),1),e("p",null,n(c.value.automation.prompt),1)])],8,It)):B("",!0)]))]))}}),Dt=ut(Mt,[["__scopeId","data-v-88d5cc3a"]]);export{Dt as default};