codex-mobile-re 0.1.127 → 0.1.129

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 (42) hide show
  1. package/LICENSE +11 -11
  2. package/README.md +214 -214
  3. package/dist/assets/{AutomationsPanel-MrvbWVMR.js → AutomationsPanel-DNsTBfFe.js} +1 -1
  4. package/dist/assets/{AutomationsPanel-B7eVtPih.css → AutomationsPanel-Dz1E0PMi.css} +1 -1
  5. package/dist/assets/{DirectoryHub-CP5GVedy.css → DirectoryHub-DcMzIMOW.css} +1 -1
  6. package/dist/assets/{DirectoryHub-ky-MNTyn.js → DirectoryHub-DjzGaPq6.js} +2 -2
  7. package/dist/assets/{QueuedMessages-CYYFZ0w1.css → QueuedMessages-D6bvkQIC.css} +1 -1
  8. package/dist/assets/{QueuedMessages-D1zNlWJ3.js → QueuedMessages-DNVDZvsM.js} +1 -1
  9. package/dist/assets/{ReviewPane-76bdhZJV.css → ReviewPane-BFBDQWlW.css} +1 -1
  10. package/dist/assets/{ReviewPane-Dgmjqhm5.js → ReviewPane-DLogJNGk.js} +1 -1
  11. package/dist/assets/{RightFilePreview-CYPdkP5X.js → RightFilePreview-DIz4AIh6.js} +1 -1
  12. package/dist/assets/{RightFilePreview-JKcCwln_.css → RightFilePreview-DNZDBkBr.css} +1 -1
  13. package/dist/assets/{RightFilesPanel-DZUnVVyu.js → RightFilesPanel-C7leH782.js} +1 -1
  14. package/dist/assets/{RightFilesPanel-BQYjjDQ4.css → RightFilesPanel-ev__hRb5.css} +1 -1
  15. package/dist/assets/{RightGitPanel-Blhf_dam.js → RightGitPanel-BaFysyCQ.js} +2 -2
  16. package/dist/assets/{RightGitPanel-Dxufp9aB.css → RightGitPanel-CQgG9pXB.css} +1 -1
  17. package/dist/assets/{SettingsDialog-BGT0xELN.js → SettingsDialog-BRMjc7tX.js} +3 -3
  18. package/dist/assets/{SettingsDialog-DKsOfSTw.css → SettingsDialog-C6mYdSFF.css} +1 -1
  19. package/dist/assets/ThreadConversation-BB19p4J3.js +39 -0
  20. package/dist/assets/{ThreadConversation-Dpnahm_f.css → ThreadConversation-BEc1XQXz.css} +1 -1
  21. package/dist/assets/{ThreadPendingRequestPanel-DKioGHoo.css → ThreadPendingRequestPanel-BlBoJVzv.css} +1 -1
  22. package/dist/assets/{ThreadPendingRequestPanel-CiFTnhF6.js → ThreadPendingRequestPanel-rVtQUq_G.js} +1 -1
  23. package/dist/assets/{ThreadTerminalPanel-D13KPZ88.js → ThreadTerminalPanel-BPYLKihX.js} +2 -2
  24. package/dist/assets/{ThreadTerminalPanel-O0PkQIRl.css → ThreadTerminalPanel-DkX7vTl_.css} +1 -1
  25. package/dist/assets/common-DEPjExR-.js +5 -0
  26. package/dist/assets/{index-C2Pxi7u9.css → index-DI_rCYF6.css} +1 -1
  27. package/dist/assets/index-rc4ZsEIH.js +83 -0
  28. package/dist/assets/{index.esm-Cls06s1L.js → index.esm-Cxn_LBGD.js} +1 -1
  29. package/dist/icons/codexui-icon.svg +52 -52
  30. package/dist/icons/pwa-icon.svg +38 -38
  31. package/dist/icons/pwa-maskable.svg +36 -36
  32. package/dist/index.html +45 -45
  33. package/dist/manifest.webmanifest +36 -36
  34. package/dist/sw.js +92 -92
  35. package/dist-cli/index.js +3441 -2889
  36. package/dist-cli/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/scripts/dev-random-home.cjs +21 -21
  39. package/scripts/dev.cjs +69 -69
  40. package/dist/assets/ThreadConversation-9sr4DxKg.js +0 -39
  41. package/dist/assets/common-BeuopZEI.js +0 -5
  42. package/dist/assets/index-CkZzIAPA.js +0 -84
@@ -1,4 +1,4 @@
1
- import{r as e}from"./index.esm-Bx2Y2PLG.js";import{F as o,S as t,D as n,_,a as v,b as m,c as A,d as g,e as S,f as d,g as b,h as l,i as F,j as c,k as E,l as f,m as C,n as L,o as D,p as N,q as O,s as x}from"./index.esm-Bx2Y2PLG.js";var s="firebase",a="12.17.1";/**
1
+ import{r as e}from"./index.esm-Bx2Y2PLG.js";import{F as o,S as t,D as n,_,a as v,b as m,c as A,d as g,e as S,f as d,g as b,h as l,i as F,j as c,k as E,l as f,m as C,n as L,o as D,p as N,q as O,s as x}from"./index.esm-Bx2Y2PLG.js";var s="firebase",a="12.17.0";/**
2
2
  * @license
3
3
  * Copyright 2020 Google LLC
4
4
  *
@@ -1,52 +1,52 @@
1
- <svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <defs>
3
- <linearGradient id="cloud" x1="256" y1="80" x2="256" y2="438" gradientUnits="userSpaceOnUse">
4
- <stop offset="0" stop-color="#9BE7D1" />
5
- <stop offset="0.46" stop-color="#53CDB0" />
6
- <stop offset="1" stop-color="#11856E" />
7
- </linearGradient>
8
- <radialGradient id="sheen" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(226 150) rotate(58.2) scale(208 200)">
9
- <stop offset="0" stop-color="#E8FFF8" stop-opacity="0.85" />
10
- <stop offset="0.52" stop-color="#D7FFF4" stop-opacity="0.22" />
11
- <stop offset="1" stop-color="#D7FFF4" stop-opacity="0" />
12
- </radialGradient>
13
- <filter id="cardShadow" x="-24" y="-24" width="560" height="560" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
14
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
15
- <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
16
- <feOffset dy="12" />
17
- <feGaussianBlur stdDeviation="16" />
18
- <feColorMatrix type="matrix" values="0 0 0 0 0.0470588 0 0 0 0 0.105882 0 0 0 0 0.0980392 0 0 0 0.18 0" />
19
- <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_1" />
20
- <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_1" result="shape" />
21
- </filter>
22
- <filter id="cloudShadow" x="40" y="48" width="432" height="428" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
23
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
24
- <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
25
- <feOffset dy="10" />
26
- <feGaussianBlur stdDeviation="12" />
27
- <feColorMatrix type="matrix" values="0 0 0 0 0.054902 0 0 0 0 0.196078 0 0 0 0 0.164706 0 0 0 0.22 0" />
28
- <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_1" />
29
- <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_1" result="shape" />
30
- </filter>
31
- </defs>
32
-
33
- <g transform="translate(44 44) scale(0.828125)">
34
- <g filter="url(#cardShadow)">
35
- <rect x="8" y="8" width="496" height="496" rx="104" fill="#FCFEFD" />
36
- </g>
37
-
38
- <g filter="url(#cloudShadow)">
39
- <circle cx="256" cy="160" r="104" fill="url(#cloud)" />
40
- <circle cx="330" cy="186" r="94" fill="url(#cloud)" />
41
- <circle cx="178" cy="232" r="114" fill="url(#cloud)" />
42
- <circle cx="352" cy="280" r="96" fill="url(#cloud)" />
43
- <circle cx="186" cy="320" r="104" fill="url(#cloud)" />
44
- <circle cx="282" cy="354" r="96" fill="url(#cloud)" />
45
- <circle cx="256" cy="252" r="118" fill="url(#cloud)" />
46
- <circle cx="256" cy="252" r="118" fill="url(#sheen)" />
47
- </g>
48
-
49
- <path d="M169 203L210 272L169 338" stroke="white" stroke-width="28" stroke-linecap="round" stroke-linejoin="round" />
50
- <path d="M268 309H348" stroke="white" stroke-width="28" stroke-linecap="round" />
51
- </g>
52
- </svg>
1
+ <svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <linearGradient id="cloud" x1="256" y1="80" x2="256" y2="438" gradientUnits="userSpaceOnUse">
4
+ <stop offset="0" stop-color="#9BE7D1" />
5
+ <stop offset="0.46" stop-color="#53CDB0" />
6
+ <stop offset="1" stop-color="#11856E" />
7
+ </linearGradient>
8
+ <radialGradient id="sheen" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(226 150) rotate(58.2) scale(208 200)">
9
+ <stop offset="0" stop-color="#E8FFF8" stop-opacity="0.85" />
10
+ <stop offset="0.52" stop-color="#D7FFF4" stop-opacity="0.22" />
11
+ <stop offset="1" stop-color="#D7FFF4" stop-opacity="0" />
12
+ </radialGradient>
13
+ <filter id="cardShadow" x="-24" y="-24" width="560" height="560" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
14
+ <feFlood flood-opacity="0" result="BackgroundImageFix" />
15
+ <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
16
+ <feOffset dy="12" />
17
+ <feGaussianBlur stdDeviation="16" />
18
+ <feColorMatrix type="matrix" values="0 0 0 0 0.0470588 0 0 0 0 0.105882 0 0 0 0 0.0980392 0 0 0 0.18 0" />
19
+ <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_1" />
20
+ <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_1" result="shape" />
21
+ </filter>
22
+ <filter id="cloudShadow" x="40" y="48" width="432" height="428" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
23
+ <feFlood flood-opacity="0" result="BackgroundImageFix" />
24
+ <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
25
+ <feOffset dy="10" />
26
+ <feGaussianBlur stdDeviation="12" />
27
+ <feColorMatrix type="matrix" values="0 0 0 0 0.054902 0 0 0 0 0.196078 0 0 0 0 0.164706 0 0 0 0.22 0" />
28
+ <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_1" />
29
+ <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_1" result="shape" />
30
+ </filter>
31
+ </defs>
32
+
33
+ <g transform="translate(44 44) scale(0.828125)">
34
+ <g filter="url(#cardShadow)">
35
+ <rect x="8" y="8" width="496" height="496" rx="104" fill="#FCFEFD" />
36
+ </g>
37
+
38
+ <g filter="url(#cloudShadow)">
39
+ <circle cx="256" cy="160" r="104" fill="url(#cloud)" />
40
+ <circle cx="330" cy="186" r="94" fill="url(#cloud)" />
41
+ <circle cx="178" cy="232" r="114" fill="url(#cloud)" />
42
+ <circle cx="352" cy="280" r="96" fill="url(#cloud)" />
43
+ <circle cx="186" cy="320" r="104" fill="url(#cloud)" />
44
+ <circle cx="282" cy="354" r="96" fill="url(#cloud)" />
45
+ <circle cx="256" cy="252" r="118" fill="url(#cloud)" />
46
+ <circle cx="256" cy="252" r="118" fill="url(#sheen)" />
47
+ </g>
48
+
49
+ <path d="M169 203L210 272L169 338" stroke="white" stroke-width="28" stroke-linecap="round" stroke-linejoin="round" />
50
+ <path d="M268 309H348" stroke="white" stroke-width="28" stroke-linecap="round" />
51
+ </g>
52
+ </svg>
@@ -1,38 +1,38 @@
1
- <svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <defs>
3
- <linearGradient id="background" x1="74" y1="44" x2="444" y2="470" gradientUnits="userSpaceOnUse">
4
- <stop offset="0" stop-color="#F7FBFD" />
5
- <stop offset="1" stop-color="#E7EEF5" />
6
- </linearGradient>
7
- <linearGradient id="cloud" x1="256" y1="96" x2="256" y2="424" gradientUnits="userSpaceOnUse">
8
- <stop offset="0" stop-color="#A9EFDB" />
9
- <stop offset="0.48" stop-color="#58D2B3" />
10
- <stop offset="1" stop-color="#12866F" />
11
- </linearGradient>
12
- <radialGradient id="sheen" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(226 156) rotate(57.6) scale(210 202)">
13
- <stop offset="0" stop-color="#F2FFFB" stop-opacity="0.82" />
14
- <stop offset="0.56" stop-color="#E6FFF8" stop-opacity="0.22" />
15
- <stop offset="1" stop-color="#E6FFF8" stop-opacity="0" />
16
- </radialGradient>
17
- </defs>
18
-
19
- <rect width="512" height="512" fill="url(#background)" />
20
- <g>
21
- <rect x="50" y="50" width="412" height="412" rx="116" fill="url(#background)" />
22
- <rect x="51.5" y="51.5" width="409" height="409" rx="114.5" stroke="#D7E2EB" stroke-width="3" />
23
- </g>
24
-
25
- <g>
26
- <circle cx="256" cy="174" r="104" fill="url(#cloud)" />
27
- <circle cx="334" cy="204" r="96" fill="url(#cloud)" />
28
- <circle cx="176" cy="248" r="118" fill="url(#cloud)" />
29
- <circle cx="356" cy="294" r="98" fill="url(#cloud)" />
30
- <circle cx="188" cy="336" r="106" fill="url(#cloud)" />
31
- <circle cx="286" cy="360" r="98" fill="url(#cloud)" />
32
- <circle cx="262" cy="262" r="122" fill="url(#cloud)" />
33
- <circle cx="262" cy="262" r="122" fill="url(#sheen)" />
34
- </g>
35
-
36
- <path d="M170 214L214 286L170 352" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" stroke-linejoin="round" />
37
- <path d="M274 318H354" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" />
38
- </svg>
1
+ <svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <linearGradient id="background" x1="74" y1="44" x2="444" y2="470" gradientUnits="userSpaceOnUse">
4
+ <stop offset="0" stop-color="#F7FBFD" />
5
+ <stop offset="1" stop-color="#E7EEF5" />
6
+ </linearGradient>
7
+ <linearGradient id="cloud" x1="256" y1="96" x2="256" y2="424" gradientUnits="userSpaceOnUse">
8
+ <stop offset="0" stop-color="#A9EFDB" />
9
+ <stop offset="0.48" stop-color="#58D2B3" />
10
+ <stop offset="1" stop-color="#12866F" />
11
+ </linearGradient>
12
+ <radialGradient id="sheen" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(226 156) rotate(57.6) scale(210 202)">
13
+ <stop offset="0" stop-color="#F2FFFB" stop-opacity="0.82" />
14
+ <stop offset="0.56" stop-color="#E6FFF8" stop-opacity="0.22" />
15
+ <stop offset="1" stop-color="#E6FFF8" stop-opacity="0" />
16
+ </radialGradient>
17
+ </defs>
18
+
19
+ <rect width="512" height="512" fill="url(#background)" />
20
+ <g>
21
+ <rect x="50" y="50" width="412" height="412" rx="116" fill="url(#background)" />
22
+ <rect x="51.5" y="51.5" width="409" height="409" rx="114.5" stroke="#D7E2EB" stroke-width="3" />
23
+ </g>
24
+
25
+ <g>
26
+ <circle cx="256" cy="174" r="104" fill="url(#cloud)" />
27
+ <circle cx="334" cy="204" r="96" fill="url(#cloud)" />
28
+ <circle cx="176" cy="248" r="118" fill="url(#cloud)" />
29
+ <circle cx="356" cy="294" r="98" fill="url(#cloud)" />
30
+ <circle cx="188" cy="336" r="106" fill="url(#cloud)" />
31
+ <circle cx="286" cy="360" r="98" fill="url(#cloud)" />
32
+ <circle cx="262" cy="262" r="122" fill="url(#cloud)" />
33
+ <circle cx="262" cy="262" r="122" fill="url(#sheen)" />
34
+ </g>
35
+
36
+ <path d="M170 214L214 286L170 352" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" stroke-linejoin="round" />
37
+ <path d="M274 318H354" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" />
38
+ </svg>
@@ -1,36 +1,36 @@
1
- <svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <defs>
3
- <linearGradient id="background" x1="66" y1="34" x2="448" y2="478" gradientUnits="userSpaceOnUse">
4
- <stop offset="0" stop-color="#F7FBFD" />
5
- <stop offset="1" stop-color="#E5EDF4" />
6
- </linearGradient>
7
- <linearGradient id="cloud" x1="256" y1="100" x2="256" y2="420" gradientUnits="userSpaceOnUse">
8
- <stop offset="0" stop-color="#ADF1DE" />
9
- <stop offset="0.48" stop-color="#59D3B4" />
10
- <stop offset="1" stop-color="#12866F" />
11
- </linearGradient>
12
- <radialGradient id="sheen" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(228 160) rotate(57.8) scale(206 198)">
13
- <stop offset="0" stop-color="#F2FFFB" stop-opacity="0.84" />
14
- <stop offset="0.56" stop-color="#E6FFF8" stop-opacity="0.22" />
15
- <stop offset="1" stop-color="#E6FFF8" stop-opacity="0" />
16
- </radialGradient>
17
- </defs>
18
-
19
- <rect width="512" height="512" fill="url(#background)" />
20
- <rect x="22" y="22" width="468" height="468" rx="146" fill="url(#background)" />
21
- <rect x="33" y="33" width="446" height="446" rx="131" stroke="#D8E2EA" stroke-width="2" />
22
-
23
- <g>
24
- <circle cx="256" cy="176" r="102" fill="url(#cloud)" />
25
- <circle cx="332" cy="206" r="94" fill="url(#cloud)" />
26
- <circle cx="178" cy="248" r="116" fill="url(#cloud)" />
27
- <circle cx="352" cy="292" r="96" fill="url(#cloud)" />
28
- <circle cx="190" cy="334" r="104" fill="url(#cloud)" />
29
- <circle cx="286" cy="358" r="96" fill="url(#cloud)" />
30
- <circle cx="262" cy="262" r="120" fill="url(#cloud)" />
31
- <circle cx="262" cy="262" r="120" fill="url(#sheen)" />
32
- </g>
33
-
34
- <path d="M172 216L214 286L172 350" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" stroke-linejoin="round" />
35
- <path d="M274 316H350" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" />
36
- </svg>
1
+ <svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <linearGradient id="background" x1="66" y1="34" x2="448" y2="478" gradientUnits="userSpaceOnUse">
4
+ <stop offset="0" stop-color="#F7FBFD" />
5
+ <stop offset="1" stop-color="#E5EDF4" />
6
+ </linearGradient>
7
+ <linearGradient id="cloud" x1="256" y1="100" x2="256" y2="420" gradientUnits="userSpaceOnUse">
8
+ <stop offset="0" stop-color="#ADF1DE" />
9
+ <stop offset="0.48" stop-color="#59D3B4" />
10
+ <stop offset="1" stop-color="#12866F" />
11
+ </linearGradient>
12
+ <radialGradient id="sheen" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(228 160) rotate(57.8) scale(206 198)">
13
+ <stop offset="0" stop-color="#F2FFFB" stop-opacity="0.84" />
14
+ <stop offset="0.56" stop-color="#E6FFF8" stop-opacity="0.22" />
15
+ <stop offset="1" stop-color="#E6FFF8" stop-opacity="0" />
16
+ </radialGradient>
17
+ </defs>
18
+
19
+ <rect width="512" height="512" fill="url(#background)" />
20
+ <rect x="22" y="22" width="468" height="468" rx="146" fill="url(#background)" />
21
+ <rect x="33" y="33" width="446" height="446" rx="131" stroke="#D8E2EA" stroke-width="2" />
22
+
23
+ <g>
24
+ <circle cx="256" cy="176" r="102" fill="url(#cloud)" />
25
+ <circle cx="332" cy="206" r="94" fill="url(#cloud)" />
26
+ <circle cx="178" cy="248" r="116" fill="url(#cloud)" />
27
+ <circle cx="352" cy="292" r="96" fill="url(#cloud)" />
28
+ <circle cx="190" cy="334" r="104" fill="url(#cloud)" />
29
+ <circle cx="286" cy="358" r="96" fill="url(#cloud)" />
30
+ <circle cx="262" cy="262" r="120" fill="url(#cloud)" />
31
+ <circle cx="262" cy="262" r="120" fill="url(#sheen)" />
32
+ </g>
33
+
34
+ <path d="M172 216L214 286L172 350" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" stroke-linejoin="round" />
35
+ <path d="M274 316H350" stroke="#F8FBFC" stroke-width="28" stroke-linecap="round" />
36
+ </svg>
package/dist/index.html CHANGED
@@ -1,45 +1,45 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
- <meta name="theme-color" content="#09090b" />
7
- <!-- 首屏绘制之前定主题。不这么做就没有办法修亮色:`:root` 是亮色基线、`:root.dark`
8
- 是暗色覆盖,默认(还没读到存储值)会先按亮色画一帧,暗色用户会看到闪白。
9
- 这段判据与 App.vue 的 applyDarkMode 必须一致——同一个 localStorage 键、同样的
10
- 'system' 语义(键值不是 light/dark 就跟随系统)。改一处务必同步另一处。 -->
11
- <script>
12
- (function () {
13
- var pref = null
14
- try {
15
- pref = localStorage.getItem('codex-web-local.dark-mode.v1')
16
- } catch (err) {
17
- /* 隐私模式下取不到就按 system 处理 */
18
- }
19
- var dark =
20
- pref === 'dark' ||
21
- (pref !== 'light' && window.matchMedia('(prefers-color-scheme: dark)').matches)
22
- document.documentElement.classList.toggle('dark', dark)
23
- var meta = document.querySelector('meta[name="theme-color"]')
24
- if (meta) meta.setAttribute('content', dark ? '#09090b' : '#f7f7f9')
25
- })()
26
- </script>
27
- <meta name="apple-mobile-web-app-capable" content="yes" />
28
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
29
- <meta name="apple-mobile-web-app-title" content="Codex Web" />
30
- <link rel="manifest" href="/manifest.webmanifest" />
31
- <link rel="icon" type="image/svg+xml" href="/icons/codexui-icon.svg" />
32
- <link rel="icon" type="image/png" sizes="192x192" href="/icons/pwa-192x192.png" />
33
- <link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png" />
34
- <!-- 首屏最常用的两个字重提前拉取,缩短 font-display: swap 造成的字形跳动。
35
- 其余 face(500 字重、Bricolage 展示字体)交给 @font-face 按需加载。 -->
36
- <link rel="preload" as="font" type="font/woff2" href="/fonts/ibm-plex-sans-400.woff2" crossorigin />
37
- <link rel="preload" as="font" type="font/woff2" href="/fonts/ibm-plex-mono-400.woff2" crossorigin />
38
- <title>Codex Web</title>
39
- <script type="module" crossorigin src="/assets/index-CkZzIAPA.js"></script>
40
- <link rel="stylesheet" crossorigin href="/assets/index-C2Pxi7u9.css">
41
- </head>
42
- <body>
43
- <div id="app"></div>
44
- </body>
45
- </html>
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
+ <meta name="theme-color" content="#09090b" />
7
+ <!-- 首屏绘制之前定主题。不这么做就没有办法修亮色:`:root` 是亮色基线、`:root.dark`
8
+ 是暗色覆盖,默认(还没读到存储值)会先按亮色画一帧,暗色用户会看到闪白。
9
+ 这段判据与 App.vue 的 applyDarkMode 必须一致——同一个 localStorage 键、同样的
10
+ 'system' 语义(键值不是 light/dark 就跟随系统)。改一处务必同步另一处。 -->
11
+ <script>
12
+ (function () {
13
+ var pref = null
14
+ try {
15
+ pref = localStorage.getItem('codex-web-local.dark-mode.v1')
16
+ } catch (err) {
17
+ /* 隐私模式下取不到就按 system 处理 */
18
+ }
19
+ var dark =
20
+ pref === 'dark' ||
21
+ (pref !== 'light' && window.matchMedia('(prefers-color-scheme: dark)').matches)
22
+ document.documentElement.classList.toggle('dark', dark)
23
+ var meta = document.querySelector('meta[name="theme-color"]')
24
+ if (meta) meta.setAttribute('content', dark ? '#09090b' : '#f7f7f9')
25
+ })()
26
+ </script>
27
+ <meta name="apple-mobile-web-app-capable" content="yes" />
28
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
29
+ <meta name="apple-mobile-web-app-title" content="Codex Web" />
30
+ <link rel="manifest" href="/manifest.webmanifest" />
31
+ <link rel="icon" type="image/svg+xml" href="/icons/codexui-icon.svg" />
32
+ <link rel="icon" type="image/png" sizes="192x192" href="/icons/pwa-192x192.png" />
33
+ <link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png" />
34
+ <!-- 首屏最常用的两个字重提前拉取,缩短 font-display: swap 造成的字形跳动。
35
+ 其余 face(500 字重、Bricolage 展示字体)交给 @font-face 按需加载。 -->
36
+ <link rel="preload" as="font" type="font/woff2" href="/fonts/ibm-plex-sans-400.woff2" crossorigin />
37
+ <link rel="preload" as="font" type="font/woff2" href="/fonts/ibm-plex-mono-400.woff2" crossorigin />
38
+ <title>Codex Web</title>
39
+ <script type="module" crossorigin src="/assets/index-rc4ZsEIH.js"></script>
40
+ <link rel="stylesheet" crossorigin href="/assets/index-DI_rCYF6.css">
41
+ </head>
42
+ <body>
43
+ <div id="app"></div>
44
+ </body>
45
+ </html>
@@ -1,36 +1,36 @@
1
- {
2
- "name": "Codex Web",
3
- "short_name": "Codex Web",
4
- "description": "A lightweight web interface for Codex that can be installed like an app in Chrome.",
5
- "start_url": "/",
6
- "scope": "/",
7
- "display": "standalone",
8
- "background_color": "#09090b",
9
- "theme_color": "#09090b",
10
- "icons": [
11
- {
12
- "src": "/icons/pwa-192x192.png",
13
- "sizes": "192x192",
14
- "type": "image/png",
15
- "purpose": "any"
16
- },
17
- {
18
- "src": "/icons/pwa-512x512.png",
19
- "sizes": "512x512",
20
- "type": "image/png",
21
- "purpose": "any"
22
- },
23
- {
24
- "src": "/icons/apple-touch-icon.png",
25
- "sizes": "180x180",
26
- "type": "image/png",
27
- "purpose": "any"
28
- },
29
- {
30
- "src": "/icons/maskable-512x512.png",
31
- "sizes": "512x512",
32
- "type": "image/png",
33
- "purpose": "maskable"
34
- }
35
- ]
36
- }
1
+ {
2
+ "name": "Codex Web",
3
+ "short_name": "Codex Web",
4
+ "description": "A lightweight web interface for Codex that can be installed like an app in Chrome.",
5
+ "start_url": "/",
6
+ "scope": "/",
7
+ "display": "standalone",
8
+ "background_color": "#09090b",
9
+ "theme_color": "#09090b",
10
+ "icons": [
11
+ {
12
+ "src": "/icons/pwa-192x192.png",
13
+ "sizes": "192x192",
14
+ "type": "image/png",
15
+ "purpose": "any"
16
+ },
17
+ {
18
+ "src": "/icons/pwa-512x512.png",
19
+ "sizes": "512x512",
20
+ "type": "image/png",
21
+ "purpose": "any"
22
+ },
23
+ {
24
+ "src": "/icons/apple-touch-icon.png",
25
+ "sizes": "180x180",
26
+ "type": "image/png",
27
+ "purpose": "any"
28
+ },
29
+ {
30
+ "src": "/icons/maskable-512x512.png",
31
+ "sizes": "512x512",
32
+ "type": "image/png",
33
+ "purpose": "maskable"
34
+ }
35
+ ]
36
+ }
package/dist/sw.js CHANGED
@@ -1,92 +1,92 @@
1
- const CACHE_NAME = 'codexweb-shell-v2'
2
- const APP_SHELL_PATHS = ['/', '/manifest.webmanifest']
3
- const STATIC_DESTINATIONS = new Set(['document', 'script', 'style', 'image', 'font'])
4
- const BYPASS_PREFIXES = ['/codex-api/', '/codex-local-image', '/codex-local-file', '/codex-local-browse/', '/codex-local-edit/']
5
-
6
- self.addEventListener('install', (event) => {
7
- event.waitUntil(
8
- caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL_PATHS)),
9
- )
10
- self.skipWaiting()
11
- })
12
-
13
- self.addEventListener('activate', (event) => {
14
- event.waitUntil(
15
- caches.keys().then((keys) =>
16
- Promise.all(
17
- keys
18
- .filter((key) => key !== CACHE_NAME)
19
- .map((key) => caches.delete(key)),
20
- ),
21
- ),
22
- )
23
- self.clients.claim()
24
- })
25
-
26
- self.addEventListener('fetch', (event) => {
27
- const { request } = event
28
- if (request.method !== 'GET') return
29
-
30
- const url = new URL(request.url)
31
- if (url.origin !== self.location.origin) return
32
- if (BYPASS_PREFIXES.some((prefix) => url.pathname.startsWith(prefix))) return
33
-
34
- if (request.mode === 'navigate') {
35
- event.respondWith(networkFirstNavigation(request))
36
- return
37
- }
38
-
39
- if (request.destination === 'script' || request.destination === 'style') {
40
- event.respondWith(networkFirstStatic(request))
41
- return
42
- }
43
-
44
- if (STATIC_DESTINATIONS.has(request.destination) || url.pathname === '/manifest.webmanifest') {
45
- event.respondWith(staleWhileRevalidate(request))
46
- }
47
- })
48
-
49
- async function networkFirstNavigation(request) {
50
- const cache = await caches.open(CACHE_NAME)
51
- try {
52
- const response = await fetch(request)
53
- cache.put('/', response.clone())
54
- return response
55
- } catch {
56
- return (await cache.match('/')) || Response.error()
57
- }
58
- }
59
-
60
- async function staleWhileRevalidate(request) {
61
- const cache = await caches.open(CACHE_NAME)
62
- const cached = await cache.match(request)
63
- const networkPromise = fetch(request)
64
- .then((response) => {
65
- if (response.ok) {
66
- cache.put(request, response.clone())
67
- }
68
- return response
69
- })
70
- .catch(() => null)
71
-
72
- if (cached) {
73
- return cached
74
- }
75
-
76
- const response = await networkPromise
77
- return response || Response.error()
78
- }
79
-
80
- async function networkFirstStatic(request) {
81
- const cache = await caches.open(CACHE_NAME)
82
- try {
83
- const response = await fetch(request)
84
- if (response.ok) {
85
- cache.put(request, response.clone())
86
- return response
87
- }
88
- return (await cache.match(request)) || response
89
- } catch {
90
- return (await cache.match(request)) || Response.error()
91
- }
92
- }
1
+ const CACHE_NAME = 'codexweb-shell-v2'
2
+ const APP_SHELL_PATHS = ['/', '/manifest.webmanifest']
3
+ const STATIC_DESTINATIONS = new Set(['document', 'script', 'style', 'image', 'font'])
4
+ const BYPASS_PREFIXES = ['/codex-api/', '/codex-local-image', '/codex-local-file', '/codex-local-browse/', '/codex-local-edit/']
5
+
6
+ self.addEventListener('install', (event) => {
7
+ event.waitUntil(
8
+ caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL_PATHS)),
9
+ )
10
+ self.skipWaiting()
11
+ })
12
+
13
+ self.addEventListener('activate', (event) => {
14
+ event.waitUntil(
15
+ caches.keys().then((keys) =>
16
+ Promise.all(
17
+ keys
18
+ .filter((key) => key !== CACHE_NAME)
19
+ .map((key) => caches.delete(key)),
20
+ ),
21
+ ),
22
+ )
23
+ self.clients.claim()
24
+ })
25
+
26
+ self.addEventListener('fetch', (event) => {
27
+ const { request } = event
28
+ if (request.method !== 'GET') return
29
+
30
+ const url = new URL(request.url)
31
+ if (url.origin !== self.location.origin) return
32
+ if (BYPASS_PREFIXES.some((prefix) => url.pathname.startsWith(prefix))) return
33
+
34
+ if (request.mode === 'navigate') {
35
+ event.respondWith(networkFirstNavigation(request))
36
+ return
37
+ }
38
+
39
+ if (request.destination === 'script' || request.destination === 'style') {
40
+ event.respondWith(networkFirstStatic(request))
41
+ return
42
+ }
43
+
44
+ if (STATIC_DESTINATIONS.has(request.destination) || url.pathname === '/manifest.webmanifest') {
45
+ event.respondWith(staleWhileRevalidate(request))
46
+ }
47
+ })
48
+
49
+ async function networkFirstNavigation(request) {
50
+ const cache = await caches.open(CACHE_NAME)
51
+ try {
52
+ const response = await fetch(request)
53
+ cache.put('/', response.clone())
54
+ return response
55
+ } catch {
56
+ return (await cache.match('/')) || Response.error()
57
+ }
58
+ }
59
+
60
+ async function staleWhileRevalidate(request) {
61
+ const cache = await caches.open(CACHE_NAME)
62
+ const cached = await cache.match(request)
63
+ const networkPromise = fetch(request)
64
+ .then((response) => {
65
+ if (response.ok) {
66
+ cache.put(request, response.clone())
67
+ }
68
+ return response
69
+ })
70
+ .catch(() => null)
71
+
72
+ if (cached) {
73
+ return cached
74
+ }
75
+
76
+ const response = await networkPromise
77
+ return response || Response.error()
78
+ }
79
+
80
+ async function networkFirstStatic(request) {
81
+ const cache = await caches.open(CACHE_NAME)
82
+ try {
83
+ const response = await fetch(request)
84
+ if (response.ok) {
85
+ cache.put(request, response.clone())
86
+ return response
87
+ }
88
+ return (await cache.match(request)) || response
89
+ } catch {
90
+ return (await cache.match(request)) || Response.error()
91
+ }
92
+ }