nolune 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +1622 -0
- package/LICENSE +21 -0
- package/README.md +226 -0
- package/build/client/_app/immutable/assets/0.CO3c3JBa.css +2 -0
- package/build/client/_app/immutable/assets/0.CO3c3JBa.css.br +0 -0
- package/build/client/_app/immutable/assets/0.CO3c3JBa.css.gz +0 -0
- package/build/client/_app/immutable/assets/10.DiHYpJ-g.css +1 -0
- package/build/client/_app/immutable/assets/10.DiHYpJ-g.css.br +0 -0
- package/build/client/_app/immutable/assets/10.DiHYpJ-g.css.gz +0 -0
- package/build/client/_app/immutable/assets/14.D8mCg27h.css +1 -0
- package/build/client/_app/immutable/assets/14.D8mCg27h.css.br +0 -0
- package/build/client/_app/immutable/assets/14.D8mCg27h.css.gz +0 -0
- package/build/client/_app/immutable/assets/AssistantAvatar.BH1P1JPA.css +1 -0
- package/build/client/_app/immutable/assets/AssistantAvatar.BH1P1JPA.css.br +0 -0
- package/build/client/_app/immutable/assets/AssistantAvatar.BH1P1JPA.css.gz +0 -0
- package/build/client/_app/immutable/assets/AvatarPicker.BWZNEVEv.css +1 -0
- package/build/client/_app/immutable/assets/AvatarPicker.BWZNEVEv.css.br +0 -0
- package/build/client/_app/immutable/assets/AvatarPicker.BWZNEVEv.css.gz +0 -0
- package/build/client/_app/immutable/assets/DotGrid.uBe8QJ6R.css +1 -0
- package/build/client/_app/immutable/assets/DotGrid.uBe8QJ6R.css.br +0 -0
- package/build/client/_app/immutable/assets/DotGrid.uBe8QJ6R.css.gz +0 -0
- package/build/client/_app/immutable/assets/ModelMenu.CfwWh95X.css +1 -0
- package/build/client/_app/immutable/assets/ModelMenu.CfwWh95X.css.br +0 -0
- package/build/client/_app/immutable/assets/ModelMenu.CfwWh95X.css.gz +0 -0
- package/build/client/_app/immutable/assets/confirm.BpBhXN_i.mp3 +0 -0
- package/build/client/_app/immutable/assets/data.9aNBaxbh.json +1 -0
- package/build/client/_app/immutable/assets/data.9aNBaxbh.json.br +0 -0
- package/build/client/_app/immutable/assets/data.9aNBaxbh.json.gz +0 -0
- package/build/client/_app/immutable/assets/data.BF1r6TM-.json +1 -0
- package/build/client/_app/immutable/assets/data.BF1r6TM-.json.br +0 -0
- package/build/client/_app/immutable/assets/data.BF1r6TM-.json.gz +0 -0
- package/build/client/_app/immutable/assets/data.BnNTV_b6.json +1 -0
- package/build/client/_app/immutable/assets/data.BnNTV_b6.json.br +0 -0
- package/build/client/_app/immutable/assets/data.BnNTV_b6.json.gz +0 -0
- package/build/client/_app/immutable/assets/data.CreAftJo.json +1 -0
- package/build/client/_app/immutable/assets/data.CreAftJo.json.br +0 -0
- package/build/client/_app/immutable/assets/data.CreAftJo.json.gz +0 -0
- package/build/client/_app/immutable/assets/data.DKp8PYJD.json +1 -0
- package/build/client/_app/immutable/assets/data.DKp8PYJD.json.br +0 -0
- package/build/client/_app/immutable/assets/data.DKp8PYJD.json.gz +0 -0
- package/build/client/_app/immutable/assets/figtree-latin-ext-wght-italic.Q0qr0lrZ.woff2 +0 -0
- package/build/client/_app/immutable/assets/figtree-latin-ext-wght-normal.DCwSJGxG.woff2 +0 -0
- package/build/client/_app/immutable/assets/figtree-latin-wght-italic.BEAWuiTz.woff2 +0 -0
- package/build/client/_app/immutable/assets/figtree-latin-wght-normal.D_ZTVpCC.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-cyrillic-400-normal.BJkDdjbt.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-cyrillic-400-normal.DUd3efVn.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-cyrillic-500-normal.CAy0Dwk2.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-cyrillic-500-normal.CFTSF0cD.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-cyrillic-ext-400-normal.Co4MVjrD.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-cyrillic-ext-400-normal.FAIU8e3o.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-cyrillic-ext-500-normal.BDCQVX4y.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-cyrillic-ext-500-normal.BGV2-mDE.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-greek-400-normal.B_0AmgK7.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-greek-400-normal.ftNhKy_S.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-greek-500-normal.DNFqaoqB.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-greek-500-normal.kj_VgxTv.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-greek-ext-400-normal.BQ5yw6bY.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-greek-ext-400-normal.Be4g_LSk.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-greek-ext-500-normal.CGPEfoom.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-greek-ext-500-normal.g6G8W_LY.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-latin-400-normal.C3FQ26ho.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-latin-400-normal.DVTTRLHv.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-latin-500-normal.DknboRIW.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-latin-500-normal.Du17Nws8.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-latin-ext-400-normal.B2gPvaNr.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-latin-ext-400-normal.CbD3vWRE.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-latin-ext-500-normal.-0AGvlKU.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-latin-ext-500-normal.DPED3Y3R.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-symbols2-400-normal.C6JptOil.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-symbols2-400-normal.CpeG9ob9.woff +0 -0
- package/build/client/_app/immutable/assets/fira-mono-symbols2-500-normal.0PpNbZw_.woff2 +0 -0
- package/build/client/_app/immutable/assets/fira-mono-symbols2-500-normal.fxu0Prpo.woff +0 -0
- package/build/client/_app/immutable/assets/music.z3ymEIJM.mp3 +0 -0
- package/build/client/_app/immutable/assets/select.CV-KWLNP.css +1 -0
- package/build/client/_app/immutable/assets/select.CV-KWLNP.css.br +1 -0
- package/build/client/_app/immutable/assets/select.CV-KWLNP.css.gz +0 -0
- package/build/client/_app/immutable/assets/wash.BnjShmr3.mp3 +0 -0
- package/build/client/_app/immutable/assets/yap.SNl9LSqC.mp3 +0 -0
- package/build/client/_app/immutable/chunks/-FJ70HB3.js +1 -0
- package/build/client/_app/immutable/chunks/-FJ70HB3.js.br +0 -0
- package/build/client/_app/immutable/chunks/-FJ70HB3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/9J99lH1E.js +4 -0
- package/build/client/_app/immutable/chunks/9J99lH1E.js.br +0 -0
- package/build/client/_app/immutable/chunks/9J99lH1E.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B4AK16CS.js +1 -0
- package/build/client/_app/immutable/chunks/B4AK16CS.js.br +0 -0
- package/build/client/_app/immutable/chunks/B4AK16CS.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B5IRm2KW.js +1 -0
- package/build/client/_app/immutable/chunks/B5IRm2KW.js.br +0 -0
- package/build/client/_app/immutable/chunks/B5IRm2KW.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BAJE4yH_.js +9 -0
- package/build/client/_app/immutable/chunks/BAJE4yH_.js.br +0 -0
- package/build/client/_app/immutable/chunks/BAJE4yH_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BDCREBKE.js +1 -0
- package/build/client/_app/immutable/chunks/BDCREBKE.js.br +0 -0
- package/build/client/_app/immutable/chunks/BDCREBKE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BOf4cn4q.js +16 -0
- package/build/client/_app/immutable/chunks/BOf4cn4q.js.br +0 -0
- package/build/client/_app/immutable/chunks/BOf4cn4q.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BOixjj3c.js +1 -0
- package/build/client/_app/immutable/chunks/BOixjj3c.js.br +1 -0
- package/build/client/_app/immutable/chunks/BOixjj3c.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BQb4WE-8.js +1 -0
- package/build/client/_app/immutable/chunks/BQb4WE-8.js.br +0 -0
- package/build/client/_app/immutable/chunks/BQb4WE-8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BTeK4a_a.js +1 -0
- package/build/client/_app/immutable/chunks/BTeK4a_a.js.br +0 -0
- package/build/client/_app/immutable/chunks/BTeK4a_a.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BYNjkfU_.js +1 -0
- package/build/client/_app/immutable/chunks/BYNjkfU_.js.br +0 -0
- package/build/client/_app/immutable/chunks/BYNjkfU_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BeDhKqx_.js +1 -0
- package/build/client/_app/immutable/chunks/BeDhKqx_.js.br +3 -0
- package/build/client/_app/immutable/chunks/BeDhKqx_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
- package/build/client/_app/immutable/chunks/Bjy-W4x2.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bjy-W4x2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bmf5cCYM.js +1 -0
- package/build/client/_app/immutable/chunks/Bmf5cCYM.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bmf5cCYM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bo7a0aly.js +1 -0
- package/build/client/_app/immutable/chunks/Bo7a0aly.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bo7a0aly.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BvAz--0N.js +1 -0
- package/build/client/_app/immutable/chunks/BvAz--0N.js.br +0 -0
- package/build/client/_app/immutable/chunks/BvAz--0N.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C-5HEoLn.js +1 -0
- package/build/client/_app/immutable/chunks/C-5HEoLn.js.br +0 -0
- package/build/client/_app/immutable/chunks/C-5HEoLn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C7dZK71a.js +1 -0
- package/build/client/_app/immutable/chunks/C7dZK71a.js.br +0 -0
- package/build/client/_app/immutable/chunks/C7dZK71a.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C98TgtTN.js +1 -0
- package/build/client/_app/immutable/chunks/C98TgtTN.js.br +0 -0
- package/build/client/_app/immutable/chunks/C98TgtTN.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C9u9ikCJ.js +1 -0
- package/build/client/_app/immutable/chunks/C9u9ikCJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/C9u9ikCJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CBy5xNAu.js +1 -0
- package/build/client/_app/immutable/chunks/CBy5xNAu.js.br +0 -0
- package/build/client/_app/immutable/chunks/CBy5xNAu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CCDGpt2Z.js +1 -0
- package/build/client/_app/immutable/chunks/CCDGpt2Z.js.br +0 -0
- package/build/client/_app/immutable/chunks/CCDGpt2Z.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CNU7dyxe.js +1 -0
- package/build/client/_app/immutable/chunks/CNU7dyxe.js.br +3 -0
- package/build/client/_app/immutable/chunks/CNU7dyxe.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CNij7yXO.js +1 -0
- package/build/client/_app/immutable/chunks/CNij7yXO.js.br +0 -0
- package/build/client/_app/immutable/chunks/CNij7yXO.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CPbGz0nD.js +1 -0
- package/build/client/_app/immutable/chunks/CPbGz0nD.js.br +0 -0
- package/build/client/_app/immutable/chunks/CPbGz0nD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Ce5rxuHE.js +1 -0
- package/build/client/_app/immutable/chunks/Ce5rxuHE.js.br +0 -0
- package/build/client/_app/immutable/chunks/Ce5rxuHE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CgJaNa38.js +1 -0
- package/build/client/_app/immutable/chunks/CgJaNa38.js.br +0 -0
- package/build/client/_app/immutable/chunks/CgJaNa38.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CgoZLTv2.js +1 -0
- package/build/client/_app/immutable/chunks/CgoZLTv2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CgoZLTv2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Ch-tX5Y1.js +1 -0
- package/build/client/_app/immutable/chunks/Ch-tX5Y1.js.br +0 -0
- package/build/client/_app/immutable/chunks/Ch-tX5Y1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CkALdgl6.js +1 -0
- package/build/client/_app/immutable/chunks/CkALdgl6.js.br +0 -0
- package/build/client/_app/immutable/chunks/CkALdgl6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cn31HPZM.js +1 -0
- package/build/client/_app/immutable/chunks/Cn31HPZM.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cn31HPZM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CoVud_S-.js +1 -0
- package/build/client/_app/immutable/chunks/CoVud_S-.js.br +0 -0
- package/build/client/_app/immutable/chunks/CoVud_S-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CraKVm2C.js +1 -0
- package/build/client/_app/immutable/chunks/CraKVm2C.js.br +0 -0
- package/build/client/_app/immutable/chunks/CraKVm2C.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D2KG5w4u.js +1 -0
- package/build/client/_app/immutable/chunks/D2KG5w4u.js.br +0 -0
- package/build/client/_app/immutable/chunks/D2KG5w4u.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DD7ObTOV.js +1 -0
- package/build/client/_app/immutable/chunks/DD7ObTOV.js.br +0 -0
- package/build/client/_app/immutable/chunks/DD7ObTOV.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DD9f1wuL.js +1 -0
- package/build/client/_app/immutable/chunks/DD9f1wuL.js.br +0 -0
- package/build/client/_app/immutable/chunks/DD9f1wuL.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DFMQ7Wtb.js +1 -0
- package/build/client/_app/immutable/chunks/DFMQ7Wtb.js.br +0 -0
- package/build/client/_app/immutable/chunks/DFMQ7Wtb.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DFO_JKVL.js +1 -0
- package/build/client/_app/immutable/chunks/DFO_JKVL.js.br +0 -0
- package/build/client/_app/immutable/chunks/DFO_JKVL.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DGyl1a-y.js +2 -0
- package/build/client/_app/immutable/chunks/DGyl1a-y.js.br +0 -0
- package/build/client/_app/immutable/chunks/DGyl1a-y.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DM7BiLiI.js +1 -0
- package/build/client/_app/immutable/chunks/DM7BiLiI.js.br +0 -0
- package/build/client/_app/immutable/chunks/DM7BiLiI.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DRu3YDxz.js +1 -0
- package/build/client/_app/immutable/chunks/DRu3YDxz.js.br +2 -0
- package/build/client/_app/immutable/chunks/DRu3YDxz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DTmdu5jU.js +1 -0
- package/build/client/_app/immutable/chunks/DTmdu5jU.js.br +0 -0
- package/build/client/_app/immutable/chunks/DTmdu5jU.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DW6oei0W.js +1 -0
- package/build/client/_app/immutable/chunks/DW6oei0W.js.br +0 -0
- package/build/client/_app/immutable/chunks/DW6oei0W.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DZ_NkRbw.js +1 -0
- package/build/client/_app/immutable/chunks/DZ_NkRbw.js.br +0 -0
- package/build/client/_app/immutable/chunks/DZ_NkRbw.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DfNBP7nd.js +1 -0
- package/build/client/_app/immutable/chunks/DfNBP7nd.js.br +0 -0
- package/build/client/_app/immutable/chunks/DfNBP7nd.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DkhXP75k.js +1 -0
- package/build/client/_app/immutable/chunks/DkhXP75k.js.br +0 -0
- package/build/client/_app/immutable/chunks/DkhXP75k.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DpugZNaj.js +1 -0
- package/build/client/_app/immutable/chunks/DpugZNaj.js.br +0 -0
- package/build/client/_app/immutable/chunks/DpugZNaj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DuEN1GTI.js +5 -0
- package/build/client/_app/immutable/chunks/DuEN1GTI.js.br +0 -0
- package/build/client/_app/immutable/chunks/DuEN1GTI.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DubTk1R0.js +1 -0
- package/build/client/_app/immutable/chunks/DubTk1R0.js.br +0 -0
- package/build/client/_app/immutable/chunks/DubTk1R0.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dyxd9rrM.js +5 -0
- package/build/client/_app/immutable/chunks/Dyxd9rrM.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dyxd9rrM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/F14uK0sn.js +1 -0
- package/build/client/_app/immutable/chunks/F14uK0sn.js.br +1 -0
- package/build/client/_app/immutable/chunks/F14uK0sn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/GbStyEBD.js +1 -0
- package/build/client/_app/immutable/chunks/GbStyEBD.js.br +0 -0
- package/build/client/_app/immutable/chunks/GbStyEBD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/IV6C0355.js +1 -0
- package/build/client/_app/immutable/chunks/IV6C0355.js.br +0 -0
- package/build/client/_app/immutable/chunks/IV6C0355.js.gz +0 -0
- package/build/client/_app/immutable/chunks/KSWUKh8r.js +1 -0
- package/build/client/_app/immutable/chunks/KSWUKh8r.js.br +0 -0
- package/build/client/_app/immutable/chunks/KSWUKh8r.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Nhc5CiNi.js +1 -0
- package/build/client/_app/immutable/chunks/Nhc5CiNi.js.br +0 -0
- package/build/client/_app/immutable/chunks/Nhc5CiNi.js.gz +0 -0
- package/build/client/_app/immutable/chunks/OrbH09aZ.js +318 -0
- package/build/client/_app/immutable/chunks/OrbH09aZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/OrbH09aZ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/PnjGAuWf.js +1 -0
- package/build/client/_app/immutable/chunks/PnjGAuWf.js.br +0 -0
- package/build/client/_app/immutable/chunks/PnjGAuWf.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ZoO6eRK-.js +1 -0
- package/build/client/_app/immutable/chunks/ZoO6eRK-.js.br +0 -0
- package/build/client/_app/immutable/chunks/ZoO6eRK-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/eHlSYfzc.js +67 -0
- package/build/client/_app/immutable/chunks/eHlSYfzc.js.br +0 -0
- package/build/client/_app/immutable/chunks/eHlSYfzc.js.gz +0 -0
- package/build/client/_app/immutable/chunks/kUgLbqVN.js +1 -0
- package/build/client/_app/immutable/chunks/kUgLbqVN.js.br +0 -0
- package/build/client/_app/immutable/chunks/kUgLbqVN.js.gz +0 -0
- package/build/client/_app/immutable/chunks/kW5akbMY.js +1 -0
- package/build/client/_app/immutable/chunks/kW5akbMY.js.br +0 -0
- package/build/client/_app/immutable/chunks/kW5akbMY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/lOC7RXgz.js +1 -0
- package/build/client/_app/immutable/chunks/lOC7RXgz.js.br +0 -0
- package/build/client/_app/immutable/chunks/lOC7RXgz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/mxa1wXkp.js +3 -0
- package/build/client/_app/immutable/chunks/mxa1wXkp.js.br +0 -0
- package/build/client/_app/immutable/chunks/mxa1wXkp.js.gz +0 -0
- package/build/client/_app/immutable/chunks/q0g666o4.js +6 -0
- package/build/client/_app/immutable/chunks/q0g666o4.js.br +0 -0
- package/build/client/_app/immutable/chunks/q0g666o4.js.gz +0 -0
- package/build/client/_app/immutable/chunks/rTK8FScS.js +1 -0
- package/build/client/_app/immutable/chunks/rTK8FScS.js.br +0 -0
- package/build/client/_app/immutable/chunks/rTK8FScS.js.gz +0 -0
- package/build/client/_app/immutable/chunks/uBIymjUX.js +1 -0
- package/build/client/_app/immutable/chunks/uBIymjUX.js.br +0 -0
- package/build/client/_app/immutable/chunks/uBIymjUX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/vt9Yl3tP.js +1 -0
- package/build/client/_app/immutable/chunks/vt9Yl3tP.js.br +0 -0
- package/build/client/_app/immutable/chunks/vt9Yl3tP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/build/client/_app/immutable/chunks/xihTtKlq.js.br +1 -0
- package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.BBB0nTuC.js +2 -0
- package/build/client/_app/immutable/entry/app.BBB0nTuC.js.br +0 -0
- package/build/client/_app/immutable/entry/app.BBB0nTuC.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.CmBINDhZ.js +1 -0
- package/build/client/_app/immutable/entry/start.CmBINDhZ.js.br +1 -0
- package/build/client/_app/immutable/entry/start.CmBINDhZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.But357jM.js +1 -0
- package/build/client/_app/immutable/nodes/0.But357jM.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.But357jM.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.DT8uBymP.js +1 -0
- package/build/client/_app/immutable/nodes/1.DT8uBymP.js.br +4 -0
- package/build/client/_app/immutable/nodes/1.DT8uBymP.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.BacbVQXe.js +1 -0
- package/build/client/_app/immutable/nodes/10.BacbVQXe.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.BacbVQXe.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.CF-CErr7.js +2 -0
- package/build/client/_app/immutable/nodes/11.CF-CErr7.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.CF-CErr7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/12.CAPJJBGQ.js +1 -0
- package/build/client/_app/immutable/nodes/12.CAPJJBGQ.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.CAPJJBGQ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.DFyrYJal.js +1 -0
- package/build/client/_app/immutable/nodes/13.DFyrYJal.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.DFyrYJal.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.D35Ot9wm.js +46 -0
- package/build/client/_app/immutable/nodes/14.D35Ot9wm.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.D35Ot9wm.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.Cp0A6oCa.js +1 -0
- package/build/client/_app/immutable/nodes/15.Cp0A6oCa.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.Cp0A6oCa.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DFKUnwHk.js +1 -0
- package/build/client/_app/immutable/nodes/2.DFKUnwHk.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DFKUnwHk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.DtSCxjUL.js +1 -0
- package/build/client/_app/immutable/nodes/3.DtSCxjUL.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.DtSCxjUL.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.BY04Tg68.js +2 -0
- package/build/client/_app/immutable/nodes/4.BY04Tg68.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.BY04Tg68.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.CXq_oj0Q.js +1 -0
- package/build/client/_app/immutable/nodes/5.CXq_oj0Q.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CXq_oj0Q.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.BVjg5uYT.js +1 -0
- package/build/client/_app/immutable/nodes/6.BVjg5uYT.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BVjg5uYT.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.BX0HQjn_.js +1 -0
- package/build/client/_app/immutable/nodes/7.BX0HQjn_.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.BX0HQjn_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.De0kNeyT.js +4 -0
- package/build/client/_app/immutable/nodes/8.De0kNeyT.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.De0kNeyT.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.CjcFLNkE.js +1 -0
- package/build/client/_app/immutable/nodes/9.CjcFLNkE.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.CjcFLNkE.js.gz +0 -0
- package/build/client/_app/version.json +1 -0
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/client/apple-touch-icon.png +0 -0
- package/build/client/favicon.ico +0 -0
- package/build/client/robots.txt +3 -0
- package/build/client/robots.txt.br +0 -0
- package/build/client/robots.txt.gz +0 -0
- package/build/env.js +70 -0
- package/build/handler.js +26 -0
- package/build/index.js +149 -0
- package/build/server/chunks/chunks/AssistantAvatar.js-CR1xF68O.js +294 -0
- package/build/server/chunks/chunks/AvatarPicker.js-DZPhpy7w.js +136 -0
- package/build/server/chunks/chunks/Composer.js-mKR_nJD9.js +332 -0
- package/build/server/chunks/chunks/ComposerDock.js-CCH7a93l.js +58 -0
- package/build/server/chunks/chunks/CopyButton.js-BztgBjPI.js +81 -0
- package/build/server/chunks/chunks/DotGrid.js-CftrAYTh.js +107 -0
- package/build/server/chunks/chunks/LucideIcon.js-B_cwdnXZ.js +19 -0
- package/build/server/chunks/chunks/MemoryChangeItem.js-BBDjCjIq.js +2557 -0
- package/build/server/chunks/chunks/ModelMenu.js-DHccPOZS.js +510 -0
- package/build/server/chunks/chunks/MoveToFolderMenu.js-DI6yuRr_.js +288 -0
- package/build/server/chunks/chunks/NewChatForm.js-BesIRgmI.js +296 -0
- package/build/server/chunks/chunks/NewFolderDialog.js-BTTYnEvA.js +192 -0
- package/build/server/chunks/chunks/Notifications.js-BUIjQEFf.js +762 -0
- package/build/server/chunks/chunks/PageHeader.js-CBhoVn_r.js +59 -0
- package/build/server/chunks/chunks/RenameFolderDialog.js-DRXA1rE1.js +258 -0
- package/build/server/chunks/chunks/Rich.js-DEvHcohw.js +31 -0
- package/build/server/chunks/chunks/StepIcon.js-DbIHgd-j.js +38 -0
- package/build/server/chunks/chunks/TopBar.js-DL3V5e8_.js +34 -0
- package/build/server/chunks/chunks/TypedText.js-CBSV0Eww.js +62 -0
- package/build/server/chunks/chunks/UserAvatar.js-zDozVLYj.js +17 -0
- package/build/server/chunks/chunks/UserMenu.js-CD42Fp5q.js +960 -0
- package/build/server/chunks/chunks/access.js-0oJZgR4f.js +40 -0
- package/build/server/chunks/chunks/after-sleep.js-BBvqb2L4.js +10 -0
- package/build/server/chunks/chunks/alert-dialog.js-DFswoRFb.js +505 -0
- package/build/server/chunks/chunks/articles.js-DmiBPIor.js +16 -0
- package/build/server/chunks/chunks/auth.js-avakWenI.js +20044 -0
- package/build/server/chunks/chunks/avatars.js-CZXD-JBu.js +496 -0
- package/build/server/chunks/chunks/badge.js-CBKfxi1n.js +38 -0
- package/build/server/chunks/chunks/check.js-DlXI7kOF.js +15 -0
- package/build/server/chunks/chunks/chevron-right.js-D2YPHtEd.js +15 -0
- package/build/server/chunks/chunks/chevrons-up-down.js-kIInlPpp.js +15 -0
- package/build/server/chunks/chunks/client.js-DXLagFo3.js +120 -0
- package/build/server/chunks/chunks/clock.js-DLKiHbA7.js +19 -0
- package/build/server/chunks/chunks/collapsible.js-TEhMCaES.js +410 -0
- package/build/server/chunks/chunks/command.js-DYF1chyA.js +2231 -0
- package/build/server/chunks/chunks/core.js-fgH-0YTF.js +6 -0
- package/build/server/chunks/chunks/dialog.js-CSahHfdK.js +544 -0
- package/build/server/chunks/chunks/dist.js-Dgve-3EB.js +600 -0
- package/build/server/chunks/chunks/dist2.js-DzuN_1ds.js +347 -0
- package/build/server/chunks/chunks/dropdown-menu.js-CnOm2iRl.js +2396 -0
- package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
- package/build/server/chunks/chunks/eraser.js-CwqAwzLd.js +15 -0
- package/build/server/chunks/chunks/exports.js-DPPmkIPk.js +236 -0
- package/build/server/chunks/chunks/factory.js-B2lDZWU5.js +2344 -0
- package/build/server/chunks/chunks/files.js-BTCcxPsy.js +33 -0
- package/build/server/chunks/chunks/folder-input.js-bTjsbAVr.js +19 -0
- package/build/server/chunks/chunks/format.js-D-G-GNZJ.js +57 -0
- package/build/server/chunks/chunks/forms.js-TIFaBiDZ.js +4052 -0
- package/build/server/chunks/chunks/hidden-input.js-3jXOp67_.js +47 -0
- package/build/server/chunks/chunks/http.js-B-SIUg23.js +19 -0
- package/build/server/chunks/chunks/i18n.js-gmnYop5e.js +5049 -0
- package/build/server/chunks/chunks/icons.js-DqrSaQen.js +32087 -0
- package/build/server/chunks/chunks/index-server.js-BgjjN9Dl.js +146 -0
- package/build/server/chunks/chunks/internal.js-CPnM6pod.js +28 -0
- package/build/server/chunks/chunks/internal2.js-BJdu5v6t.js +1135 -0
- package/build/server/chunks/chunks/key-round.js-ALDn8H2Z.js +20 -0
- package/build/server/chunks/chunks/last-profile.js-CGCyMPCt.js +6 -0
- package/build/server/chunks/chunks/media-refs.js-CTbNjDi5.js +129 -0
- package/build/server/chunks/chunks/memory-categories.js-BMxcWbJ1.js +141 -0
- package/build/server/chunks/chunks/memory-export.js-B-0sQxo9.js +126 -0
- package/build/server/chunks/chunks/memory.js-BmjM2yTP.js +25 -0
- package/build/server/chunks/chunks/message-circle.js-Boy7xak8.js +15 -0
- package/build/server/chunks/chunks/motion.js-e6Xy0FvI.js +224 -0
- package/build/server/chunks/chunks/node.js-B1BYsTq2.js +9 -0
- package/build/server/chunks/chunks/node2.js-BoQ3pSBK.js +7 -0
- package/build/server/chunks/chunks/node3.js-DUajZgS1.js +2420 -0
- package/build/server/chunks/chunks/openai.js-usndTuuG.js +20473 -0
- package/build/server/chunks/chunks/paths.js-Dv5_wc5b.js +19 -0
- package/build/server/chunks/chunks/pencil.js-BBTMEZ3O.js +15 -0
- package/build/server/chunks/chunks/plus.js-BEkOQr9Q.js +15 -0
- package/build/server/chunks/chunks/preferences.svelte.js-CzoLtrIH.js +93 -0
- package/build/server/chunks/chunks/remote.js-DRgAwsBW.js +3 -0
- package/build/server/chunks/chunks/rolldown-runtime.js-n5G0F_TW.js +37 -0
- package/build/server/chunks/chunks/routing.js-CQ7vk27s.js +265 -0
- package/build/server/chunks/chunks/schedule.js-22hng-Kw.js +296 -0
- package/build/server/chunks/chunks/sdk.js-CRLWYx_O.js +42918 -0
- package/build/server/chunks/chunks/sdk2.js-Dp6IbCdi.js +13701 -0
- package/build/server/chunks/chunks/sdk3.js-DEwIpbCP.js +4 -0
- package/build/server/chunks/chunks/select.js-DGOA1VL9.js +1965 -0
- package/build/server/chunks/chunks/server.js-XxNf6kVC.js +3907 -0
- package/build/server/chunks/chunks/shared.js-1FwmeXhQ.js +789 -0
- package/build/server/chunks/chunks/sidebar.js-B-PyxBE9.js +1498 -0
- package/build/server/chunks/chunks/square-pen.js-B7nqpNVl.js +20 -0
- package/build/server/chunks/chunks/src.js-Cb-pJk2c.js +25288 -0
- package/build/server/chunks/chunks/state.js-CrwNc-tR.js +67 -0
- package/build/server/chunks/chunks/suggestions.js-DxdV1W1D.js +15 -0
- package/build/server/chunks/chunks/switch.js-CDuy0MzW.js +283 -0
- package/build/server/chunks/chunks/terminal.js-BEi5NMPR.js +15 -0
- package/build/server/chunks/chunks/textarea.js-DnOcXQXd.js +25 -0
- package/build/server/chunks/chunks/tint.js-D75gRPbz.js +165 -0
- package/build/server/chunks/chunks/tooltip.js-0flEKjnb.js +5863 -0
- package/build/server/chunks/chunks/uneval.js-C7SIrMEV.js +536 -0
- package/build/server/chunks/chunks/usage.js-BzKKyzUN.js +27 -0
- package/build/server/chunks/chunks/utils.js-rQQrRQUR.js +1020 -0
- package/build/server/chunks/chunks/utils2.js-BgS8NcJx.js +1167 -0
- package/build/server/chunks/chunks/zod.js-DkbjBCP6.js +18824 -0
- package/build/server/chunks/chunks/zod2.js-FNRC10wS.js +4 -0
- package/build/server/chunks/entries/endpoints/api/c/_id_/continue/_server.ts.js-DPkjAoli.js +45 -0
- package/build/server/chunks/entries/endpoints/api/c/_id_/effort/_server.ts.js-B8su8yn5.js +46 -0
- package/build/server/chunks/entries/endpoints/api/c/_id_/events/_server.ts.js-CLDxKKTx.js +73 -0
- package/build/server/chunks/entries/endpoints/api/c/_id_/folder/_server.ts.js-DT3NoKYe.js +54 -0
- package/build/server/chunks/entries/endpoints/api/c/_id_/media/_mediaId_/_server.ts.js-bvxQlwcS.js +52 -0
- package/build/server/chunks/entries/endpoints/api/c/_id_/messages/_server.ts.js-ClMX8O_R.js +57 -0
- package/build/server/chunks/entries/endpoints/api/c/_id_/preset/_server.ts.js-DQ8N5-g_.js +50 -0
- package/build/server/chunks/entries/endpoints/api/c/_id_/stop/_server.ts.js-4v8WbwCB.js +43 -0
- package/build/server/chunks/entries/endpoints/api/events/_server.ts.js-lUrCowKV.js +78 -0
- package/build/server/chunks/entries/endpoints/api/hooks/_token_/_server.ts.js-CoqUCiud.js +49 -0
- package/build/server/chunks/entries/endpoints/api/icons/_name_/_server.ts.js-k_TzYggq.js +18 -0
- package/build/server/chunks/entries/endpoints/api/models/_server.ts.js-BnE6M4aY.js +56 -0
- package/build/server/chunks/entries/endpoints/api/notifications/_id_/continue/_server.ts.js-7cVqAe1A.js +50 -0
- package/build/server/chunks/entries/endpoints/api/notifications/_id_/dismiss/_server.ts.js-nebszEA8.js +42 -0
- package/build/server/chunks/entries/endpoints/api/notifications/clear/_server.ts.js-8UNQWqlv.js +43 -0
- package/build/server/chunks/entries/endpoints/api/notifications/seen/_server.ts.js-BigNQ41d.js +43 -0
- package/build/server/chunks/entries/endpoints/api/p/_slug_/folders/_folder_/files/_file_/_server.ts.js-CVZofPL8.js +56 -0
- package/build/server/chunks/entries/endpoints/api/p/_slug_/folders/_server.ts.js--huBNcxm.js +57 -0
- package/build/server/chunks/entries/endpoints/api/p/_slug_/memory/_id_/undo/_server.ts.js-DILraLKg.js +57 -0
- package/build/server/chunks/entries/endpoints/api/p/_slug_/running/_server.ts.js-DysLWyt1.js +79 -0
- package/build/server/chunks/entries/endpoints/api/p/_slug_/suggestions/_server.ts.js-B8HQNn05.js +53 -0
- package/build/server/chunks/entries/endpoints/api/p/_slug_/templates/_id_/cover/_server.ts.js-DCJqd-KE.js +59 -0
- package/build/server/chunks/entries/endpoints/api/p/_slug_/uploads/_id_/_server.ts.js-DJh0dkU7.js +44 -0
- package/build/server/chunks/entries/endpoints/api/p/_slug_/uploads/_server.ts.js-CQi0je7g.js +72 -0
- package/build/server/chunks/entries/endpoints/logout/_server.ts.js-iwUOTHUJ.js +46 -0
- package/build/server/chunks/entries/fallbacks/error.svelte.js-BjT9T-qE.js +22 -0
- package/build/server/chunks/entries/hooks.server.js-CA451orY.js +1956 -0
- package/build/server/chunks/entries/pages/_layout.server.ts.js-DeA1Se1v.js +34 -0
- package/build/server/chunks/entries/pages/_layout.svelte.js-Cc0HS5vE.js +77 -0
- package/build/server/chunks/entries/pages/_page.server.ts.js-BP9VmKmv.js +20 -0
- package/build/server/chunks/entries/pages/_page.svelte.js-BP2EdQl3.js +5 -0
- package/build/server/chunks/entries/pages/admin/_page.server.ts.js-BGy54zg7.js +310 -0
- package/build/server/chunks/entries/pages/admin/_page.svelte.js-DC0lzbwL.js +2092 -0
- package/build/server/chunks/entries/pages/login/_page.server.ts.js-to8Vy4NV.js +42 -0
- package/build/server/chunks/entries/pages/login/_page.svelte.js-CRFRcLqG.js +74 -0
- package/build/server/chunks/entries/pages/p/_slug_/_layout.server.ts.js-BATtKhxU.js +50 -0
- package/build/server/chunks/entries/pages/p/_slug_/_layout.svelte.js-B4A4RVlj.js +1897 -0
- package/build/server/chunks/entries/pages/p/_slug_/_page.server.ts.js-CwhG-rBA.js +71 -0
- package/build/server/chunks/entries/pages/p/_slug_/_page.svelte.js-v85HZSJv.js +132 -0
- package/build/server/chunks/entries/pages/p/_slug_/automations/_page.server.ts.js-BYjEh_94.js +269 -0
- package/build/server/chunks/entries/pages/p/_slug_/automations/_page.svelte.js-C9MxplNZ.js +423 -0
- package/build/server/chunks/entries/pages/p/_slug_/c/_id_/_page.server.ts.js-DqYn7Ov8.js +68 -0
- package/build/server/chunks/entries/pages/p/_slug_/c/_id_/_page.svelte.js-DO1qyELK.js +2072 -0
- package/build/server/chunks/entries/pages/p/_slug_/f/_folder_/_page.server.ts.js-DK68gPIS.js +101 -0
- package/build/server/chunks/entries/pages/p/_slug_/f/_folder_/_page.svelte.js-a31Wj0H5.js +321 -0
- package/build/server/chunks/entries/pages/p/_slug_/images/_page.server.ts.js-DYwxYJjv.js +145 -0
- package/build/server/chunks/entries/pages/p/_slug_/images/_page.svelte.js-H3zU7YA6.js +526 -0
- package/build/server/chunks/entries/pages/p/_slug_/memory/_page.server.ts.js-C6jVrFqG.js +99 -0
- package/build/server/chunks/entries/pages/p/_slug_/memory/_page.svelte.js-D54hFXGF.js +902 -0
- package/build/server/chunks/entries/pages/p/_slug_/settings/_page.server.ts.js-BvhbrusJ.js +106 -0
- package/build/server/chunks/entries/pages/p/_slug_/settings/_page.svelte.js-K9Rx0fue.js +581 -0
- package/build/server/chunks/entries/pages/p/_slug_/skills/_page.server.ts.js-X_toxkHr.js +45 -0
- package/build/server/chunks/entries/pages/p/_slug_/skills/_page.svelte.js-9BpNF-xF.js +132 -0
- package/build/server/chunks/entries/pages/p/_slug_/welcome/_page.server.ts.js-1d4vkOo-.js +129 -0
- package/build/server/chunks/entries/pages/p/_slug_/welcome/_page@.svelte.js-32N16gxF.js +223 -0
- package/build/server/chunks/entries/pages/profiles/_page.server.ts.js-CYu6Uj8H.js +32 -0
- package/build/server/chunks/entries/pages/profiles/_page.svelte.js-Bhw4E_wV.js +89 -0
- package/build/server/chunks/handler-CsXFmZYe.js +1735 -0
- package/build/server/chunks/index.js-kWlRiTFB.js +3700 -0
- package/build/server/chunks/manifest.js-BU_jyr1-.js +314 -0
- package/build/server/chunks/nodes/0.js-D4qm-LVJ.js +42 -0
- package/build/server/chunks/nodes/1.js-Fjtm11_Q.js +9 -0
- package/build/server/chunks/nodes/10.js-C0jWz6L_.js +45 -0
- package/build/server/chunks/nodes/11.js-CvxSawBf.js +45 -0
- package/build/server/chunks/nodes/12.js-CFwkqqPw.js +45 -0
- package/build/server/chunks/nodes/13.js-8e3_MY_4.js +45 -0
- package/build/server/chunks/nodes/14.js-dFhmLvor.js +45 -0
- package/build/server/chunks/nodes/15.js-alFwV-ia.js +45 -0
- package/build/server/chunks/nodes/2.js-DlqVofm5.js +46 -0
- package/build/server/chunks/nodes/3.js-B11kFzfi.js +45 -0
- package/build/server/chunks/nodes/4.js-CJOa-BdF.js +46 -0
- package/build/server/chunks/nodes/5.js-BiasAa82.js +50 -0
- package/build/server/chunks/nodes/6.js-vEMr5YOn.js +47 -0
- package/build/server/chunks/nodes/7.js-BwwcgtyP.js +45 -0
- package/build/server/chunks/nodes/8.js-Mqkjlq-6.js +45 -0
- package/build/server/chunks/nodes/9.js-DtRpQ_En.js +45 -0
- package/build/shims.js +33 -0
- package/dist/chunks/chunk-45BRG6A7.js +85 -0
- package/dist/chunks/chunk-CL6JQXXZ.js +38 -0
- package/dist/chunks/chunk-KZL3QNDA.js +14397 -0
- package/dist/chunks/chunk-N4H4AYCQ.js +20 -0
- package/dist/chunks/chunk-W4U7L4LF.js +47 -0
- package/dist/chunks/io-DMGTB3B7.js +12 -0
- package/dist/chunks/node-4RSVEEU6.js +2233 -0
- package/dist/chunks/node-BBTNNFRQ.js +20 -0
- package/dist/chunks/openai-LNQCFHTY.js +21690 -0
- package/dist/chunks/run-6LM42GJD.js +22287 -0
- package/dist/chunks/sdk-UNMKBESV.js +53 -0
- package/dist/chunks/sdk-Z2WD4F5K.js +30854 -0
- package/dist/chunks/zod-H7KMPIPH.js +19934 -0
- package/dist/cli.js +130 -0
- package/package.json +102 -0
- package/packages/core/drizzle/0000_init.sql +123 -0
- package/packages/core/drizzle/0001_triggers.sql +82 -0
- package/packages/core/drizzle/0002_default_preset.sql +1 -0
- package/packages/core/drizzle/0003_trigger_summary.sql +2 -0
- package/packages/core/drizzle/0004_skill_toggles.sql +1 -0
- package/packages/core/drizzle/0005_media.sql +21 -0
- package/packages/core/drizzle/0006_attachments.sql +25 -0
- package/packages/core/drizzle/0007_folders.sql +35 -0
- package/packages/core/drizzle/0008_avatars.sql +26 -0
- package/packages/core/drizzle/0009_subagents.sql +28 -0
- package/packages/core/drizzle/0010_soul.sql +1 -0
- package/packages/core/drizzle/0011_claude_plan.sql +1 -0
- package/packages/core/drizzle/0012_model_switch.sql +4 -0
- package/packages/core/drizzle/0013_nolune_format.sql +1 -0
- package/packages/core/drizzle/0014_nolune_rename.sql +3 -0
- package/packages/core/drizzle/0015_learn_from_chats.sql +2 -0
- package/packages/core/drizzle/0016_memory_changes.sql +19 -0
- package/packages/core/drizzle/0017_member_person_note.sql +1 -0
- package/packages/core/drizzle/meta/0000_snapshot.json +809 -0
- package/packages/core/drizzle/meta/0001_snapshot.json +1354 -0
- package/packages/core/drizzle/meta/0002_snapshot.json +1362 -0
- package/packages/core/drizzle/meta/0003_snapshot.json +1376 -0
- package/packages/core/drizzle/meta/0004_snapshot.json +1384 -0
- package/packages/core/drizzle/meta/0005_snapshot.json +1523 -0
- package/packages/core/drizzle/meta/0006_snapshot.json +1679 -0
- package/packages/core/drizzle/meta/0007_snapshot.json +1921 -0
- package/packages/core/drizzle/meta/0008_snapshot.json +1929 -0
- package/packages/core/drizzle/meta/0009_snapshot.json +2109 -0
- package/packages/core/drizzle/meta/0010_snapshot.json +2117 -0
- package/packages/core/drizzle/meta/0011_snapshot.json +2124 -0
- package/packages/core/drizzle/meta/0012_snapshot.json +2138 -0
- package/packages/core/drizzle/meta/0013_snapshot.json +2145 -0
- package/packages/core/drizzle/meta/0014_snapshot.json +2145 -0
- package/packages/core/drizzle/meta/0015_snapshot.json +2160 -0
- package/packages/core/drizzle/meta/0016_snapshot.json +2286 -0
- package/packages/core/drizzle/meta/0017_snapshot.json +2293 -0
- package/packages/core/drizzle/meta/_journal.json +132 -0
- package/packages/core/image-templates/app-icon/TEMPLATE.md +37 -0
- package/packages/core/image-templates/app-icon/cover.webp +0 -0
- package/packages/core/image-templates/coloring-page/TEMPLATE.md +14 -0
- package/packages/core/image-templates/coloring-page/cover.webp +0 -0
- package/packages/core/image-templates/concept-art/TEMPLATE.md +46 -0
- package/packages/core/image-templates/concept-art/cover.webp +0 -0
- package/packages/core/image-templates/couple-portrait/TEMPLATE.md +35 -0
- package/packages/core/image-templates/couple-portrait/cover.webp +0 -0
- package/packages/core/image-templates/dream-bouquet/TEMPLATE.md +36 -0
- package/packages/core/image-templates/dream-bouquet/cover.webp +0 -0
- package/packages/core/image-templates/family-crest/TEMPLATE.md +38 -0
- package/packages/core/image-templates/family-crest/cover.webp +0 -0
- package/packages/core/image-templates/nail-art/TEMPLATE.md +32 -0
- package/packages/core/image-templates/nail-art/cover.webp +0 -0
- package/packages/core/image-templates/outfit-board/TEMPLATE.md +46 -0
- package/packages/core/image-templates/outfit-board/cover.webp +0 -0
- package/packages/core/image-templates/party-invitation/TEMPLATE.md +49 -0
- package/packages/core/image-templates/party-invitation/cover.webp +0 -0
- package/packages/core/image-templates/photo-booth/TEMPLATE.md +33 -0
- package/packages/core/image-templates/photo-booth/cover.webp +0 -0
- package/packages/core/image-templates/scribble/TEMPLATE.md +29 -0
- package/packages/core/image-templates/scribble/cover.webp +0 -0
- package/packages/core/image-templates/sprite-sheet/TEMPLATE.md +45 -0
- package/packages/core/image-templates/sprite-sheet/cover.webp +0 -0
- package/packages/core/image-templates/sticker-pack/TEMPLATE.md +37 -0
- package/packages/core/image-templates/sticker-pack/cover.webp +0 -0
- package/packages/core/image-templates/storybook-page/TEMPLATE.md +34 -0
- package/packages/core/image-templates/storybook-page/cover.webp +0 -0
- package/packages/core/image-templates/tattoo/TEMPLATE.md +44 -0
- package/packages/core/image-templates/tattoo/cover.webp +0 -0
- package/packages/core/image-templates/tileable-texture/TEMPLATE.md +34 -0
- package/packages/core/image-templates/tileable-texture/cover.webp +0 -0
- package/packages/core/image-templates/tiny-world/TEMPLATE.md +15 -0
- package/packages/core/image-templates/tiny-world/cover.webp +0 -0
- package/packages/core/image-templates/trip-postcard/TEMPLATE.md +21 -0
- package/packages/core/image-templates/trip-postcard/cover.webp +0 -0
- package/packages/core/image-templates/wanted-poster/TEMPLATE.md +27 -0
- package/packages/core/image-templates/wanted-poster/cover.webp +0 -0
- package/packages/core/skills/automations/SKILL.md +91 -0
- package/packages/core/skills/generate-images/SKILL.md +115 -0
- package/packages/core/skills/nolune/SKILL.md +281 -0
- package/packages/core/skills/subagents/SKILL.md +91 -0
- package/packages/core/skills/view-images/SKILL.md +88 -0
|
@@ -0,0 +1,2072 @@
|
|
|
1
|
+
import { r as run, al as attr, ap as escape_html, au as attr_style, aq as ensure_array_like, at as attr_class, am as clsx, _ as derived, af as spread_props, ag as bind_props, as as stringify, aj as attributes } from '../../../../../../chunks/server.js-XxNf6kVC.js';
|
|
2
|
+
import 'node:module';
|
|
3
|
+
import { p as promptTokens, c as cacheHitRate, a as cacheMissTokens, b as cacheTtlMs } from '../../../../../../chunks/usage.js-BzKKyzUN.js';
|
|
4
|
+
import { g as getI18n } from '../../../../../../chunks/i18n.js-gmnYop5e.js';
|
|
5
|
+
import { g as getPreferences } from '../../../../../../chunks/preferences.svelte.js-CzoLtrIH.js';
|
|
6
|
+
import { r as resolve } from '../../../../../../chunks/paths.js-Dv5_wc5b.js';
|
|
7
|
+
import { i as invalidate } from '../../../../../../chunks/client.js-DXLagFo3.js';
|
|
8
|
+
import { c as cn } from '../../../../../../chunks/utils2.js-BgS8NcJx.js';
|
|
9
|
+
import { p as page } from '../../../../../../chunks/state.js-CrwNc-tR.js';
|
|
10
|
+
import { a as Tooltip, b as Tooltip_trigger, d as Tooltip_content } from '../../../../../../chunks/tooltip.js-0flEKjnb.js';
|
|
11
|
+
import { D as Dropdown_menu, a as Dropdown_menu_trigger, b as Dropdown_menu_content, c as Dropdown_menu_label, d as Dropdown_menu_separator, e as Dropdown_menu_item } from '../../../../../../chunks/dropdown-menu.js-CnOm2iRl.js';
|
|
12
|
+
import { A as Alert_dialog, a as Alert_dialog_content, b as Alert_dialog_header, d as Alert_dialog_title, e as Alert_dialog_description, c as Alert_dialog_footer, f as Alert_dialog_cancel, g as Alert_dialog_action } from '../../../../../../chunks/alert-dialog.js-DFswoRFb.js';
|
|
13
|
+
import { a as Dialog, e as Dialog_content, c as Dialog_title } from '../../../../../../chunks/dialog.js-CSahHfdK.js';
|
|
14
|
+
import { C as Collapsible, a as Collapsible_trigger, b as Collapsible_content } from '../../../../../../chunks/collapsible.js-TEhMCaES.js';
|
|
15
|
+
import { B as Button, b as buttonVariants } from '../../../../../../chunks/forms.js-TIFaBiDZ.js';
|
|
16
|
+
import { I as Icon, A as AssistantAvatar } from '../../../../../../chunks/AssistantAvatar.js-CR1xF68O.js';
|
|
17
|
+
import { C as Clock } from '../../../../../../chunks/clock.js-DLKiHbA7.js';
|
|
18
|
+
import { R as RenameChatDialog, B as Brain, M as MoveToFolderMenu } from '../../../../../../chunks/MoveToFolderMenu.js-DI6yuRr_.js';
|
|
19
|
+
import { a as TypedText, E as Ellipsis, T as Trash } from '../../../../../../chunks/TypedText.js-CBSV0Eww.js';
|
|
20
|
+
import { C as Chevron_right } from '../../../../../../chunks/chevron-right.js-D2YPHtEd.js';
|
|
21
|
+
import { F as Folder, N as NewFolderDialog, m as moveChat } from '../../../../../../chunks/NewFolderDialog.js-BTTYnEvA.js';
|
|
22
|
+
import { P as Pencil } from '../../../../../../chunks/pencil.js-BBTMEZ3O.js';
|
|
23
|
+
import { e as errorMessage } from '../../../../../../chunks/http.js-B-SIUg23.js';
|
|
24
|
+
import { R as Rich } from '../../../../../../chunks/Rich.js-DEvHcohw.js';
|
|
25
|
+
import { U as UserAvatar } from '../../../../../../chunks/UserAvatar.js-zDozVLYj.js';
|
|
26
|
+
import { f as formatTokens, a as formatBytes, b as formatPercent } from '../../../../../../chunks/format.js-D-G-GNZJ.js';
|
|
27
|
+
import { C as CopyButton } from '../../../../../../chunks/CopyButton.js-BztgBjPI.js';
|
|
28
|
+
import { P as PageHeader } from '../../../../../../chunks/PageHeader.js-CBhoVn_r.js';
|
|
29
|
+
import { F as File, C as Composer, A as Attachments } from '../../../../../../chunks/Composer.js-mKR_nJD9.js';
|
|
30
|
+
import { M as ModelMenu, s as shortModelName } from '../../../../../../chunks/ModelMenu.js-DHccPOZS.js';
|
|
31
|
+
import { S as StepIcon } from '../../../../../../chunks/StepIcon.js-DbIHgd-j.js';
|
|
32
|
+
import { L as Loader_circle, C as Circle_alert, a as ComposerDock } from '../../../../../../chunks/ComposerDock.js-CCH7a93l.js';
|
|
33
|
+
import { M as MemoryChangeItem, a as Markdown } from '../../../../../../chunks/MemoryChangeItem.js-BBDjCjIq.js';
|
|
34
|
+
import { a as memoryAnchor } from '../../../../../../chunks/memory.js-BmjM2yTP.js';
|
|
35
|
+
import '../../../../../../chunks/uneval.js-C7SIrMEV.js';
|
|
36
|
+
import '../../../../../../chunks/schedule.js-22hng-Kw.js';
|
|
37
|
+
import '../../../../../../chunks/internal.js-CPnM6pod.js';
|
|
38
|
+
import '../../../../../../chunks/internal2.js-BJdu5v6t.js';
|
|
39
|
+
import '../../../../../../chunks/routing.js-CQ7vk27s.js';
|
|
40
|
+
import '../../../../../../chunks/utils.js-rQQrRQUR.js';
|
|
41
|
+
import '../../../../../../chunks/shared.js-1FwmeXhQ.js';
|
|
42
|
+
import '../../../../../../chunks/exports.js-DPPmkIPk.js';
|
|
43
|
+
import '../../../../../../chunks/index-server.js-BgjjN9Dl.js';
|
|
44
|
+
import '../../../../../../chunks/rolldown-runtime.js-n5G0F_TW.js';
|
|
45
|
+
import '../../../../../../chunks/sidebar.js-B-PyxBE9.js';
|
|
46
|
+
import '../../../../../../chunks/check.js-DlXI7kOF.js';
|
|
47
|
+
import '../../../../../../chunks/after-sleep.js-BBvqb2L4.js';
|
|
48
|
+
import '../../../../../../chunks/avatars.js-CZXD-JBu.js';
|
|
49
|
+
import '../../../../../../chunks/folder-input.js-bTjsbAVr.js';
|
|
50
|
+
import '../../../../../../chunks/Notifications.js-BUIjQEFf.js';
|
|
51
|
+
import '../../../../../../chunks/media-refs.js-CTbNjDi5.js';
|
|
52
|
+
import '../../../../../../chunks/square-pen.js-B7nqpNVl.js';
|
|
53
|
+
import '../../../../../../chunks/terminal.js-BEi5NMPR.js';
|
|
54
|
+
import '../../../../../../chunks/LucideIcon.js-B_cwdnXZ.js';
|
|
55
|
+
import '../../../../../../chunks/plus.js-BEkOQr9Q.js';
|
|
56
|
+
import '../../../../../../chunks/icons.js-DqrSaQen.js';
|
|
57
|
+
import '../../../../../../chunks/memory-categories.js-BMxcWbJ1.js';
|
|
58
|
+
|
|
59
|
+
//#region node_modules/.pnpm/@lucide+svelte@1.48.0_svelte@5.57.1_@typescript-eslint+types@8.70.1_/node_modules/@lucide/svelte/dist/icons/arrow-down.svelte
|
|
60
|
+
function Arrow_down($$renderer, $$props) {
|
|
61
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
62
|
+
Icon($$renderer, spread_props([props, { icon: {
|
|
63
|
+
"name": "arrow-down",
|
|
64
|
+
"size": 24,
|
|
65
|
+
"node": [["path", { "d": "M12 5v14" }], ["path", { "d": "m19 12-7 7-7-7" }]]
|
|
66
|
+
} }]));
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region node_modules/.pnpm/@lucide+svelte@1.48.0_svelte@5.57.1_@typescript-eslint+types@8.70.1_/node_modules/@lucide/svelte/dist/icons/bot.svelte
|
|
70
|
+
function Bot($$renderer, $$props) {
|
|
71
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
72
|
+
Icon($$renderer, spread_props([props, { icon: {
|
|
73
|
+
"name": "bot",
|
|
74
|
+
"size": 24,
|
|
75
|
+
"node": [
|
|
76
|
+
["path", { "d": "M12 8V4H8" }],
|
|
77
|
+
["rect", {
|
|
78
|
+
"width": "16",
|
|
79
|
+
"height": "12",
|
|
80
|
+
"x": "4",
|
|
81
|
+
"y": "8",
|
|
82
|
+
"rx": "2"
|
|
83
|
+
}],
|
|
84
|
+
["path", { "d": "M2 14h2" }],
|
|
85
|
+
["path", { "d": "M20 14h2" }],
|
|
86
|
+
["path", { "d": "M15 13v2" }],
|
|
87
|
+
["path", { "d": "M9 13v2" }]
|
|
88
|
+
]
|
|
89
|
+
} }]));
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region node_modules/.pnpm/@lucide+svelte@1.48.0_svelte@5.57.1_@typescript-eslint+types@8.70.1_/node_modules/@lucide/svelte/dist/icons/info.svelte
|
|
93
|
+
function Info($$renderer, $$props) {
|
|
94
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
95
|
+
Icon($$renderer, spread_props([props, { icon: {
|
|
96
|
+
"name": "info",
|
|
97
|
+
"size": 24,
|
|
98
|
+
"node": [
|
|
99
|
+
["circle", {
|
|
100
|
+
"cx": "12",
|
|
101
|
+
"cy": "12",
|
|
102
|
+
"r": "10"
|
|
103
|
+
}],
|
|
104
|
+
["path", { "d": "M12 16v-4" }],
|
|
105
|
+
["path", { "d": "M12 8h.01" }]
|
|
106
|
+
]
|
|
107
|
+
} }]));
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region node_modules/.pnpm/@lucide+svelte@1.48.0_svelte@5.57.1_@typescript-eslint+types@8.70.1_/node_modules/@lucide/svelte/dist/icons/rotate-ccw.svelte
|
|
111
|
+
function Rotate_ccw($$renderer, $$props) {
|
|
112
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
113
|
+
Icon($$renderer, spread_props([props, { icon: {
|
|
114
|
+
"name": "rotate-ccw",
|
|
115
|
+
"size": 24,
|
|
116
|
+
"node": [["path", { "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { "d": "M3 3v5h5" }]]
|
|
117
|
+
} }]));
|
|
118
|
+
}
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region node_modules/.pnpm/@lucide+svelte@1.48.0_svelte@5.57.1_@typescript-eslint+types@8.70.1_/node_modules/@lucide/svelte/dist/icons/square-terminal.svelte
|
|
121
|
+
function Square_terminal($$renderer, $$props) {
|
|
122
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
123
|
+
Icon($$renderer, spread_props([props, { icon: {
|
|
124
|
+
"name": "square-terminal",
|
|
125
|
+
"size": 24,
|
|
126
|
+
"node": [
|
|
127
|
+
["path", { "d": "m7 11 2-2-2-2" }],
|
|
128
|
+
["path", { "d": "M11 13h4" }],
|
|
129
|
+
["rect", {
|
|
130
|
+
"width": "18",
|
|
131
|
+
"height": "18",
|
|
132
|
+
"x": "3",
|
|
133
|
+
"y": "3",
|
|
134
|
+
"rx": "2",
|
|
135
|
+
"ry": "2"
|
|
136
|
+
}]
|
|
137
|
+
],
|
|
138
|
+
"aliases": ["terminal-square"]
|
|
139
|
+
} }]));
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/lib/chat.svelte.ts
|
|
143
|
+
var ChatState = class {
|
|
144
|
+
/** Empty until the first snapshot arrives. */
|
|
145
|
+
title = "";
|
|
146
|
+
/** The model and reasoning level, which anyone in the profile can change. Null until then. */
|
|
147
|
+
model = null;
|
|
148
|
+
messages = [];
|
|
149
|
+
queued = [];
|
|
150
|
+
running = false;
|
|
151
|
+
error = null;
|
|
152
|
+
live = [];
|
|
153
|
+
toolOutput = null;
|
|
154
|
+
/** Background commands and subagents still working for this chat. */
|
|
155
|
+
background = [];
|
|
156
|
+
/** What the note-taker saved from this chat, each shown after the last message it read. */
|
|
157
|
+
memory = [];
|
|
158
|
+
connected = false;
|
|
159
|
+
loaded = false;
|
|
160
|
+
#results = derived(() => Object.fromEntries(this.messages.flatMap((m) => m.kind === "tool_results" ? m.results.map((r) => [r.id, r]) : [])));
|
|
161
|
+
get results() {
|
|
162
|
+
return this.#results();
|
|
163
|
+
}
|
|
164
|
+
set results($$value) {
|
|
165
|
+
return this.#results($$value);
|
|
166
|
+
}
|
|
167
|
+
apply(event) {
|
|
168
|
+
switch (event.type) {
|
|
169
|
+
case "snapshot":
|
|
170
|
+
this.title = event.snapshot.title;
|
|
171
|
+
this.model = event.snapshot.model;
|
|
172
|
+
this.messages = event.snapshot.messages;
|
|
173
|
+
this.queued = event.snapshot.queued;
|
|
174
|
+
this.running = event.snapshot.running;
|
|
175
|
+
this.error = event.snapshot.error;
|
|
176
|
+
this.live = event.snapshot.live;
|
|
177
|
+
this.toolOutput = event.snapshot.toolOutput;
|
|
178
|
+
this.background = event.snapshot.background;
|
|
179
|
+
this.memory = event.snapshot.memory;
|
|
180
|
+
this.loaded = true;
|
|
181
|
+
break;
|
|
182
|
+
case "title":
|
|
183
|
+
this.title = event.title;
|
|
184
|
+
break;
|
|
185
|
+
case "model":
|
|
186
|
+
this.model = event.model;
|
|
187
|
+
break;
|
|
188
|
+
case "background":
|
|
189
|
+
this.background = event.background;
|
|
190
|
+
break;
|
|
191
|
+
case "memory":
|
|
192
|
+
this.memory = event.memory;
|
|
193
|
+
break;
|
|
194
|
+
case "status":
|
|
195
|
+
this.running = event.running;
|
|
196
|
+
this.error = event.error;
|
|
197
|
+
break;
|
|
198
|
+
case "queued":
|
|
199
|
+
this.queued = event.queued;
|
|
200
|
+
break;
|
|
201
|
+
case "message":
|
|
202
|
+
if (event.replacesLive) {
|
|
203
|
+
this.live = [];
|
|
204
|
+
this.toolOutput = null;
|
|
205
|
+
}
|
|
206
|
+
if (!this.messages.some((m) => m.id === event.message.id)) this.messages.push(event.message);
|
|
207
|
+
break;
|
|
208
|
+
case "live_block":
|
|
209
|
+
this.live[event.index] = event.block;
|
|
210
|
+
break;
|
|
211
|
+
case "live_delta": {
|
|
212
|
+
const block = this.live[event.index];
|
|
213
|
+
if (block) block.text += event.text;
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
case "live_clear":
|
|
217
|
+
this.live = [];
|
|
218
|
+
this.toolOutput = null;
|
|
219
|
+
break;
|
|
220
|
+
case "tool_output":
|
|
221
|
+
if (this.toolOutput?.id !== event.id) this.toolOutput = {
|
|
222
|
+
id: event.id,
|
|
223
|
+
text: ""
|
|
224
|
+
};
|
|
225
|
+
this.toolOutput.text += event.chunk;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
/** Opens the event stream. EventSource reconnects by itself; each reconnect starts with a snapshot. */
|
|
229
|
+
connect(conversationId) {
|
|
230
|
+
const source = new EventSource(`/api/c/${conversationId}/events`);
|
|
231
|
+
source.onopen = () => this.connected = true;
|
|
232
|
+
source.onerror = () => this.connected = false;
|
|
233
|
+
source.onmessage = (event) => this.apply(JSON.parse(event.data));
|
|
234
|
+
return () => source.close();
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region src/lib/commands.ts
|
|
239
|
+
/** The command's first line, for the compact technical label. */
|
|
240
|
+
function firstLine(command, max = 120) {
|
|
241
|
+
const line = command.trim().split("\n")[0];
|
|
242
|
+
return line.length > max ? line.slice(0, max) + "…" : line;
|
|
243
|
+
}
|
|
244
|
+
/** Reads one string field out of tool input JSON that may still be streaming in. */
|
|
245
|
+
function partialString(json, key) {
|
|
246
|
+
const match = json.match(new RegExp(`"${key}"\\s*:\\s*"((?:[^"\\\\]|\\\\.)*)`));
|
|
247
|
+
if (!match) return null;
|
|
248
|
+
for (let cut = 0; cut <= 5; cut++) try {
|
|
249
|
+
return JSON.parse(`"${match[1].slice(0, match[1].length - cut)}"`);
|
|
250
|
+
} catch {}
|
|
251
|
+
return match[1];
|
|
252
|
+
}
|
|
253
|
+
/** The fields of a `run_command` call whose input JSON is still streaming in. */
|
|
254
|
+
function partialToolInput(json) {
|
|
255
|
+
let input = null;
|
|
256
|
+
try {
|
|
257
|
+
input = JSON.parse(json);
|
|
258
|
+
} catch {}
|
|
259
|
+
const field = (key) => {
|
|
260
|
+
const value = input ? input[key] : partialString(json, key);
|
|
261
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
262
|
+
};
|
|
263
|
+
const icon = input ? field("icon") : json.match(/"icon"\s*:\s*"([^"\\]+)"/)?.[1] ?? null;
|
|
264
|
+
return {
|
|
265
|
+
command: field("command"),
|
|
266
|
+
summary: field("summary"),
|
|
267
|
+
icon
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/lib/transcript.ts
|
|
272
|
+
/** Messages that aren't nolune's: each one ends the reply before it. */
|
|
273
|
+
function messageEntry(message) {
|
|
274
|
+
const key = `m${message.id}`;
|
|
275
|
+
switch (message.kind) {
|
|
276
|
+
case "human": return {
|
|
277
|
+
type: "human",
|
|
278
|
+
key,
|
|
279
|
+
message
|
|
280
|
+
};
|
|
281
|
+
case "trigger": return {
|
|
282
|
+
type: "trigger",
|
|
283
|
+
key,
|
|
284
|
+
message
|
|
285
|
+
};
|
|
286
|
+
case "agent_message": return {
|
|
287
|
+
type: "agent_message",
|
|
288
|
+
key,
|
|
289
|
+
message
|
|
290
|
+
};
|
|
291
|
+
case "task_result": return {
|
|
292
|
+
type: "task_result",
|
|
293
|
+
key,
|
|
294
|
+
message
|
|
295
|
+
};
|
|
296
|
+
default: return null;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
function addUsage(total, u) {
|
|
300
|
+
if (!u) return total;
|
|
301
|
+
if (!total) return { ...u };
|
|
302
|
+
return {
|
|
303
|
+
input: total.input + u.input,
|
|
304
|
+
cacheRead: total.cacheRead + u.cacheRead,
|
|
305
|
+
cacheWrite: total.cacheWrite + u.cacheWrite,
|
|
306
|
+
output: total.output + u.output
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function buildTranscript(messages, live, running, memory = []) {
|
|
310
|
+
const entries = [];
|
|
311
|
+
let reply = null;
|
|
312
|
+
/** Keys replies by what they answer, so a reply keeps its key when its live part is saved. */
|
|
313
|
+
let anchor = "start";
|
|
314
|
+
let previousAt = 0;
|
|
315
|
+
const looks = [...memory].sort((a, b) => a.after - b.after);
|
|
316
|
+
/** The note-taker's looks at the chat before message `id`, each after the last one it read. */
|
|
317
|
+
const addLooks = (id) => {
|
|
318
|
+
while (looks.length && looks[0].after < id) {
|
|
319
|
+
const look = looks.shift();
|
|
320
|
+
const key = `memory-${look.after}`;
|
|
321
|
+
entries.push({
|
|
322
|
+
type: "memory",
|
|
323
|
+
key,
|
|
324
|
+
look
|
|
325
|
+
});
|
|
326
|
+
reply = null;
|
|
327
|
+
anchor = key;
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
const openReply = () => {
|
|
331
|
+
if (!reply) {
|
|
332
|
+
reply = {
|
|
333
|
+
type: "reply",
|
|
334
|
+
key: `reply-${anchor}`,
|
|
335
|
+
parts: [],
|
|
336
|
+
messageIds: [],
|
|
337
|
+
usage: null,
|
|
338
|
+
stopReasons: [],
|
|
339
|
+
models: [],
|
|
340
|
+
live: false
|
|
341
|
+
};
|
|
342
|
+
entries.push(reply);
|
|
343
|
+
}
|
|
344
|
+
return reply;
|
|
345
|
+
};
|
|
346
|
+
const addStep = (r, step, at) => {
|
|
347
|
+
const last = r.parts.at(-1);
|
|
348
|
+
if (last?.type === "activity") {
|
|
349
|
+
last.steps.push(step);
|
|
350
|
+
last.endedAt = Math.max(last.endedAt, at);
|
|
351
|
+
} else r.parts.push({
|
|
352
|
+
type: "activity",
|
|
353
|
+
key: `${r.key}-${r.parts.length}`,
|
|
354
|
+
steps: [step],
|
|
355
|
+
startedAt: previousAt || at,
|
|
356
|
+
endedAt: at
|
|
357
|
+
});
|
|
358
|
+
};
|
|
359
|
+
const addText = (r, text, media) => {
|
|
360
|
+
r.parts.push({
|
|
361
|
+
type: "text",
|
|
362
|
+
key: `${r.key}-${r.parts.length}`,
|
|
363
|
+
text,
|
|
364
|
+
...media
|
|
365
|
+
});
|
|
366
|
+
};
|
|
367
|
+
for (const message of messages) {
|
|
368
|
+
addLooks(message.id);
|
|
369
|
+
const entry = messageEntry(message);
|
|
370
|
+
if (entry) {
|
|
371
|
+
reply = null;
|
|
372
|
+
anchor = String(message.id);
|
|
373
|
+
entries.push(entry);
|
|
374
|
+
} else if (message.kind === "assistant") {
|
|
375
|
+
const r = openReply();
|
|
376
|
+
r.messageIds.push(message.id);
|
|
377
|
+
r.usage = addUsage(r.usage, message.usage);
|
|
378
|
+
if (message.stopReason) r.stopReasons.push(message.stopReason);
|
|
379
|
+
if (message.model && r.models.at(-1) !== message.model) r.models.push(message.model);
|
|
380
|
+
for (const block of message.blocks) if (block.type === "text") addText(r, block.text, { media: message.media });
|
|
381
|
+
else if (block.type === "thinking") addStep(r, block, message.createdAt);
|
|
382
|
+
else addStep(r, {
|
|
383
|
+
type: "command",
|
|
384
|
+
id: block.id,
|
|
385
|
+
command: block.command,
|
|
386
|
+
cwd: block.cwd,
|
|
387
|
+
summary: block.summary ?? null,
|
|
388
|
+
icon: block.icon ?? null
|
|
389
|
+
}, message.createdAt);
|
|
390
|
+
} else if (message.kind === "tool_results" && reply) {
|
|
391
|
+
const last = reply.parts.at(-1);
|
|
392
|
+
if (last?.type === "activity") last.endedAt = Math.max(last.endedAt, message.createdAt);
|
|
393
|
+
}
|
|
394
|
+
previousAt = message.createdAt;
|
|
395
|
+
}
|
|
396
|
+
addLooks(Infinity);
|
|
397
|
+
const streaming = live.filter((b) => b !== null);
|
|
398
|
+
if (streaming.length || running) {
|
|
399
|
+
const r = openReply();
|
|
400
|
+
const now = Date.now();
|
|
401
|
+
for (const block of streaming) if (block.type === "text") addText(r, block.text, { pending: true });
|
|
402
|
+
else if (block.type === "thinking") addStep(r, {
|
|
403
|
+
type: "thinking",
|
|
404
|
+
text: block.text
|
|
405
|
+
}, now);
|
|
406
|
+
else if (block.id) addStep(r, {
|
|
407
|
+
type: "command",
|
|
408
|
+
id: block.id,
|
|
409
|
+
...partialToolInput(block.text)
|
|
410
|
+
}, now);
|
|
411
|
+
r.live = running;
|
|
412
|
+
}
|
|
413
|
+
return entries;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* What work in progress is doing, as its collapsed group says it: the summary of the command that
|
|
417
|
+
* is running, or Thinking. The live avatar shows the same on hover.
|
|
418
|
+
*/
|
|
419
|
+
function activeStepLabel(part, results, technical, m) {
|
|
420
|
+
const last = part.steps.at(-1);
|
|
421
|
+
if (last?.type === "command" && !results[last.id]) {
|
|
422
|
+
if (technical && last.command) return m.steps.running(firstLine(last.command, 80));
|
|
423
|
+
return last.summary ?? m.steps.runningACommand;
|
|
424
|
+
}
|
|
425
|
+
return m.steps.thinking;
|
|
426
|
+
}
|
|
427
|
+
/** The reply's visible text, for the copy button. */
|
|
428
|
+
function replyText(reply) {
|
|
429
|
+
return reply.parts.flatMap((p) => p.type === "text" ? [p.text.trim()] : []).join("\n\n").trim();
|
|
430
|
+
}
|
|
431
|
+
function formatDuration(ms, m) {
|
|
432
|
+
const seconds = Math.round(ms / 1e3);
|
|
433
|
+
if (seconds < 1) return null;
|
|
434
|
+
if (seconds < 60) return m.time.seconds(seconds);
|
|
435
|
+
const minutes = Math.floor(seconds / 60);
|
|
436
|
+
if (minutes < 60) return m.time.minutesSeconds(minutes, seconds % 60);
|
|
437
|
+
return m.time.hoursMinutes(Math.floor(minutes / 60), minutes % 60);
|
|
438
|
+
}
|
|
439
|
+
/** How a finished command ended. */
|
|
440
|
+
function resultStatus(result) {
|
|
441
|
+
if (!result.isError) return "done";
|
|
442
|
+
return /Stopped by [^\n]*$/.test(result.output) ? "stopped" : "failed";
|
|
443
|
+
}
|
|
444
|
+
//#endregion
|
|
445
|
+
//#region src/lib/components/chat/PictureButton.svelte
|
|
446
|
+
function PictureButton($$renderer, $$props) {
|
|
447
|
+
$$renderer.component(($$renderer) => {
|
|
448
|
+
let { conversationId, picture } = $$props;
|
|
449
|
+
const { m } = getI18n();
|
|
450
|
+
/** Pictures in the chat are at most this tall; the viewer shows them full size. */
|
|
451
|
+
const MAX_HEIGHT = 192;
|
|
452
|
+
const url = derived(() => resolve("/api/c/[id]/media/[mediaId]", {
|
|
453
|
+
id: conversationId,
|
|
454
|
+
mediaId: picture.id
|
|
455
|
+
}));
|
|
456
|
+
/** The size it's shown at, so the chat doesn't jump while it loads. */
|
|
457
|
+
const size = derived(() => {
|
|
458
|
+
if (!picture.width || !picture.height) return {};
|
|
459
|
+
const scale = Math.min(1, MAX_HEIGHT / picture.height);
|
|
460
|
+
return {
|
|
461
|
+
width: Math.round(picture.width * scale),
|
|
462
|
+
height: Math.round(picture.height * scale)
|
|
463
|
+
};
|
|
464
|
+
});
|
|
465
|
+
$$renderer.push(`<button type="button" data-media-view=""${attr("data-name", picture.name)}${attr("data-download", `${stringify(url())}?download`)}${attr("aria-label", m.attachments.open(picture.name))} class="block max-w-full cursor-zoom-in overflow-hidden rounded-xl border"><img${attributes({
|
|
466
|
+
src: url(),
|
|
467
|
+
alt: picture.name,
|
|
468
|
+
...size(),
|
|
469
|
+
loading: "lazy",
|
|
470
|
+
decoding: "async",
|
|
471
|
+
class: "block h-auto max-h-48 max-w-full bg-muted"
|
|
472
|
+
})} onload="this.__e=event" onerror="this.__e=event"/></button>`);
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region src/lib/components/chat/CommandStep.svelte
|
|
477
|
+
function CommandStep($$renderer, $$props) {
|
|
478
|
+
$$renderer.component(($$renderer) => {
|
|
479
|
+
/** What the model said the command does, in plain words. */
|
|
480
|
+
/** Output streamed so far while the command runs. */
|
|
481
|
+
/** The agent is still working, so a command without a result is running, not abandoned. */
|
|
482
|
+
let { conversationId, command, cwd, summary, result, liveOutput, running } = $$props;
|
|
483
|
+
const prefs = getPreferences();
|
|
484
|
+
const { m } = getI18n();
|
|
485
|
+
let open = false;
|
|
486
|
+
const status = derived(() => result ? resultStatus(result) : running ? "running" : "not run");
|
|
487
|
+
/** Calls from before the model wrote summaries have none. */
|
|
488
|
+
const label = derived(() => summary ?? (command === null ? m.steps.gettingReady : status() === "running" ? m.steps.runningACommand : m.steps.ranACommand));
|
|
489
|
+
const output = derived(() => result?.output ?? liveOutput ?? "");
|
|
490
|
+
/** The technical label already shows a short command in full. */
|
|
491
|
+
const showCommand = derived(() => !prefs.technical || !command || command !== firstLine(command));
|
|
492
|
+
let $$settled = true;
|
|
493
|
+
let $$inner_renderer;
|
|
494
|
+
function $$render_inner($$renderer) {
|
|
495
|
+
if (Collapsible) {
|
|
496
|
+
$$renderer.push("<!--[-->");
|
|
497
|
+
Collapsible($$renderer, {
|
|
498
|
+
get open() {
|
|
499
|
+
return open;
|
|
500
|
+
},
|
|
501
|
+
set open($$value) {
|
|
502
|
+
open = $$value;
|
|
503
|
+
$$settled = false;
|
|
504
|
+
},
|
|
505
|
+
children: ($$renderer) => {
|
|
506
|
+
if (Collapsible_trigger) {
|
|
507
|
+
$$renderer.push("<!--[-->");
|
|
508
|
+
Collapsible_trigger($$renderer, {
|
|
509
|
+
class: "group/step flex w-full min-w-0 items-center gap-2 rounded-lg py-0.5 text-left text-sm text-muted-foreground hover:text-foreground",
|
|
510
|
+
children: ($$renderer) => {
|
|
511
|
+
if (prefs.technical) $$renderer.push(`<!--[0--><span class="min-w-0 truncate font-mono text-xs">${escape_html(command === null ? m.steps.preparing : `$ ${firstLine(command)}`)}</span>`);
|
|
512
|
+
else $$renderer.push(`<!--[-1--><span class="min-w-0 truncate">${escape_html(label())}</span>`);
|
|
513
|
+
$$renderer.push(`<!--]--> `);
|
|
514
|
+
if (status() === "running") {
|
|
515
|
+
$$renderer.push("<!--[0-->");
|
|
516
|
+
Loader_circle($$renderer, { class: "size-3.5 shrink-0 animate-spin" });
|
|
517
|
+
} else if (status() === "failed") $$renderer.push(`<!--[1--><span class="shrink-0 text-xs text-destructive">${escape_html(prefs.technical ? m.steps.failed : m.steps.didntWork)}</span>`);
|
|
518
|
+
else if (status() === "stopped" || status() === "not run") $$renderer.push(`<!--[2--><span class="shrink-0 text-xs">${escape_html(status() === "stopped" ? m.steps.statusStopped : m.steps.statusNotRun)}</span>`);
|
|
519
|
+
else $$renderer.push("<!--[-1-->");
|
|
520
|
+
$$renderer.push(`<!--]--> `);
|
|
521
|
+
Chevron_right($$renderer, { class: "size-3.5 shrink-0 opacity-0 transition-transform group-hover/step:opacity-100 group-data-[state=open]/step:rotate-90 group-data-[state=open]/step:opacity-100" });
|
|
522
|
+
$$renderer.push(`<!---->`);
|
|
523
|
+
},
|
|
524
|
+
$$slots: { default: true }
|
|
525
|
+
});
|
|
526
|
+
$$renderer.push("<!--]-->");
|
|
527
|
+
} else {
|
|
528
|
+
$$renderer.push("<!--[!-->");
|
|
529
|
+
$$renderer.push("<!--]-->");
|
|
530
|
+
}
|
|
531
|
+
$$renderer.push(` `);
|
|
532
|
+
if (Collapsible_content) {
|
|
533
|
+
$$renderer.push("<!--[-->");
|
|
534
|
+
Collapsible_content($$renderer, {
|
|
535
|
+
children: ($$renderer) => {
|
|
536
|
+
$$renderer.push(`<div class="mt-2 mb-1 overflow-hidden rounded-xl border bg-muted/40 text-xs"><div class="border-b px-3 py-1.5 text-muted-foreground">${escape_html(prefs.technical ? summary ?? m.steps.command : m.steps.theCommand)}</div> `);
|
|
537
|
+
if (showCommand()) $$renderer.push(`<!--[0--><pre class="overflow-x-auto border-b px-3 py-2 font-mono break-all whitespace-pre-wrap">${escape_html(command ?? "…")}</pre>`);
|
|
538
|
+
else $$renderer.push("<!--[-1-->");
|
|
539
|
+
$$renderer.push(`<!--]--> `);
|
|
540
|
+
if (cwd && prefs.technical) $$renderer.push(`<!--[0--><div class="border-b px-3 py-1.5 font-mono text-muted-foreground">${escape_html(m.steps.inFolder(cwd))}</div>`);
|
|
541
|
+
else $$renderer.push("<!--[-1-->");
|
|
542
|
+
$$renderer.push(`<!--]--> <pre${attr_class(clsx(cn("max-h-72 overflow-auto px-3 py-2 font-mono break-all whitespace-pre-wrap", status() === "failed" ? "text-destructive" : "text-muted-foreground")))}>${escape_html(output() || (status() === "running" ? m.steps.noOutputYet : m.steps.noOutput))}</pre> `);
|
|
543
|
+
if (result?.pictures.length) {
|
|
544
|
+
$$renderer.push(`<!--[0--><div class="flex flex-wrap gap-1.5 border-t px-3 py-2"><!--[-->`);
|
|
545
|
+
const each_array = ensure_array_like(result.pictures);
|
|
546
|
+
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
547
|
+
let picture = each_array[$$index];
|
|
548
|
+
PictureButton($$renderer, {
|
|
549
|
+
conversationId,
|
|
550
|
+
picture
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
$$renderer.push(`<!--]--></div>`);
|
|
554
|
+
} else $$renderer.push("<!--[-1-->");
|
|
555
|
+
$$renderer.push(`<!--]--></div>`);
|
|
556
|
+
},
|
|
557
|
+
$$slots: { default: true }
|
|
558
|
+
});
|
|
559
|
+
$$renderer.push("<!--]-->");
|
|
560
|
+
} else {
|
|
561
|
+
$$renderer.push("<!--[!-->");
|
|
562
|
+
$$renderer.push("<!--]-->");
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
$$slots: { default: true }
|
|
566
|
+
});
|
|
567
|
+
$$renderer.push("<!--]-->");
|
|
568
|
+
} else {
|
|
569
|
+
$$renderer.push("<!--[!-->");
|
|
570
|
+
$$renderer.push("<!--]-->");
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
do {
|
|
574
|
+
$$settled = true;
|
|
575
|
+
$$inner_renderer = $$renderer.copy();
|
|
576
|
+
$$render_inner($$inner_renderer);
|
|
577
|
+
} while (!$$settled);
|
|
578
|
+
$$renderer.subsume($$inner_renderer);
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
//#endregion
|
|
582
|
+
//#region src/lib/components/chat/Activity.svelte
|
|
583
|
+
function Activity($$renderer, $$props) {
|
|
584
|
+
$$renderer.component(($$renderer) => {
|
|
585
|
+
/** This is the work happening right now. */
|
|
586
|
+
/** The agent is running (commands without a result are still to come, not abandoned). */
|
|
587
|
+
let { conversationId, part, results, toolOutput, active, running } = $$props;
|
|
588
|
+
const prefs = getPreferences();
|
|
589
|
+
const { m } = getI18n();
|
|
590
|
+
/** Set once the reader opens or closes the group; until then the preference decides. */
|
|
591
|
+
let choice = null;
|
|
592
|
+
const open = derived(() => choice ?? prefs.expandSteps);
|
|
593
|
+
const commands = derived(() => part.steps.filter((s) => s.type === "command"));
|
|
594
|
+
const failed = derived(() => commands().filter((c) => results[c.id] && resultStatus(results[c.id]) === "failed").length);
|
|
595
|
+
const stopped = derived(() => commands().some((c) => results[c.id] && resultStatus(results[c.id]) === "stopped"));
|
|
596
|
+
/** The last pictures its commands looked at (`nolune view`), shown while it's folded. */
|
|
597
|
+
const pictures = derived(() => commands().flatMap((c) => results[c.id]?.pictures ?? []).slice(-3));
|
|
598
|
+
const label = derived(() => {
|
|
599
|
+
if (active) return activeStepLabel(part, results, prefs.technical, m);
|
|
600
|
+
if (stopped()) return m.steps.stopped;
|
|
601
|
+
const duration = formatDuration(part.endedAt - part.startedAt, m);
|
|
602
|
+
if (commands().length === 0) return duration ? m.steps.thoughtFor(duration) : m.steps.thoughtForAMoment;
|
|
603
|
+
if (prefs.technical) {
|
|
604
|
+
const ran = m.steps.ranCommands(commands().length);
|
|
605
|
+
return duration ? `${ran} · ${duration}` : ran;
|
|
606
|
+
}
|
|
607
|
+
return duration ? m.steps.workedFor(duration) : m.steps.workedForAMoment;
|
|
608
|
+
});
|
|
609
|
+
let $$settled = true;
|
|
610
|
+
let $$inner_renderer;
|
|
611
|
+
function $$render_inner($$renderer) {
|
|
612
|
+
var bind_get = () => open();
|
|
613
|
+
var bind_set = (value) => choice = value;
|
|
614
|
+
if (Collapsible) {
|
|
615
|
+
$$renderer.push("<!--[-->");
|
|
616
|
+
Collapsible($$renderer, {
|
|
617
|
+
get open() {
|
|
618
|
+
return bind_get();
|
|
619
|
+
},
|
|
620
|
+
set open($$value) {
|
|
621
|
+
bind_set($$value);
|
|
622
|
+
},
|
|
623
|
+
children: ($$renderer) => {
|
|
624
|
+
if (Collapsible_trigger) {
|
|
625
|
+
$$renderer.push("<!--[-->");
|
|
626
|
+
Collapsible_trigger($$renderer, {
|
|
627
|
+
class: "group/activity flex max-w-full min-w-0 items-center gap-1 text-sm text-muted-foreground hover:text-foreground",
|
|
628
|
+
children: ($$renderer) => {
|
|
629
|
+
$$renderer.push(`<span${attr_class(clsx(cn("min-w-0 truncate", active && "thinking-shimmer", active && prefs.technical && "font-mono")))}>${escape_html(label())}</span> `);
|
|
630
|
+
if (failed() && !active && prefs.technical) $$renderer.push(`<!--[0--><span class="shrink-0 text-destructive">· ${escape_html(m.steps.failedCount(failed()))}</span>`);
|
|
631
|
+
else $$renderer.push("<!--[-1-->");
|
|
632
|
+
$$renderer.push(`<!--]--> `);
|
|
633
|
+
if (!open() && pictures().length) {
|
|
634
|
+
$$renderer.push(`<!--[0--><span class="flex shrink-0 items-center gap-1" aria-hidden="true"><span class="mr-0.5">·</span> <!--[-->`);
|
|
635
|
+
const each_array = ensure_array_like(pictures());
|
|
636
|
+
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
637
|
+
let picture = each_array[$$index];
|
|
638
|
+
$$renderer.push(`<img${attr("src", resolve("/api/c/[id]/media/[mediaId]", {
|
|
639
|
+
id: conversationId,
|
|
640
|
+
mediaId: picture.id
|
|
641
|
+
}))} alt="" loading="lazy" decoding="async" class="h-6 w-9 rounded border bg-muted object-cover"/>`);
|
|
642
|
+
}
|
|
643
|
+
$$renderer.push(`<!--]--></span>`);
|
|
644
|
+
} else $$renderer.push("<!--[-1-->");
|
|
645
|
+
$$renderer.push(`<!--]--> `);
|
|
646
|
+
Chevron_right($$renderer, { class: "size-4 shrink-0 transition-transform group-data-[state=open]/activity:rotate-90" });
|
|
647
|
+
$$renderer.push(`<!---->`);
|
|
648
|
+
},
|
|
649
|
+
$$slots: { default: true }
|
|
650
|
+
});
|
|
651
|
+
$$renderer.push("<!--]-->");
|
|
652
|
+
} else {
|
|
653
|
+
$$renderer.push("<!--[!-->");
|
|
654
|
+
$$renderer.push("<!--]-->");
|
|
655
|
+
}
|
|
656
|
+
$$renderer.push(` `);
|
|
657
|
+
if (Collapsible_content) {
|
|
658
|
+
$$renderer.push("<!--[-->");
|
|
659
|
+
Collapsible_content($$renderer, {
|
|
660
|
+
children: ($$renderer) => {
|
|
661
|
+
$$renderer.push(`<ol class="relative mt-3 mb-1 space-y-3 pl-7 before:absolute before:top-2.5 before:bottom-2.5 before:left-[9px] before:w-px before:bg-border"><!--[-->`);
|
|
662
|
+
const each_array_1 = ensure_array_like(part.steps);
|
|
663
|
+
for (let i = 0, $$length = each_array_1.length; i < $$length; i++) {
|
|
664
|
+
let step = each_array_1[i];
|
|
665
|
+
$$renderer.push(`<li class="relative min-w-0"><span class="absolute top-0.5 -left-7 flex size-5 items-center justify-center bg-background text-muted-foreground">`);
|
|
666
|
+
if (step.type === "command") {
|
|
667
|
+
$$renderer.push("<!--[0-->");
|
|
668
|
+
StepIcon($$renderer, {
|
|
669
|
+
name: step.icon,
|
|
670
|
+
class: "size-3.5"
|
|
671
|
+
});
|
|
672
|
+
} else $$renderer.push(`<!--[-1--><span class="size-1.5 rounded-full bg-muted-foreground/60"></span>`);
|
|
673
|
+
$$renderer.push(`<!--]--></span> `);
|
|
674
|
+
if (step.type === "thinking") {
|
|
675
|
+
$$renderer.push("<!--[0-->");
|
|
676
|
+
if (step.text.trim()) {
|
|
677
|
+
$$renderer.push("<!--[0-->");
|
|
678
|
+
Markdown($$renderer, {
|
|
679
|
+
text: step.text,
|
|
680
|
+
class: "text-sm leading-relaxed text-muted-foreground"
|
|
681
|
+
});
|
|
682
|
+
} else $$renderer.push(`<!--[-1--><span class="text-sm text-muted-foreground">${escape_html(m.steps.thinkingDots)}</span>`);
|
|
683
|
+
$$renderer.push(`<!--]-->`);
|
|
684
|
+
} else {
|
|
685
|
+
$$renderer.push("<!--[-1-->");
|
|
686
|
+
CommandStep($$renderer, {
|
|
687
|
+
conversationId,
|
|
688
|
+
command: step.command,
|
|
689
|
+
cwd: step.cwd,
|
|
690
|
+
summary: step.summary,
|
|
691
|
+
result: results[step.id],
|
|
692
|
+
liveOutput: toolOutput?.id === step.id ? toolOutput.text : null,
|
|
693
|
+
running
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
$$renderer.push(`<!--]--></li>`);
|
|
697
|
+
}
|
|
698
|
+
$$renderer.push(`<!--]--></ol>`);
|
|
699
|
+
},
|
|
700
|
+
$$slots: { default: true }
|
|
701
|
+
});
|
|
702
|
+
$$renderer.push("<!--]-->");
|
|
703
|
+
} else {
|
|
704
|
+
$$renderer.push("<!--[!-->");
|
|
705
|
+
$$renderer.push("<!--]-->");
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
$$slots: { default: true }
|
|
709
|
+
});
|
|
710
|
+
$$renderer.push("<!--]-->");
|
|
711
|
+
} else {
|
|
712
|
+
$$renderer.push("<!--[!-->");
|
|
713
|
+
$$renderer.push("<!--]-->");
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
do {
|
|
717
|
+
$$settled = true;
|
|
718
|
+
$$inner_renderer = $$renderer.copy();
|
|
719
|
+
$$render_inner($$inner_renderer);
|
|
720
|
+
} while (!$$settled);
|
|
721
|
+
$$renderer.subsume($$inner_renderer);
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
//#endregion
|
|
725
|
+
//#region src/lib/components/chat/MemoryLook.svelte
|
|
726
|
+
function MemoryLook($$renderer, $$props) {
|
|
727
|
+
$$renderer.component(($$renderer) => {
|
|
728
|
+
/**
|
|
729
|
+
* What nolune saved to memory by itself once the chat went quiet, after the last message it read:
|
|
730
|
+
* a folded line, and each change with its note and Undo. Undoing shows here live.
|
|
731
|
+
*/
|
|
732
|
+
let { look, slug } = $$props;
|
|
733
|
+
const { m } = getI18n();
|
|
734
|
+
const t = derived(() => m.memory.changes);
|
|
735
|
+
const allUndone = derived(() => look.changes.every((change) => change.undone));
|
|
736
|
+
if (Collapsible) {
|
|
737
|
+
$$renderer.push("<!--[-->");
|
|
738
|
+
Collapsible($$renderer, {
|
|
739
|
+
class: "rounded-2xl border px-4 py-2.5 text-sm",
|
|
740
|
+
children: ($$renderer) => {
|
|
741
|
+
if (Collapsible_trigger) {
|
|
742
|
+
$$renderer.push("<!--[-->");
|
|
743
|
+
Collapsible_trigger($$renderer, {
|
|
744
|
+
class: "group/memory flex w-full min-w-0 items-center gap-1.5 text-left text-xs font-medium text-muted-foreground hover:text-foreground",
|
|
745
|
+
children: ($$renderer) => {
|
|
746
|
+
Brain($$renderer, { class: "size-3.5 shrink-0" });
|
|
747
|
+
$$renderer.push(`<!----> <span${attr_class(clsx(cn("min-w-0 truncate", allUndone() && "line-through")))}>${escape_html(t().saved(look.changes.length))}</span> `);
|
|
748
|
+
Chevron_right($$renderer, { class: "size-3.5 shrink-0 transition-transform group-data-[state=open]/memory:rotate-90" });
|
|
749
|
+
$$renderer.push(`<!---->`);
|
|
750
|
+
},
|
|
751
|
+
$$slots: { default: true }
|
|
752
|
+
});
|
|
753
|
+
$$renderer.push("<!--]-->");
|
|
754
|
+
} else {
|
|
755
|
+
$$renderer.push("<!--[!-->");
|
|
756
|
+
$$renderer.push("<!--]-->");
|
|
757
|
+
}
|
|
758
|
+
$$renderer.push(` `);
|
|
759
|
+
if (Collapsible_content) {
|
|
760
|
+
$$renderer.push("<!--[-->");
|
|
761
|
+
Collapsible_content($$renderer, {
|
|
762
|
+
children: ($$renderer) => {
|
|
763
|
+
$$renderer.push(`<ul class="mt-2.5 space-y-2.5 pb-1"><!--[-->`);
|
|
764
|
+
const each_array = ensure_array_like(look.changes);
|
|
765
|
+
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
766
|
+
let change = each_array[$$index];
|
|
767
|
+
{
|
|
768
|
+
function note($$renderer, topic) {
|
|
769
|
+
$$renderer.push(`<a${attr("href", `${stringify(resolve("/p/[slug]/memory", { slug }))}#${stringify(memoryAnchor(change.note))}`)} class="underline-offset-2 hover:text-foreground hover:underline"${attr("aria-label", t().openNote(topic))}>${escape_html(topic)}</a>`);
|
|
770
|
+
}
|
|
771
|
+
MemoryChangeItem($$renderer, {
|
|
772
|
+
change,
|
|
773
|
+
slug,
|
|
774
|
+
note});
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
$$renderer.push(`<!--]--></ul>`);
|
|
778
|
+
},
|
|
779
|
+
$$slots: { default: true }
|
|
780
|
+
});
|
|
781
|
+
$$renderer.push("<!--]-->");
|
|
782
|
+
} else {
|
|
783
|
+
$$renderer.push("<!--[!-->");
|
|
784
|
+
$$renderer.push("<!--]-->");
|
|
785
|
+
}
|
|
786
|
+
},
|
|
787
|
+
$$slots: { default: true }
|
|
788
|
+
});
|
|
789
|
+
$$renderer.push("<!--]-->");
|
|
790
|
+
} else {
|
|
791
|
+
$$renderer.push("<!--[!-->");
|
|
792
|
+
$$renderer.push("<!--]-->");
|
|
793
|
+
}
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
//#endregion
|
|
797
|
+
//#region node_modules/.pnpm/@lucide+svelte@1.48.0_svelte@5.57.1_@typescript-eslint+types@8.70.1_/node_modules/@lucide/svelte/dist/icons/download.svelte
|
|
798
|
+
function Download($$renderer, $$props) {
|
|
799
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
800
|
+
Icon($$renderer, spread_props([props, { icon: {
|
|
801
|
+
"name": "download",
|
|
802
|
+
"size": 24,
|
|
803
|
+
"node": [
|
|
804
|
+
["path", { "d": "M12 15V3" }],
|
|
805
|
+
["path", { "d": "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }],
|
|
806
|
+
["path", { "d": "m7 10 5 5 5-5" }]
|
|
807
|
+
]
|
|
808
|
+
} }]));
|
|
809
|
+
}
|
|
810
|
+
//#endregion
|
|
811
|
+
//#region src/lib/components/chat/MediaViewer.svelte
|
|
812
|
+
function MediaViewer($$renderer, $$props) {
|
|
813
|
+
$$renderer.component(($$renderer) => {
|
|
814
|
+
let { picture = void 0 } = $$props;
|
|
815
|
+
const { m } = getI18n();
|
|
816
|
+
function restoreFocus(event) {
|
|
817
|
+
event.preventDefault();
|
|
818
|
+
}
|
|
819
|
+
if (Dialog) {
|
|
820
|
+
$$renderer.push("<!--[-->");
|
|
821
|
+
Dialog($$renderer, {
|
|
822
|
+
open: picture !== null,
|
|
823
|
+
onOpenChange: (open) => !open && (picture = null),
|
|
824
|
+
children: ($$renderer) => {
|
|
825
|
+
if (Dialog_content) {
|
|
826
|
+
$$renderer.push("<!--[-->");
|
|
827
|
+
Dialog_content($$renderer, {
|
|
828
|
+
onCloseAutoFocus: restoreFocus,
|
|
829
|
+
class: "max-h-[calc(100dvh-2rem)] gap-3 p-3 sm:max-w-[min(72rem,calc(100%-2rem))]",
|
|
830
|
+
children: ($$renderer) => {
|
|
831
|
+
if (picture) {
|
|
832
|
+
$$renderer.push("<!--[0-->");
|
|
833
|
+
if (Dialog_title) {
|
|
834
|
+
$$renderer.push("<!--[-->");
|
|
835
|
+
Dialog_title($$renderer, {
|
|
836
|
+
class: "sr-only",
|
|
837
|
+
children: ($$renderer) => {
|
|
838
|
+
$$renderer.push(`<!---->${escape_html(picture.alt || picture.name)}`);
|
|
839
|
+
},
|
|
840
|
+
$$slots: { default: true }
|
|
841
|
+
});
|
|
842
|
+
$$renderer.push("<!--]-->");
|
|
843
|
+
} else {
|
|
844
|
+
$$renderer.push("<!--[!-->");
|
|
845
|
+
$$renderer.push("<!--]-->");
|
|
846
|
+
}
|
|
847
|
+
$$renderer.push(` <img${attr("src", picture.src)}${attr("alt", picture.alt)} class="mx-auto max-h-[calc(100dvh-8rem)] w-auto max-w-full rounded-3xl object-contain"/> <div class="flex items-center gap-3 pl-3"><span class="min-w-0 flex-1 truncate text-muted-foreground">${escape_html(picture.alt || picture.name)}</span> <a${attr("href", picture.download)}${attr("download", picture.name)} rel="external"${attr_class(clsx(buttonVariants({
|
|
848
|
+
variant: "outline",
|
|
849
|
+
size: "sm"
|
|
850
|
+
})))}>`);
|
|
851
|
+
Download($$renderer, {});
|
|
852
|
+
$$renderer.push(`<!----> ${escape_html(m.attachments.download)}</a></div>`);
|
|
853
|
+
} else $$renderer.push("<!--[-1-->");
|
|
854
|
+
$$renderer.push(`<!--]-->`);
|
|
855
|
+
},
|
|
856
|
+
$$slots: { default: true }
|
|
857
|
+
});
|
|
858
|
+
$$renderer.push("<!--]-->");
|
|
859
|
+
} else {
|
|
860
|
+
$$renderer.push("<!--[!-->");
|
|
861
|
+
$$renderer.push("<!--]-->");
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
$$slots: { default: true }
|
|
865
|
+
});
|
|
866
|
+
$$renderer.push("<!--]-->");
|
|
867
|
+
} else {
|
|
868
|
+
$$renderer.push("<!--[!-->");
|
|
869
|
+
$$renderer.push("<!--]-->");
|
|
870
|
+
}
|
|
871
|
+
bind_props($$props, { picture });
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
//#endregion
|
|
875
|
+
//#region src/lib/components/chat/MessageAttachments.svelte
|
|
876
|
+
function MessageAttachments($$renderer, $$props) {
|
|
877
|
+
$$renderer.component(($$renderer) => {
|
|
878
|
+
let { conversationId, attachments } = $$props;
|
|
879
|
+
const i18n = getI18n();
|
|
880
|
+
const { m } = i18n;
|
|
881
|
+
function url(id) {
|
|
882
|
+
return resolve("/api/c/[id]/media/[mediaId]", {
|
|
883
|
+
id: conversationId,
|
|
884
|
+
mediaId: id
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
$$renderer.push(`<div class="flex max-w-[85%] flex-wrap justify-end gap-1.5 sm:max-w-[70%]"><!--[-->`);
|
|
888
|
+
const each_array = ensure_array_like(attachments);
|
|
889
|
+
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
890
|
+
let a = each_array[$$index];
|
|
891
|
+
$$renderer.push(`<div class="flex max-w-full flex-col items-end gap-1">`);
|
|
892
|
+
if (a.viewable) {
|
|
893
|
+
$$renderer.push("<!--[0-->");
|
|
894
|
+
PictureButton($$renderer, {
|
|
895
|
+
conversationId,
|
|
896
|
+
picture: a
|
|
897
|
+
});
|
|
898
|
+
} else {
|
|
899
|
+
$$renderer.push(`<!--[-1--><a${attr("href", `${stringify(url(a.id))}?download`)}${attr("download", a.name)} class="inline-flex max-w-full items-center gap-3 rounded-xl border px-3 py-2 leading-snug hover:bg-muted">`);
|
|
900
|
+
File($$renderer, { class: "size-5 shrink-0 text-muted-foreground" });
|
|
901
|
+
$$renderer.push(`<!----> <span class="min-w-0"><span class="block truncate text-sm font-medium">${escape_html(a.name)}</span> <span class="block truncate text-xs text-muted-foreground">${escape_html(formatBytes(a.bytes, i18n))}</span></span> `);
|
|
902
|
+
Download($$renderer, { class: "size-4 shrink-0 text-muted-foreground" });
|
|
903
|
+
$$renderer.push(`<!----></a>`);
|
|
904
|
+
}
|
|
905
|
+
$$renderer.push(`<!--]--> `);
|
|
906
|
+
if (a.note) $$renderer.push(`<!--[0--><span class="max-w-72 text-right text-xs text-muted-foreground">${escape_html(m.attachments.onlyPath(a.note))}</span>`);
|
|
907
|
+
else $$renderer.push("<!--[-1-->");
|
|
908
|
+
$$renderer.push(`<!--]--></div>`);
|
|
909
|
+
}
|
|
910
|
+
$$renderer.push(`<!--]--></div>`);
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
//#endregion
|
|
914
|
+
//#region src/lib/components/Chat.svelte
|
|
915
|
+
function Chat($$renderer, $$props) {
|
|
916
|
+
$$renderer.component(($$renderer) => {
|
|
917
|
+
/** Providers holding pictures and PDFs of this chat that another can't open. */
|
|
918
|
+
/** A background run nobody has continued yet. */
|
|
919
|
+
/** A subagent's own chat: only the agent that started it writes here. */
|
|
920
|
+
/** The models the chat can switch to. */
|
|
921
|
+
/** The profile's folders, and the one this chat is in. */
|
|
922
|
+
/** The profile's assistant avatar, shown with every reply. */
|
|
923
|
+
let { conversation, efforts, presets, defaultPresetId, me, folders, folderId, avatar } = $$props;
|
|
924
|
+
const prefs = getPreferences();
|
|
925
|
+
const { m } = getI18n();
|
|
926
|
+
/** Reasoning levels' names, for the dialog that asks before changing it. */
|
|
927
|
+
const effortLabels = m.model.efforts;
|
|
928
|
+
const chat = new ChatState();
|
|
929
|
+
let text = "";
|
|
930
|
+
const attachments = new Attachments(() => page.params.slug ?? "", m);
|
|
931
|
+
let sending = false;
|
|
932
|
+
let actionError = null;
|
|
933
|
+
let stickToBottom = true;
|
|
934
|
+
/** Sending a message turns a background run into a normal conversation. */
|
|
935
|
+
let continued = false;
|
|
936
|
+
let renaming = null;
|
|
937
|
+
let deleteOpen = false;
|
|
938
|
+
let creatingFolder = false;
|
|
939
|
+
const folder = derived(() => folders.find((f) => f.id === folderId));
|
|
940
|
+
let viewing = null;
|
|
941
|
+
/** The messages scroll under the composer, so they end this far up. */
|
|
942
|
+
let composerHeight = 160;
|
|
943
|
+
let textarea = null;
|
|
944
|
+
/** The model and reasoning level: anyone in the profile can change them, which arrives live. */
|
|
945
|
+
const model = derived(() => chat.model ?? {
|
|
946
|
+
presetId: conversation.presetId,
|
|
947
|
+
presetName: conversation.presetName,
|
|
948
|
+
provider: conversation.provider,
|
|
949
|
+
effort: conversation.effort,
|
|
950
|
+
contextWindow: conversation.contextWindow
|
|
951
|
+
});
|
|
952
|
+
/** A removed preset isn't in the list, but the chat still runs on its model: it shows as `current`. */
|
|
953
|
+
const listed = derived(() => presets.some((p) => p.id === model().presetId));
|
|
954
|
+
const menuPresets = derived(() => listed() ? presets : [{
|
|
955
|
+
id: "current",
|
|
956
|
+
name: model().presetName,
|
|
957
|
+
provider: model().provider
|
|
958
|
+
}, ...presets]);
|
|
959
|
+
/** A change waiting for the person to accept that the chat's cache starts over. */
|
|
960
|
+
let confirming = null;
|
|
961
|
+
/** The model menu, closed while a change is asked about so it doesn't show one not yet made. */
|
|
962
|
+
let modelMenuOpen = false;
|
|
963
|
+
const switchingTo = derived(() => {
|
|
964
|
+
const change = confirming;
|
|
965
|
+
return change && "presetId" in change ? presets.find((p) => p.id === change.presetId) : void 0;
|
|
966
|
+
});
|
|
967
|
+
const title = derived(() => chat.title || conversation.title || chat.messages.find((message) => message.kind === "human")?.text.slice(0, 80) || m.common.newChat);
|
|
968
|
+
run(() => conversation.title);
|
|
969
|
+
const entries = derived(() => buildTranscript(chat.messages, chat.live, chat.running, chat.memory));
|
|
970
|
+
/** The newest entry, past what the note-taker saved after it. */
|
|
971
|
+
const newest = derived(() => entries().findLast((entry) => entry.type !== "memory"));
|
|
972
|
+
/** Usage of the last reply, and summed over the whole conversation. */
|
|
973
|
+
const usage = derived(() => {
|
|
974
|
+
let last = null;
|
|
975
|
+
const total = {
|
|
976
|
+
input: 0,
|
|
977
|
+
cacheRead: 0,
|
|
978
|
+
cacheWrite: 0,
|
|
979
|
+
output: 0
|
|
980
|
+
};
|
|
981
|
+
for (const m of chat.messages) {
|
|
982
|
+
if (m.kind !== "assistant" || !m.usage) continue;
|
|
983
|
+
last = m.usage;
|
|
984
|
+
total.input += m.usage.input;
|
|
985
|
+
total.cacheRead += m.usage.cacheRead;
|
|
986
|
+
total.cacheWrite += m.usage.cacheWrite;
|
|
987
|
+
total.output += m.usage.output;
|
|
988
|
+
}
|
|
989
|
+
return last && {
|
|
990
|
+
last,
|
|
991
|
+
total
|
|
992
|
+
};
|
|
993
|
+
});
|
|
994
|
+
const contextUsed = derived(() => usage() && promptTokens(usage().last) + usage().last.output);
|
|
995
|
+
/**
|
|
996
|
+
* Replies whose request processed again what the previous request had cached, keyed by id.
|
|
997
|
+
* `expired`: the conversation sat idle past the cache's lifetime before that request.
|
|
998
|
+
*/
|
|
999
|
+
const cacheMisses = derived(() => {
|
|
1000
|
+
const misses = {};
|
|
1001
|
+
let previous = null;
|
|
1002
|
+
let resumedAt = 0;
|
|
1003
|
+
for (const m of chat.messages) {
|
|
1004
|
+
if (m.kind !== "assistant") {
|
|
1005
|
+
resumedAt = Math.max(resumedAt, m.createdAt);
|
|
1006
|
+
continue;
|
|
1007
|
+
}
|
|
1008
|
+
if (!m.usage) continue;
|
|
1009
|
+
if (previous) {
|
|
1010
|
+
const tokens = cacheMissTokens(previous.usage, m.usage);
|
|
1011
|
+
const expired = resumedAt - previous.at > cacheTtlMs(conversation.cacheTtl);
|
|
1012
|
+
if (tokens > 0) misses[m.id] = {
|
|
1013
|
+
tokens,
|
|
1014
|
+
expired
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
previous = {
|
|
1018
|
+
usage: m.usage,
|
|
1019
|
+
at: m.createdAt
|
|
1020
|
+
};
|
|
1021
|
+
resumedAt = 0;
|
|
1022
|
+
}
|
|
1023
|
+
return misses;
|
|
1024
|
+
});
|
|
1025
|
+
function cacheSummary(label, u) {
|
|
1026
|
+
return m.chat.cacheSummary(label, formatPercent(cacheHitRate(u)), formatTokens(u.cacheRead), formatTokens(u.cacheWrite), formatTokens(u.input));
|
|
1027
|
+
}
|
|
1028
|
+
/** Cache misses within one reply, which may span several model calls. */
|
|
1029
|
+
function replyMiss(reply) {
|
|
1030
|
+
const misses = reply.messageIds.flatMap((id) => cacheMisses()[id] ?? []);
|
|
1031
|
+
if (!misses.length) return null;
|
|
1032
|
+
return {
|
|
1033
|
+
tokens: misses.reduce((n, miss) => n + miss.tokens, 0),
|
|
1034
|
+
reason: misses.some((miss) => miss.expired) ? m.chat.cacheExpired(conversation.cacheTtl) : m.chat.cacheBroken
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
const unanswered = derived(() => !chat.running && chat.queued.length === 0 && chat.messages.length > 0 && chat.messages[chat.messages.length - 1].kind !== "assistant");
|
|
1038
|
+
/** The newest entry when it's a reply: its avatar shows what nolune is doing. Older ones hold still. */
|
|
1039
|
+
const liveReply = derived(() => newest()?.type === "reply" ? newest() : null);
|
|
1040
|
+
/** The step nolune is on while it runs, in the words its group of steps uses. */
|
|
1041
|
+
const step = derived(() => {
|
|
1042
|
+
const tail = chat.running ? liveReply()?.parts.at(-1) : void 0;
|
|
1043
|
+
if (!tail || tail.type === "text") return chat.running ? {
|
|
1044
|
+
label: tail ? m.chat.writing : m.chat.thinking,
|
|
1045
|
+
command: false
|
|
1046
|
+
} : null;
|
|
1047
|
+
const last = tail.steps.at(-1);
|
|
1048
|
+
return {
|
|
1049
|
+
label: activeStepLabel(tail, chat.results, prefs.technical, m),
|
|
1050
|
+
command: last?.type === "command" && !chat.results[last.id] && !chat.live.some((block) => block?.type === "tool" && block.id === last.id)
|
|
1051
|
+
};
|
|
1052
|
+
});
|
|
1053
|
+
const mood = derived(() => {
|
|
1054
|
+
if (chat.error || unanswered()) return "blocked";
|
|
1055
|
+
if (chat.running) {
|
|
1056
|
+
if (chat.queued.length) return "waiting";
|
|
1057
|
+
return step()?.command ? "working" : "thinking";
|
|
1058
|
+
}
|
|
1059
|
+
return "idle";
|
|
1060
|
+
});
|
|
1061
|
+
/** The response if the request went through; otherwise null, with the reason shown. */
|
|
1062
|
+
async function post(path, body) {
|
|
1063
|
+
actionError = null;
|
|
1064
|
+
const res = await fetch(`/api/c/${conversation.id}/${path}`, {
|
|
1065
|
+
method: "POST",
|
|
1066
|
+
headers: { "content-type": "application/json" },
|
|
1067
|
+
body: body === void 0 ? void 0 : JSON.stringify(body)
|
|
1068
|
+
});
|
|
1069
|
+
if (!res.ok) actionError = errorMessage(await res.text(), res.headers.get("content-type")) ?? m.errors.requestFailed(res.status);
|
|
1070
|
+
return res.ok ? res : null;
|
|
1071
|
+
}
|
|
1072
|
+
async function send() {
|
|
1073
|
+
const message = text.trim();
|
|
1074
|
+
const uploads = attachments.ids;
|
|
1075
|
+
if (!message && !uploads.length || sending || attachments.uploading) return;
|
|
1076
|
+
sending = true;
|
|
1077
|
+
stickToBottom = true;
|
|
1078
|
+
if (await post("messages", {
|
|
1079
|
+
text: message,
|
|
1080
|
+
uploads
|
|
1081
|
+
})) {
|
|
1082
|
+
text = "";
|
|
1083
|
+
attachments.clear();
|
|
1084
|
+
continued = true;
|
|
1085
|
+
invalidate();
|
|
1086
|
+
}
|
|
1087
|
+
sending = false;
|
|
1088
|
+
textarea?.focus();
|
|
1089
|
+
}
|
|
1090
|
+
async function move(target) {
|
|
1091
|
+
actionError = null;
|
|
1092
|
+
try {
|
|
1093
|
+
await moveChat(conversation.id, target);
|
|
1094
|
+
} catch (err) {
|
|
1095
|
+
actionError = err instanceof Error ? err.message : String(err);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Another model or reasoning level. Once the chat has a reply, its cache starts over with the
|
|
1100
|
+
* change, so that is asked first.
|
|
1101
|
+
*/
|
|
1102
|
+
function requestChange(change) {
|
|
1103
|
+
if ("presetId" in change ? change.presetId === model().presetId || change.presetId === "current" : change.effort === model().effort) return;
|
|
1104
|
+
if (chat.messages.some((m) => m.kind === "assistant")) {
|
|
1105
|
+
confirming = change;
|
|
1106
|
+
modelMenuOpen = false;
|
|
1107
|
+
} else applyChange(change);
|
|
1108
|
+
}
|
|
1109
|
+
async function applyChange(change) {
|
|
1110
|
+
confirming = null;
|
|
1111
|
+
const res = await post("presetId" in change ? "preset" : "effort", change);
|
|
1112
|
+
if (res) chat.apply({
|
|
1113
|
+
type: "model",
|
|
1114
|
+
model: await res.json()
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
function humanBubble($$renderer, senderName, body, files, pending) {
|
|
1118
|
+
const mine = senderName === me;
|
|
1119
|
+
$$renderer.push(`<div class="group/human flex flex-col items-end gap-1">`);
|
|
1120
|
+
if (!mine || pending) {
|
|
1121
|
+
$$renderer.push(`<!--[0--><div class="flex items-center gap-1.5 px-1 text-xs text-muted-foreground">`);
|
|
1122
|
+
if (pending) {
|
|
1123
|
+
$$renderer.push("<!--[0-->");
|
|
1124
|
+
Clock($$renderer, { class: "size-3" });
|
|
1125
|
+
$$renderer.push(`<!----> ${escape_html(mine ? m.chat.readsAfterStep : `${senderName} · ${m.chat.readsAfterStep}`)}`);
|
|
1126
|
+
} else {
|
|
1127
|
+
$$renderer.push("<!--[-1-->");
|
|
1128
|
+
UserAvatar($$renderer, {
|
|
1129
|
+
name: senderName,
|
|
1130
|
+
class: "size-4 text-[9px]"
|
|
1131
|
+
});
|
|
1132
|
+
$$renderer.push(`<!----> ${escape_html(senderName)}`);
|
|
1133
|
+
}
|
|
1134
|
+
$$renderer.push(`<!--]--></div>`);
|
|
1135
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1136
|
+
$$renderer.push(`<!--]--> `);
|
|
1137
|
+
if (files.length) {
|
|
1138
|
+
$$renderer.push("<!--[0-->");
|
|
1139
|
+
MessageAttachments($$renderer, {
|
|
1140
|
+
conversationId: conversation.id,
|
|
1141
|
+
attachments: files
|
|
1142
|
+
});
|
|
1143
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1144
|
+
$$renderer.push(`<!--]--> `);
|
|
1145
|
+
if (body) $$renderer.push(`<!--[0--><div${attr_class(clsx(cn("max-w-[85%] rounded-[22px] px-4 py-2.5 leading-relaxed break-words whitespace-pre-wrap sm:max-w-[70%]", pending ? "border border-dashed opacity-70" : "bg-bubble")))}>${escape_html(body)}</div>`);
|
|
1146
|
+
else $$renderer.push("<!--[-1-->");
|
|
1147
|
+
$$renderer.push(`<!--]--> `);
|
|
1148
|
+
if (!pending && body) {
|
|
1149
|
+
$$renderer.push(`<!--[0--><div class="-mr-1.5 opacity-100 transition-opacity md:opacity-0 md:group-hover/human:opacity-100">`);
|
|
1150
|
+
CopyButton($$renderer, { text: body });
|
|
1151
|
+
$$renderer.push(`<!----></div>`);
|
|
1152
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1153
|
+
$$renderer.push(`<!--]--></div>`);
|
|
1154
|
+
}
|
|
1155
|
+
function assistant($$renderer, avatarMood, label) {
|
|
1156
|
+
AssistantAvatar($$renderer, {
|
|
1157
|
+
avatar,
|
|
1158
|
+
mood: avatarMood,
|
|
1159
|
+
label,
|
|
1160
|
+
size: 24,
|
|
1161
|
+
class: "@min-[54rem]/chat:absolute @min-[54rem]/chat:top-0.5 @min-[54rem]/chat:-left-11"
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1164
|
+
function reply($$renderer, r, last) {
|
|
1165
|
+
const copyable = replyText(r);
|
|
1166
|
+
const miss = prefs.technical ? replyMiss(r) : null;
|
|
1167
|
+
const tail = r.parts.at(-1);
|
|
1168
|
+
$$renderer.push(`<div class="group/reply relative flex flex-col gap-3">`);
|
|
1169
|
+
assistant($$renderer, last ? mood() : void 0, last ? step()?.label : void 0);
|
|
1170
|
+
$$renderer.push(`<!----> <!--[-->`);
|
|
1171
|
+
const each_array = ensure_array_like(r.parts);
|
|
1172
|
+
for (let i = 0, $$length = each_array.length; i < $$length; i++) {
|
|
1173
|
+
let part = each_array[i];
|
|
1174
|
+
if (part.type === "text") {
|
|
1175
|
+
$$renderer.push("<!--[0-->");
|
|
1176
|
+
Markdown($$renderer, {
|
|
1177
|
+
text: part.text,
|
|
1178
|
+
media: {
|
|
1179
|
+
conversationId: conversation.id,
|
|
1180
|
+
media: part.media,
|
|
1181
|
+
pending: part.pending
|
|
1182
|
+
}
|
|
1183
|
+
});
|
|
1184
|
+
} else {
|
|
1185
|
+
$$renderer.push("<!--[-1-->");
|
|
1186
|
+
Activity($$renderer, {
|
|
1187
|
+
conversationId: conversation.id,
|
|
1188
|
+
part,
|
|
1189
|
+
results: chat.results,
|
|
1190
|
+
toolOutput: chat.toolOutput,
|
|
1191
|
+
active: r.live && i === r.parts.length - 1,
|
|
1192
|
+
running: chat.running
|
|
1193
|
+
});
|
|
1194
|
+
}
|
|
1195
|
+
$$renderer.push(`<!--]-->`);
|
|
1196
|
+
}
|
|
1197
|
+
$$renderer.push(`<!--]--> `);
|
|
1198
|
+
if (r.live && (!tail || tail.type === "text" && chat.live.every((b) => !b))) $$renderer.push(`<!--[0--><span class="my-1 block size-3.5 animate-pulse rounded-full bg-foreground" role="status"><span class="sr-only">${escape_html(m.chat.working)}</span></span>`);
|
|
1199
|
+
else $$renderer.push("<!--[-1-->");
|
|
1200
|
+
$$renderer.push(`<!--]--> `);
|
|
1201
|
+
if (r.stopReasons.includes("max_tokens")) $$renderer.push(`<!--[0--><p class="text-sm text-warning">${escape_html(m.chat.cutOff)}</p>`);
|
|
1202
|
+
else $$renderer.push("<!--[-1-->");
|
|
1203
|
+
$$renderer.push(`<!--]--> `);
|
|
1204
|
+
if (r.stopReasons.includes("refusal")) $$renderer.push(`<!--[0--><p class="text-sm text-warning">${escape_html(m.chat.refused)}</p>`);
|
|
1205
|
+
else $$renderer.push("<!--[-1-->");
|
|
1206
|
+
$$renderer.push(`<!--]--> `);
|
|
1207
|
+
if (!r.live && (copyable || prefs.technical && r.usage)) {
|
|
1208
|
+
$$renderer.push(`<!--[0--><div${attr_class(clsx(cn("-mt-1 -ml-1.5 flex items-center gap-0.5 transition-opacity", !last && "md:opacity-0 md:group-hover/reply:opacity-100 md:focus-within:opacity-100")))}>`);
|
|
1209
|
+
if (copyable) {
|
|
1210
|
+
$$renderer.push("<!--[0-->");
|
|
1211
|
+
CopyButton($$renderer, { text: copyable });
|
|
1212
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1213
|
+
$$renderer.push(`<!--]--> `);
|
|
1214
|
+
if (prefs.technical && r.usage) {
|
|
1215
|
+
$$renderer.push("<!--[0-->");
|
|
1216
|
+
if (Tooltip) {
|
|
1217
|
+
$$renderer.push("<!--[-->");
|
|
1218
|
+
Tooltip($$renderer, {
|
|
1219
|
+
children: ($$renderer) => {
|
|
1220
|
+
if (Tooltip_trigger) {
|
|
1221
|
+
$$renderer.push("<!--[-->");
|
|
1222
|
+
Tooltip_trigger($$renderer, {
|
|
1223
|
+
class: "flex size-8 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
1224
|
+
"aria-label": m.chat.usage,
|
|
1225
|
+
children: ($$renderer) => {
|
|
1226
|
+
Info($$renderer, { class: "size-4" });
|
|
1227
|
+
},
|
|
1228
|
+
$$slots: { default: true }
|
|
1229
|
+
});
|
|
1230
|
+
$$renderer.push("<!--]-->");
|
|
1231
|
+
} else {
|
|
1232
|
+
$$renderer.push("<!--[!-->");
|
|
1233
|
+
$$renderer.push("<!--]-->");
|
|
1234
|
+
}
|
|
1235
|
+
$$renderer.push(` `);
|
|
1236
|
+
if (Tooltip_content) {
|
|
1237
|
+
$$renderer.push("<!--[-->");
|
|
1238
|
+
Tooltip_content($$renderer, {
|
|
1239
|
+
class: "max-w-xs flex-col items-start gap-0.5",
|
|
1240
|
+
children: ($$renderer) => {
|
|
1241
|
+
if (r.models.length) $$renderer.push(`<!--[0--><span>${escape_html(m.chat.models(r.models))}</span>`);
|
|
1242
|
+
else $$renderer.push("<!--[-1-->");
|
|
1243
|
+
$$renderer.push(`<!--]--> <span>${escape_html(m.chat.tokensInOut(formatTokens(promptTokens(r.usage)), formatTokens(r.usage.output)))}</span> <span>${escape_html(cacheSummary(m.chat.cache, r.usage))}</span>`);
|
|
1244
|
+
},
|
|
1245
|
+
$$slots: { default: true }
|
|
1246
|
+
});
|
|
1247
|
+
$$renderer.push("<!--]-->");
|
|
1248
|
+
} else {
|
|
1249
|
+
$$renderer.push("<!--[!-->");
|
|
1250
|
+
$$renderer.push("<!--]-->");
|
|
1251
|
+
}
|
|
1252
|
+
},
|
|
1253
|
+
$$slots: { default: true }
|
|
1254
|
+
});
|
|
1255
|
+
$$renderer.push("<!--]-->");
|
|
1256
|
+
} else {
|
|
1257
|
+
$$renderer.push("<!--[!-->");
|
|
1258
|
+
$$renderer.push("<!--]-->");
|
|
1259
|
+
}
|
|
1260
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1261
|
+
$$renderer.push(`<!--]--> `);
|
|
1262
|
+
if (miss) {
|
|
1263
|
+
$$renderer.push("<!--[0-->");
|
|
1264
|
+
if (Tooltip) {
|
|
1265
|
+
$$renderer.push("<!--[-->");
|
|
1266
|
+
Tooltip($$renderer, {
|
|
1267
|
+
children: ($$renderer) => {
|
|
1268
|
+
if (Tooltip_trigger) {
|
|
1269
|
+
$$renderer.push("<!--[-->");
|
|
1270
|
+
Tooltip_trigger($$renderer, {
|
|
1271
|
+
class: "px-1.5 text-xs text-warning",
|
|
1272
|
+
children: ($$renderer) => {
|
|
1273
|
+
$$renderer.push(`<!---->${escape_html(m.chat.cacheMiss(formatTokens(miss.tokens)))}`);
|
|
1274
|
+
},
|
|
1275
|
+
$$slots: { default: true }
|
|
1276
|
+
});
|
|
1277
|
+
$$renderer.push("<!--]-->");
|
|
1278
|
+
} else {
|
|
1279
|
+
$$renderer.push("<!--[!-->");
|
|
1280
|
+
$$renderer.push("<!--]-->");
|
|
1281
|
+
}
|
|
1282
|
+
$$renderer.push(` `);
|
|
1283
|
+
if (Tooltip_content) {
|
|
1284
|
+
$$renderer.push("<!--[-->");
|
|
1285
|
+
Tooltip_content($$renderer, {
|
|
1286
|
+
class: "max-w-xs",
|
|
1287
|
+
children: ($$renderer) => {
|
|
1288
|
+
$$renderer.push(`<!---->${escape_html(miss.reason)}`);
|
|
1289
|
+
},
|
|
1290
|
+
$$slots: { default: true }
|
|
1291
|
+
});
|
|
1292
|
+
$$renderer.push("<!--]-->");
|
|
1293
|
+
} else {
|
|
1294
|
+
$$renderer.push("<!--[!-->");
|
|
1295
|
+
$$renderer.push("<!--]-->");
|
|
1296
|
+
}
|
|
1297
|
+
},
|
|
1298
|
+
$$slots: { default: true }
|
|
1299
|
+
});
|
|
1300
|
+
$$renderer.push("<!--]-->");
|
|
1301
|
+
} else {
|
|
1302
|
+
$$renderer.push("<!--[!-->");
|
|
1303
|
+
$$renderer.push("<!--]-->");
|
|
1304
|
+
}
|
|
1305
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1306
|
+
$$renderer.push(`<!--]--></div>`);
|
|
1307
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1308
|
+
$$renderer.push(`<!--]--></div>`);
|
|
1309
|
+
}
|
|
1310
|
+
let $$settled = true;
|
|
1311
|
+
let $$inner_renderer;
|
|
1312
|
+
function $$render_inner($$renderer) {
|
|
1313
|
+
{
|
|
1314
|
+
function actions($$renderer) {
|
|
1315
|
+
if (Dropdown_menu) {
|
|
1316
|
+
$$renderer.push("<!--[-->");
|
|
1317
|
+
Dropdown_menu($$renderer, {
|
|
1318
|
+
children: ($$renderer) => {
|
|
1319
|
+
if (Dropdown_menu_trigger) {
|
|
1320
|
+
$$renderer.push("<!--[-->");
|
|
1321
|
+
Dropdown_menu_trigger($$renderer, {
|
|
1322
|
+
class: "flex size-10 shrink-0 items-center justify-center rounded-full text-muted-foreground hover:bg-muted hover:text-foreground aria-expanded:bg-muted",
|
|
1323
|
+
"aria-label": m.chat.options,
|
|
1324
|
+
children: ($$renderer) => {
|
|
1325
|
+
Ellipsis($$renderer, { class: "size-5" });
|
|
1326
|
+
},
|
|
1327
|
+
$$slots: { default: true }
|
|
1328
|
+
});
|
|
1329
|
+
$$renderer.push("<!--]-->");
|
|
1330
|
+
} else {
|
|
1331
|
+
$$renderer.push("<!--[!-->");
|
|
1332
|
+
$$renderer.push("<!--]-->");
|
|
1333
|
+
}
|
|
1334
|
+
$$renderer.push(` `);
|
|
1335
|
+
if (Dropdown_menu_content) {
|
|
1336
|
+
$$renderer.push("<!--[-->");
|
|
1337
|
+
Dropdown_menu_content($$renderer, {
|
|
1338
|
+
align: "end",
|
|
1339
|
+
class: "w-60",
|
|
1340
|
+
children: ($$renderer) => {
|
|
1341
|
+
if (prefs.technical) {
|
|
1342
|
+
$$renderer.push("<!--[0-->");
|
|
1343
|
+
if (Dropdown_menu_label) {
|
|
1344
|
+
$$renderer.push("<!--[-->");
|
|
1345
|
+
Dropdown_menu_label($$renderer, {
|
|
1346
|
+
class: "font-normal",
|
|
1347
|
+
children: ($$renderer) => {
|
|
1348
|
+
$$renderer.push(`<span class="block truncate text-foreground">${escape_html(model().presetName)}</span> `);
|
|
1349
|
+
if (usage()) $$renderer.push(`<!--[0--><span class="block">${escape_html(m.chat.contextMenu(formatTokens(contextUsed()), formatTokens(model().contextWindow)))}</span> <span class="block">${escape_html(m.chat.cachedOverall(formatPercent(cacheHitRate(usage().total))))}</span>`);
|
|
1350
|
+
else $$renderer.push("<!--[-1-->");
|
|
1351
|
+
$$renderer.push(`<!--]-->`);
|
|
1352
|
+
},
|
|
1353
|
+
$$slots: { default: true }
|
|
1354
|
+
});
|
|
1355
|
+
$$renderer.push("<!--]-->");
|
|
1356
|
+
} else {
|
|
1357
|
+
$$renderer.push("<!--[!-->");
|
|
1358
|
+
$$renderer.push("<!--]-->");
|
|
1359
|
+
}
|
|
1360
|
+
$$renderer.push(` `);
|
|
1361
|
+
if (Dropdown_menu_separator) {
|
|
1362
|
+
$$renderer.push("<!--[-->");
|
|
1363
|
+
Dropdown_menu_separator($$renderer, {});
|
|
1364
|
+
$$renderer.push("<!--]-->");
|
|
1365
|
+
} else {
|
|
1366
|
+
$$renderer.push("<!--[!-->");
|
|
1367
|
+
$$renderer.push("<!--]-->");
|
|
1368
|
+
}
|
|
1369
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1370
|
+
$$renderer.push(`<!--]--> `);
|
|
1371
|
+
if (Dropdown_menu_item) {
|
|
1372
|
+
$$renderer.push("<!--[-->");
|
|
1373
|
+
Dropdown_menu_item($$renderer, {
|
|
1374
|
+
onSelect: () => renaming = {
|
|
1375
|
+
id: conversation.id,
|
|
1376
|
+
title: title()
|
|
1377
|
+
},
|
|
1378
|
+
children: ($$renderer) => {
|
|
1379
|
+
Pencil($$renderer, {});
|
|
1380
|
+
$$renderer.push(`<!----> ${escape_html(m.common.rename)}`);
|
|
1381
|
+
},
|
|
1382
|
+
$$slots: { default: true }
|
|
1383
|
+
});
|
|
1384
|
+
$$renderer.push("<!--]-->");
|
|
1385
|
+
} else {
|
|
1386
|
+
$$renderer.push("<!--[!-->");
|
|
1387
|
+
$$renderer.push("<!--]-->");
|
|
1388
|
+
}
|
|
1389
|
+
$$renderer.push(` `);
|
|
1390
|
+
MoveToFolderMenu($$renderer, {
|
|
1391
|
+
folders,
|
|
1392
|
+
folderId,
|
|
1393
|
+
onmove: move,
|
|
1394
|
+
onnew: () => creatingFolder = true
|
|
1395
|
+
});
|
|
1396
|
+
$$renderer.push(`<!----> `);
|
|
1397
|
+
if (Dropdown_menu_separator) {
|
|
1398
|
+
$$renderer.push("<!--[-->");
|
|
1399
|
+
Dropdown_menu_separator($$renderer, {});
|
|
1400
|
+
$$renderer.push("<!--]-->");
|
|
1401
|
+
} else {
|
|
1402
|
+
$$renderer.push("<!--[!-->");
|
|
1403
|
+
$$renderer.push("<!--]-->");
|
|
1404
|
+
}
|
|
1405
|
+
$$renderer.push(` `);
|
|
1406
|
+
if (Dropdown_menu_item) {
|
|
1407
|
+
$$renderer.push("<!--[-->");
|
|
1408
|
+
Dropdown_menu_item($$renderer, {
|
|
1409
|
+
variant: "destructive",
|
|
1410
|
+
onSelect: () => deleteOpen = true,
|
|
1411
|
+
children: ($$renderer) => {
|
|
1412
|
+
Trash($$renderer, {});
|
|
1413
|
+
$$renderer.push(`<!----> ${escape_html(m.common.delete)}`);
|
|
1414
|
+
},
|
|
1415
|
+
$$slots: { default: true }
|
|
1416
|
+
});
|
|
1417
|
+
$$renderer.push("<!--]-->");
|
|
1418
|
+
} else {
|
|
1419
|
+
$$renderer.push("<!--[!-->");
|
|
1420
|
+
$$renderer.push("<!--]-->");
|
|
1421
|
+
}
|
|
1422
|
+
},
|
|
1423
|
+
$$slots: { default: true }
|
|
1424
|
+
});
|
|
1425
|
+
$$renderer.push("<!--]-->");
|
|
1426
|
+
} else {
|
|
1427
|
+
$$renderer.push("<!--[!-->");
|
|
1428
|
+
$$renderer.push("<!--]-->");
|
|
1429
|
+
}
|
|
1430
|
+
},
|
|
1431
|
+
$$slots: { default: true }
|
|
1432
|
+
});
|
|
1433
|
+
$$renderer.push("<!--]-->");
|
|
1434
|
+
} else {
|
|
1435
|
+
$$renderer.push("<!--[!-->");
|
|
1436
|
+
$$renderer.push("<!--]-->");
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
PageHeader($$renderer, {
|
|
1440
|
+
actions,
|
|
1441
|
+
children: ($$renderer) => {
|
|
1442
|
+
if (folder()) {
|
|
1443
|
+
$$renderer.push(`<!--[0--><a${attr("href", resolve("/p/[slug]/f/[folder]", {
|
|
1444
|
+
slug: page.params.slug ?? "",
|
|
1445
|
+
folder: folder().id
|
|
1446
|
+
}))} class="hidden max-w-48 shrink-0 items-center gap-1.5 truncate rounded-lg text-base text-muted-foreground hover:text-foreground sm:flex sm:text-lg">`);
|
|
1447
|
+
Folder($$renderer, { class: "size-4 shrink-0" });
|
|
1448
|
+
$$renderer.push(`<!----> <span class="truncate">${escape_html(folder().name)}</span></a> <span class="hidden text-muted-foreground sm:inline">/</span>`);
|
|
1449
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1450
|
+
$$renderer.push(`<!--]--> <h1 class="min-w-0 truncate text-base font-medium sm:text-lg">`);
|
|
1451
|
+
TypedText($$renderer, { text: title() });
|
|
1452
|
+
$$renderer.push(`<!----></h1> `);
|
|
1453
|
+
if (prefs.technical && usage()) {
|
|
1454
|
+
$$renderer.push("<!--[0-->");
|
|
1455
|
+
if (Tooltip) {
|
|
1456
|
+
$$renderer.push("<!--[-->");
|
|
1457
|
+
Tooltip($$renderer, {
|
|
1458
|
+
children: ($$renderer) => {
|
|
1459
|
+
if (Tooltip_trigger) {
|
|
1460
|
+
$$renderer.push("<!--[-->");
|
|
1461
|
+
Tooltip_trigger($$renderer, {
|
|
1462
|
+
class: "hidden shrink-0 rounded-full bg-muted px-2.5 py-1 text-xs text-muted-foreground sm:block",
|
|
1463
|
+
children: ($$renderer) => {
|
|
1464
|
+
$$renderer.push(`<!---->${escape_html(m.chat.contextChip(formatTokens(contextUsed()), formatTokens(model().contextWindow), formatPercent(cacheHitRate(usage().last))))}`);
|
|
1465
|
+
},
|
|
1466
|
+
$$slots: { default: true }
|
|
1467
|
+
});
|
|
1468
|
+
$$renderer.push("<!--]-->");
|
|
1469
|
+
} else {
|
|
1470
|
+
$$renderer.push("<!--[!-->");
|
|
1471
|
+
$$renderer.push("<!--]-->");
|
|
1472
|
+
}
|
|
1473
|
+
$$renderer.push(` `);
|
|
1474
|
+
if (Tooltip_content) {
|
|
1475
|
+
$$renderer.push("<!--[-->");
|
|
1476
|
+
Tooltip_content($$renderer, {
|
|
1477
|
+
class: "max-w-sm flex-col items-start gap-0.5",
|
|
1478
|
+
children: ($$renderer) => {
|
|
1479
|
+
$$renderer.push(`<span>${escape_html(m.chat.contextUsed(formatTokens(contextUsed()), formatTokens(model().contextWindow)))}</span> <span>${escape_html(cacheSummary(m.chat.lastReply, usage().last))}</span> <span>${escape_html(cacheSummary(m.chat.wholeConversation, usage().total))}</span>`);
|
|
1480
|
+
},
|
|
1481
|
+
$$slots: { default: true }
|
|
1482
|
+
});
|
|
1483
|
+
$$renderer.push("<!--]-->");
|
|
1484
|
+
} else {
|
|
1485
|
+
$$renderer.push("<!--[!-->");
|
|
1486
|
+
$$renderer.push("<!--]-->");
|
|
1487
|
+
}
|
|
1488
|
+
},
|
|
1489
|
+
$$slots: { default: true }
|
|
1490
|
+
});
|
|
1491
|
+
$$renderer.push("<!--]-->");
|
|
1492
|
+
} else {
|
|
1493
|
+
$$renderer.push("<!--[!-->");
|
|
1494
|
+
$$renderer.push("<!--]-->");
|
|
1495
|
+
}
|
|
1496
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1497
|
+
$$renderer.push(`<!--]-->`);
|
|
1498
|
+
}});
|
|
1499
|
+
}
|
|
1500
|
+
$$renderer.push(`<!----> `);
|
|
1501
|
+
if (conversation.subagent) {
|
|
1502
|
+
$$renderer.push(`<!--[0--><div class="mx-auto w-full max-w-3xl px-4"><p class="rounded-2xl bg-muted px-4 py-2 text-center text-sm text-muted-foreground">`);
|
|
1503
|
+
{
|
|
1504
|
+
function parent($$renderer) {
|
|
1505
|
+
$$renderer.push(`<a${attr("href", resolve("/p/[slug]/c/[id]", {
|
|
1506
|
+
slug: page.params.slug ?? "",
|
|
1507
|
+
id: conversation.subagent?.parentId ?? ""
|
|
1508
|
+
}))} class="text-foreground underline underline-offset-2">${escape_html(conversation.subagent?.parentTitle)}</a>`);
|
|
1509
|
+
}
|
|
1510
|
+
Rich($$renderer, {
|
|
1511
|
+
text: m.chat.subagentBanner,
|
|
1512
|
+
name: conversation.subagent.name,
|
|
1513
|
+
parent,
|
|
1514
|
+
$$slots: { parent: true }
|
|
1515
|
+
});
|
|
1516
|
+
}
|
|
1517
|
+
$$renderer.push(`<!----></p></div>`);
|
|
1518
|
+
} else if (conversation.hidden && !continued) $$renderer.push(`<!--[1--><div class="mx-auto w-full max-w-3xl px-4"><p class="rounded-2xl bg-muted px-4 py-2 text-center text-sm text-muted-foreground">${escape_html(m.chat.hiddenBanner)}</p></div>`);
|
|
1519
|
+
else $$renderer.push("<!--[-1-->");
|
|
1520
|
+
$$renderer.push(`<!--]--> <div class="relative min-h-0 flex-1"><div class="@container/chat h-full overflow-y-auto [overflow-anchor:none]"><div class="mx-auto flex max-w-3xl flex-col gap-7 px-4 pt-4 sm:px-6"${attr_style("", { "padding-bottom": `${stringify(composerHeight + 16)}px` })}>`);
|
|
1521
|
+
if (chat.loaded && chat.messages.length === 0 && chat.queued.length === 0 && !chat.running) $$renderer.push(`<!--[0--><p class="py-16 text-center text-muted-foreground">${escape_html(m.chat.empty)}</p>`);
|
|
1522
|
+
else $$renderer.push("<!--[-1-->");
|
|
1523
|
+
$$renderer.push(`<!--]--> <!--[-->`);
|
|
1524
|
+
const each_array_1 = ensure_array_like(entries());
|
|
1525
|
+
for (let $$index_1 = 0, $$length = each_array_1.length; $$index_1 < $$length; $$index_1++) {
|
|
1526
|
+
let entry = each_array_1[$$index_1];
|
|
1527
|
+
if (entry.type === "human") {
|
|
1528
|
+
$$renderer.push("<!--[0-->");
|
|
1529
|
+
humanBubble($$renderer, entry.message.senderName, entry.message.text, entry.message.attachments, false);
|
|
1530
|
+
} else if (entry.type === "trigger") {
|
|
1531
|
+
$$renderer.push(`<!--[1--><div class="rounded-2xl border px-4 py-3 text-sm"><div class="flex items-center gap-1.5 text-xs font-medium text-muted-foreground">`);
|
|
1532
|
+
Clock($$renderer, { class: "size-3.5" });
|
|
1533
|
+
$$renderer.push(`<!----> ${escape_html(m.chat.automation(entry.message.title))}</div> <div class="mt-1.5 leading-relaxed whitespace-pre-wrap">${escape_html(entry.message.text)}</div></div>`);
|
|
1534
|
+
} else if (entry.type === "agent_message") {
|
|
1535
|
+
$$renderer.push(`<!--[2--><div class="rounded-2xl border px-4 py-3 text-sm"><div class="flex items-center gap-1.5 text-xs font-medium text-muted-foreground">`);
|
|
1536
|
+
Bot($$renderer, { class: "size-3.5" });
|
|
1537
|
+
$$renderer.push(`<!----> ${escape_html(m.chat.fromNolune(entry.message.title))}</div> <div class="mt-1.5 leading-relaxed whitespace-pre-wrap">${escape_html(entry.message.text)}</div></div>`);
|
|
1538
|
+
} else if (entry.type === "task_result") {
|
|
1539
|
+
$$renderer.push("<!--[3-->");
|
|
1540
|
+
if (Collapsible) {
|
|
1541
|
+
$$renderer.push("<!--[-->");
|
|
1542
|
+
Collapsible($$renderer, {
|
|
1543
|
+
class: "rounded-2xl border px-4 py-2.5 text-sm",
|
|
1544
|
+
children: ($$renderer) => {
|
|
1545
|
+
if (Collapsible_trigger) {
|
|
1546
|
+
$$renderer.push("<!--[-->");
|
|
1547
|
+
Collapsible_trigger($$renderer, {
|
|
1548
|
+
class: "group/result flex w-full min-w-0 items-center gap-1.5 text-left text-xs font-medium text-muted-foreground hover:text-foreground",
|
|
1549
|
+
children: ($$renderer) => {
|
|
1550
|
+
Square_terminal($$renderer, { class: "size-3.5 shrink-0" });
|
|
1551
|
+
$$renderer.push(`<!----> <span class="min-w-0 truncate">${escape_html(m.chat.finishedInBackground(entry.message.title))}</span> `);
|
|
1552
|
+
if (entry.message.isError) $$renderer.push(`<!--[0--><span class="shrink-0 text-destructive">${escape_html(prefs.technical ? m.steps.failed : m.steps.didntWork)}</span>`);
|
|
1553
|
+
else $$renderer.push("<!--[-1-->");
|
|
1554
|
+
$$renderer.push(`<!--]--> `);
|
|
1555
|
+
Chevron_right($$renderer, { class: "size-3.5 shrink-0 transition-transform group-data-[state=open]/result:rotate-90" });
|
|
1556
|
+
$$renderer.push(`<!---->`);
|
|
1557
|
+
},
|
|
1558
|
+
$$slots: { default: true }
|
|
1559
|
+
});
|
|
1560
|
+
$$renderer.push("<!--]-->");
|
|
1561
|
+
} else {
|
|
1562
|
+
$$renderer.push("<!--[!-->");
|
|
1563
|
+
$$renderer.push("<!--]-->");
|
|
1564
|
+
}
|
|
1565
|
+
$$renderer.push(` `);
|
|
1566
|
+
if (Collapsible_content) {
|
|
1567
|
+
$$renderer.push("<!--[-->");
|
|
1568
|
+
Collapsible_content($$renderer, {
|
|
1569
|
+
children: ($$renderer) => {
|
|
1570
|
+
$$renderer.push(`<pre class="mt-2 max-h-72 overflow-auto rounded-xl bg-muted/40 px-3 py-2 font-mono text-xs break-all whitespace-pre-wrap text-muted-foreground">${escape_html(entry.message.output)}</pre>`);
|
|
1571
|
+
},
|
|
1572
|
+
$$slots: { default: true }
|
|
1573
|
+
});
|
|
1574
|
+
$$renderer.push("<!--]-->");
|
|
1575
|
+
} else {
|
|
1576
|
+
$$renderer.push("<!--[!-->");
|
|
1577
|
+
$$renderer.push("<!--]-->");
|
|
1578
|
+
}
|
|
1579
|
+
},
|
|
1580
|
+
$$slots: { default: true }
|
|
1581
|
+
});
|
|
1582
|
+
$$renderer.push("<!--]-->");
|
|
1583
|
+
} else {
|
|
1584
|
+
$$renderer.push("<!--[!-->");
|
|
1585
|
+
$$renderer.push("<!--]-->");
|
|
1586
|
+
}
|
|
1587
|
+
} else if (entry.type === "memory") {
|
|
1588
|
+
$$renderer.push("<!--[4-->");
|
|
1589
|
+
MemoryLook($$renderer, {
|
|
1590
|
+
look: entry.look,
|
|
1591
|
+
slug: page.params.slug ?? ""
|
|
1592
|
+
});
|
|
1593
|
+
} else {
|
|
1594
|
+
$$renderer.push("<!--[-1-->");
|
|
1595
|
+
reply($$renderer, entry, entry === newest());
|
|
1596
|
+
}
|
|
1597
|
+
$$renderer.push(`<!--]-->`);
|
|
1598
|
+
}
|
|
1599
|
+
$$renderer.push(`<!--]--> `);
|
|
1600
|
+
if (chat.background.length) {
|
|
1601
|
+
$$renderer.push(`<!--[0--><div class="flex flex-col gap-1.5 rounded-2xl border px-4 py-3 text-sm"><div class="flex items-center justify-between gap-3"><span class="text-xs font-medium text-muted-foreground">${escape_html(m.chat.inBackground)}</span> `);
|
|
1602
|
+
Button($$renderer, {
|
|
1603
|
+
size: "sm",
|
|
1604
|
+
variant: "outline",
|
|
1605
|
+
onclick: () => post("stop"),
|
|
1606
|
+
children: ($$renderer) => {
|
|
1607
|
+
$$renderer.push(`<!---->${escape_html(m.common.stop)}`);
|
|
1608
|
+
},
|
|
1609
|
+
$$slots: { default: true }
|
|
1610
|
+
});
|
|
1611
|
+
$$renderer.push(`<!----></div> <!--[-->`);
|
|
1612
|
+
const each_array_2 = ensure_array_like(chat.background);
|
|
1613
|
+
for (let $$index_2 = 0, $$length = each_array_2.length; $$index_2 < $$length; $$index_2++) {
|
|
1614
|
+
let item = each_array_2[$$index_2];
|
|
1615
|
+
$$renderer.push(`<div class="flex min-w-0 items-center gap-2 text-muted-foreground">`);
|
|
1616
|
+
Loader_circle($$renderer, { class: "size-3.5 shrink-0 animate-spin" });
|
|
1617
|
+
$$renderer.push(`<!----> `);
|
|
1618
|
+
if (item.kind === "command") $$renderer.push(`<!--[0--><span${attr_class(clsx(cn("min-w-0 truncate", prefs.technical && "font-mono text-xs")))}>${escape_html(prefs.technical ? `$ ${firstLine(item.command)}` : item.summary ?? m.chat.aCommand)}</span>`);
|
|
1619
|
+
else $$renderer.push(`<!--[-1--><a${attr("href", resolve("/p/[slug]/c/[id]", {
|
|
1620
|
+
slug: page.params.slug ?? "",
|
|
1621
|
+
id: item.conversationId
|
|
1622
|
+
}))} class="min-w-0 truncate underline-offset-2 hover:text-foreground hover:underline">${escape_html(m.chat.subagent(item.name))}${escape_html(item.status === "stopping" ? ` · ${m.chat.stopping}` : "")}</a>`);
|
|
1623
|
+
$$renderer.push(`<!--]--></div>`);
|
|
1624
|
+
}
|
|
1625
|
+
$$renderer.push(`<!--]--></div>`);
|
|
1626
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1627
|
+
$$renderer.push(`<!--]--> <!--[-->`);
|
|
1628
|
+
const each_array_3 = ensure_array_like(chat.queued);
|
|
1629
|
+
for (let $$index_3 = 0, $$length = each_array_3.length; $$index_3 < $$length; $$index_3++) {
|
|
1630
|
+
let message = each_array_3[$$index_3];
|
|
1631
|
+
if (message.kind === "human") {
|
|
1632
|
+
$$renderer.push("<!--[0-->");
|
|
1633
|
+
humanBubble($$renderer, message.senderName, message.text, message.attachments, true);
|
|
1634
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1635
|
+
$$renderer.push(`<!--]-->`);
|
|
1636
|
+
}
|
|
1637
|
+
$$renderer.push(`<!--]--> `);
|
|
1638
|
+
if (chat.error || unanswered() && !conversation.subagent) {
|
|
1639
|
+
$$renderer.push(`<!--[0--><div class="relative flex flex-col gap-3">`);
|
|
1640
|
+
if (!liveReply()) {
|
|
1641
|
+
$$renderer.push("<!--[0-->");
|
|
1642
|
+
assistant($$renderer, mood());
|
|
1643
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1644
|
+
$$renderer.push(`<!--]--> `);
|
|
1645
|
+
if (chat.error) {
|
|
1646
|
+
$$renderer.push(`<!--[0--><div class="flex flex-wrap items-center gap-3 rounded-2xl border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm">`);
|
|
1647
|
+
Circle_alert($$renderer, { class: "size-4 shrink-0 text-destructive" });
|
|
1648
|
+
$$renderer.push(`<!----> <span class="min-w-0 flex-1"><span class="block font-medium">${escape_html(m.chat.errorTitle)}</span> <span class="block text-muted-foreground">${escape_html(chat.error)}</span></span> `);
|
|
1649
|
+
if (!conversation.subagent) {
|
|
1650
|
+
$$renderer.push("<!--[0-->");
|
|
1651
|
+
Button($$renderer, {
|
|
1652
|
+
size: "sm",
|
|
1653
|
+
variant: "outline",
|
|
1654
|
+
onclick: () => post("continue"),
|
|
1655
|
+
children: ($$renderer) => {
|
|
1656
|
+
Rotate_ccw($$renderer, {});
|
|
1657
|
+
$$renderer.push(`<!----> ${escape_html(m.common.tryAgain)}`);
|
|
1658
|
+
},
|
|
1659
|
+
$$slots: { default: true }
|
|
1660
|
+
});
|
|
1661
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1662
|
+
$$renderer.push(`<!--]--></div>`);
|
|
1663
|
+
} else {
|
|
1664
|
+
$$renderer.push(`<!--[-1--><div class="flex flex-wrap items-center gap-3 text-sm text-muted-foreground">${escape_html(m.chat.unanswered)} `);
|
|
1665
|
+
Button($$renderer, {
|
|
1666
|
+
size: "sm",
|
|
1667
|
+
variant: "outline",
|
|
1668
|
+
onclick: () => post("continue"),
|
|
1669
|
+
children: ($$renderer) => {
|
|
1670
|
+
$$renderer.push(`<!---->${escape_html(m.common.continue)}`);
|
|
1671
|
+
},
|
|
1672
|
+
$$slots: { default: true }
|
|
1673
|
+
});
|
|
1674
|
+
$$renderer.push(`<!----></div>`);
|
|
1675
|
+
}
|
|
1676
|
+
$$renderer.push(`<!--]--></div>`);
|
|
1677
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1678
|
+
$$renderer.push(`<!--]--></div></div> `);
|
|
1679
|
+
ComposerDock($$renderer, {
|
|
1680
|
+
get height() {
|
|
1681
|
+
return composerHeight;
|
|
1682
|
+
},
|
|
1683
|
+
set height($$value) {
|
|
1684
|
+
composerHeight = $$value;
|
|
1685
|
+
$$settled = false;
|
|
1686
|
+
},
|
|
1687
|
+
children: ($$renderer) => {
|
|
1688
|
+
if (!stickToBottom) {
|
|
1689
|
+
$$renderer.push(`<!--[0--><button class="absolute bottom-full left-1/2 mb-3 flex size-9 -translate-x-1/2 items-center justify-center rounded-full border bg-background text-foreground shadow-md hover:bg-muted"${attr("aria-label", m.chat.scrollToBottom)}>`);
|
|
1690
|
+
Arrow_down($$renderer, { class: "size-4" });
|
|
1691
|
+
$$renderer.push(`<!----></button>`);
|
|
1692
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1693
|
+
$$renderer.push(`<!--]--> `);
|
|
1694
|
+
if (conversation.subagent) {
|
|
1695
|
+
$$renderer.push(`<!--[0--><div class="flex items-center justify-between gap-3 rounded-[26px] border bg-background px-5 py-3 text-sm text-muted-foreground shadow-sm"><span>${escape_html(m.chat.subagentOnly(conversation.subagent.name))}</span> `);
|
|
1696
|
+
if (chat.running) {
|
|
1697
|
+
$$renderer.push("<!--[0-->");
|
|
1698
|
+
Button($$renderer, {
|
|
1699
|
+
size: "sm",
|
|
1700
|
+
variant: "outline",
|
|
1701
|
+
onclick: () => post("stop"),
|
|
1702
|
+
children: ($$renderer) => {
|
|
1703
|
+
$$renderer.push(`<!---->${escape_html(m.common.stop)}`);
|
|
1704
|
+
},
|
|
1705
|
+
$$slots: { default: true }
|
|
1706
|
+
});
|
|
1707
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1708
|
+
$$renderer.push(`<!--]--></div>`);
|
|
1709
|
+
} else {
|
|
1710
|
+
$$renderer.push("<!--[-1-->");
|
|
1711
|
+
{
|
|
1712
|
+
function tools($$renderer) {
|
|
1713
|
+
ModelMenu($$renderer, {
|
|
1714
|
+
efforts,
|
|
1715
|
+
effort: model().effort,
|
|
1716
|
+
onEffortChange: (effort) => requestChange({ effort }),
|
|
1717
|
+
presets: menuPresets(),
|
|
1718
|
+
presetId: listed() && model().presetId || "current",
|
|
1719
|
+
onPresetChange: (presetId) => requestChange({ presetId }),
|
|
1720
|
+
defaultPresetId,
|
|
1721
|
+
avatar,
|
|
1722
|
+
get open() {
|
|
1723
|
+
return modelMenuOpen;
|
|
1724
|
+
},
|
|
1725
|
+
set open($$value) {
|
|
1726
|
+
modelMenuOpen = $$value;
|
|
1727
|
+
$$settled = false;
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
}
|
|
1731
|
+
Composer($$renderer, {
|
|
1732
|
+
attachments,
|
|
1733
|
+
running: chat.running,
|
|
1734
|
+
busy: sending,
|
|
1735
|
+
placeholder: chat.running ? m.chat.placeholderRunning : m.chat.placeholder,
|
|
1736
|
+
onsubmit: send,
|
|
1737
|
+
onstop: () => post("stop"),
|
|
1738
|
+
get value() {
|
|
1739
|
+
return text;
|
|
1740
|
+
},
|
|
1741
|
+
set value($$value) {
|
|
1742
|
+
text = $$value;
|
|
1743
|
+
$$settled = false;
|
|
1744
|
+
},
|
|
1745
|
+
get textarea() {
|
|
1746
|
+
return textarea;
|
|
1747
|
+
},
|
|
1748
|
+
set textarea($$value) {
|
|
1749
|
+
textarea = $$value;
|
|
1750
|
+
$$settled = false;
|
|
1751
|
+
},
|
|
1752
|
+
tools,
|
|
1753
|
+
$$slots: { tools: true }
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
$$renderer.push(`<!--]--> `);
|
|
1758
|
+
if (actionError) $$renderer.push(`<!--[0--><p class="mt-2 text-center text-sm text-destructive">${escape_html(actionError)}</p>`);
|
|
1759
|
+
else if (!chat.connected && chat.loaded) $$renderer.push(`<!--[1--><p class="mt-2 text-center text-xs text-warning">${escape_html(m.chat.reconnecting)}</p>`);
|
|
1760
|
+
else $$renderer.push(`<!--[-1--><p class="mt-2 hidden text-center text-xs text-muted-foreground sm:block">${escape_html(m.chat.disclaimer)}</p>`);
|
|
1761
|
+
$$renderer.push(`<!--]-->`);
|
|
1762
|
+
},
|
|
1763
|
+
$$slots: { default: true }
|
|
1764
|
+
});
|
|
1765
|
+
$$renderer.push(`<!----></div> `);
|
|
1766
|
+
MediaViewer($$renderer, {
|
|
1767
|
+
get picture() {
|
|
1768
|
+
return viewing;
|
|
1769
|
+
},
|
|
1770
|
+
set picture($$value) {
|
|
1771
|
+
viewing = $$value;
|
|
1772
|
+
$$settled = false;
|
|
1773
|
+
}
|
|
1774
|
+
});
|
|
1775
|
+
$$renderer.push(`<!----> `);
|
|
1776
|
+
RenameChatDialog($$renderer, {
|
|
1777
|
+
slug: page.params.slug ?? "",
|
|
1778
|
+
get chat() {
|
|
1779
|
+
return renaming;
|
|
1780
|
+
},
|
|
1781
|
+
set chat($$value) {
|
|
1782
|
+
renaming = $$value;
|
|
1783
|
+
$$settled = false;
|
|
1784
|
+
}
|
|
1785
|
+
});
|
|
1786
|
+
$$renderer.push(`<!----> `);
|
|
1787
|
+
NewFolderDialog($$renderer, {
|
|
1788
|
+
slug: page.params.slug ?? "",
|
|
1789
|
+
oncreated: (created) => move(created.id),
|
|
1790
|
+
get open() {
|
|
1791
|
+
return creatingFolder;
|
|
1792
|
+
},
|
|
1793
|
+
set open($$value) {
|
|
1794
|
+
creatingFolder = $$value;
|
|
1795
|
+
$$settled = false;
|
|
1796
|
+
}
|
|
1797
|
+
});
|
|
1798
|
+
$$renderer.push(`<!----> `);
|
|
1799
|
+
if (Alert_dialog) {
|
|
1800
|
+
$$renderer.push("<!--[-->");
|
|
1801
|
+
Alert_dialog($$renderer, {
|
|
1802
|
+
open: confirming !== null,
|
|
1803
|
+
onOpenChange: (open) => {
|
|
1804
|
+
if (!open) confirming = null;
|
|
1805
|
+
},
|
|
1806
|
+
children: ($$renderer) => {
|
|
1807
|
+
if (Alert_dialog_content) {
|
|
1808
|
+
$$renderer.push("<!--[-->");
|
|
1809
|
+
Alert_dialog_content($$renderer, {
|
|
1810
|
+
children: ($$renderer) => {
|
|
1811
|
+
if (confirming) {
|
|
1812
|
+
$$renderer.push("<!--[0-->");
|
|
1813
|
+
const change = confirming;
|
|
1814
|
+
if (Alert_dialog_header) {
|
|
1815
|
+
$$renderer.push("<!--[-->");
|
|
1816
|
+
Alert_dialog_header($$renderer, {
|
|
1817
|
+
children: ($$renderer) => {
|
|
1818
|
+
if (Alert_dialog_title) {
|
|
1819
|
+
$$renderer.push("<!--[-->");
|
|
1820
|
+
Alert_dialog_title($$renderer, {
|
|
1821
|
+
children: ($$renderer) => {
|
|
1822
|
+
if ("presetId" in change) $$renderer.push(`<!--[0-->${escape_html(m.chat.switchTitle(switchingTo() ? shortModelName(switchingTo().name) : m.chat.anotherModel))}`);
|
|
1823
|
+
else $$renderer.push(`<!--[-1-->${escape_html(m.chat.effortTitle(effortLabels[change.effort]?.label ?? change.effort))}`);
|
|
1824
|
+
$$renderer.push(`<!--]-->`);
|
|
1825
|
+
},
|
|
1826
|
+
$$slots: { default: true }
|
|
1827
|
+
});
|
|
1828
|
+
$$renderer.push("<!--]-->");
|
|
1829
|
+
} else {
|
|
1830
|
+
$$renderer.push("<!--[!-->");
|
|
1831
|
+
$$renderer.push("<!--]-->");
|
|
1832
|
+
}
|
|
1833
|
+
$$renderer.push(` `);
|
|
1834
|
+
if (Alert_dialog_description) {
|
|
1835
|
+
$$renderer.push("<!--[-->");
|
|
1836
|
+
Alert_dialog_description($$renderer, {
|
|
1837
|
+
class: "flex flex-col gap-2",
|
|
1838
|
+
children: ($$renderer) => {
|
|
1839
|
+
$$renderer.push(`<span>${escape_html(m.chat.switchCache("presetId" in change, prefs.technical && contextUsed() ? formatTokens(contextUsed()) : null))}</span> `);
|
|
1840
|
+
if (switchingTo() && conversation.heldBy.some((p) => p !== switchingTo().provider)) $$renderer.push(`<!--[0--><span>${escape_html(m.chat.switchFiles)}</span>`);
|
|
1841
|
+
else $$renderer.push("<!--[-1-->");
|
|
1842
|
+
$$renderer.push(`<!--]-->`);
|
|
1843
|
+
},
|
|
1844
|
+
$$slots: { default: true }
|
|
1845
|
+
});
|
|
1846
|
+
$$renderer.push("<!--]-->");
|
|
1847
|
+
} else {
|
|
1848
|
+
$$renderer.push("<!--[!-->");
|
|
1849
|
+
$$renderer.push("<!--]-->");
|
|
1850
|
+
}
|
|
1851
|
+
},
|
|
1852
|
+
$$slots: { default: true }
|
|
1853
|
+
});
|
|
1854
|
+
$$renderer.push("<!--]-->");
|
|
1855
|
+
} else {
|
|
1856
|
+
$$renderer.push("<!--[!-->");
|
|
1857
|
+
$$renderer.push("<!--]-->");
|
|
1858
|
+
}
|
|
1859
|
+
$$renderer.push(` `);
|
|
1860
|
+
if (Alert_dialog_footer) {
|
|
1861
|
+
$$renderer.push("<!--[-->");
|
|
1862
|
+
Alert_dialog_footer($$renderer, {
|
|
1863
|
+
children: ($$renderer) => {
|
|
1864
|
+
if (Alert_dialog_cancel) {
|
|
1865
|
+
$$renderer.push("<!--[-->");
|
|
1866
|
+
Alert_dialog_cancel($$renderer, {
|
|
1867
|
+
children: ($$renderer) => {
|
|
1868
|
+
$$renderer.push(`<!---->${escape_html(m.common.cancel)}`);
|
|
1869
|
+
},
|
|
1870
|
+
$$slots: { default: true }
|
|
1871
|
+
});
|
|
1872
|
+
$$renderer.push("<!--]-->");
|
|
1873
|
+
} else {
|
|
1874
|
+
$$renderer.push("<!--[!-->");
|
|
1875
|
+
$$renderer.push("<!--]-->");
|
|
1876
|
+
}
|
|
1877
|
+
$$renderer.push(` `);
|
|
1878
|
+
if (Alert_dialog_action) {
|
|
1879
|
+
$$renderer.push("<!--[-->");
|
|
1880
|
+
Alert_dialog_action($$renderer, {
|
|
1881
|
+
onclick: () => applyChange(change),
|
|
1882
|
+
children: ($$renderer) => {
|
|
1883
|
+
$$renderer.push(`<!---->${escape_html("presetId" in change ? m.chat.switch : m.chat.change)}`);
|
|
1884
|
+
},
|
|
1885
|
+
$$slots: { default: true }
|
|
1886
|
+
});
|
|
1887
|
+
$$renderer.push("<!--]-->");
|
|
1888
|
+
} else {
|
|
1889
|
+
$$renderer.push("<!--[!-->");
|
|
1890
|
+
$$renderer.push("<!--]-->");
|
|
1891
|
+
}
|
|
1892
|
+
},
|
|
1893
|
+
$$slots: { default: true }
|
|
1894
|
+
});
|
|
1895
|
+
$$renderer.push("<!--]-->");
|
|
1896
|
+
} else {
|
|
1897
|
+
$$renderer.push("<!--[!-->");
|
|
1898
|
+
$$renderer.push("<!--]-->");
|
|
1899
|
+
}
|
|
1900
|
+
} else $$renderer.push("<!--[-1-->");
|
|
1901
|
+
$$renderer.push(`<!--]-->`);
|
|
1902
|
+
},
|
|
1903
|
+
$$slots: { default: true }
|
|
1904
|
+
});
|
|
1905
|
+
$$renderer.push("<!--]-->");
|
|
1906
|
+
} else {
|
|
1907
|
+
$$renderer.push("<!--[!-->");
|
|
1908
|
+
$$renderer.push("<!--]-->");
|
|
1909
|
+
}
|
|
1910
|
+
},
|
|
1911
|
+
$$slots: { default: true }
|
|
1912
|
+
});
|
|
1913
|
+
$$renderer.push("<!--]-->");
|
|
1914
|
+
} else {
|
|
1915
|
+
$$renderer.push("<!--[!-->");
|
|
1916
|
+
$$renderer.push("<!--]-->");
|
|
1917
|
+
}
|
|
1918
|
+
$$renderer.push(` `);
|
|
1919
|
+
if (Alert_dialog) {
|
|
1920
|
+
$$renderer.push("<!--[-->");
|
|
1921
|
+
Alert_dialog($$renderer, {
|
|
1922
|
+
get open() {
|
|
1923
|
+
return deleteOpen;
|
|
1924
|
+
},
|
|
1925
|
+
set open($$value) {
|
|
1926
|
+
deleteOpen = $$value;
|
|
1927
|
+
$$settled = false;
|
|
1928
|
+
},
|
|
1929
|
+
children: ($$renderer) => {
|
|
1930
|
+
if (Alert_dialog_content) {
|
|
1931
|
+
$$renderer.push("<!--[-->");
|
|
1932
|
+
Alert_dialog_content($$renderer, {
|
|
1933
|
+
children: ($$renderer) => {
|
|
1934
|
+
if (Alert_dialog_header) {
|
|
1935
|
+
$$renderer.push("<!--[-->");
|
|
1936
|
+
Alert_dialog_header($$renderer, {
|
|
1937
|
+
children: ($$renderer) => {
|
|
1938
|
+
if (Alert_dialog_title) {
|
|
1939
|
+
$$renderer.push("<!--[-->");
|
|
1940
|
+
Alert_dialog_title($$renderer, {
|
|
1941
|
+
children: ($$renderer) => {
|
|
1942
|
+
$$renderer.push(`<!---->${escape_html(m.chat.deleteTitle)}`);
|
|
1943
|
+
},
|
|
1944
|
+
$$slots: { default: true }
|
|
1945
|
+
});
|
|
1946
|
+
$$renderer.push("<!--]-->");
|
|
1947
|
+
} else {
|
|
1948
|
+
$$renderer.push("<!--[!-->");
|
|
1949
|
+
$$renderer.push("<!--]-->");
|
|
1950
|
+
}
|
|
1951
|
+
$$renderer.push(` `);
|
|
1952
|
+
if (Alert_dialog_description) {
|
|
1953
|
+
$$renderer.push("<!--[-->");
|
|
1954
|
+
Alert_dialog_description($$renderer, {
|
|
1955
|
+
children: ($$renderer) => {
|
|
1956
|
+
{
|
|
1957
|
+
function name($$renderer) {
|
|
1958
|
+
$$renderer.push(`<strong class="text-foreground">${escape_html(title())}</strong>`);
|
|
1959
|
+
}
|
|
1960
|
+
Rich($$renderer, {
|
|
1961
|
+
text: m.chat.deleteBody,
|
|
1962
|
+
name,
|
|
1963
|
+
$$slots: { name: true }
|
|
1964
|
+
});
|
|
1965
|
+
}
|
|
1966
|
+
},
|
|
1967
|
+
$$slots: { default: true }
|
|
1968
|
+
});
|
|
1969
|
+
$$renderer.push("<!--]-->");
|
|
1970
|
+
} else {
|
|
1971
|
+
$$renderer.push("<!--[!-->");
|
|
1972
|
+
$$renderer.push("<!--]-->");
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
$$slots: { default: true }
|
|
1976
|
+
});
|
|
1977
|
+
$$renderer.push("<!--]-->");
|
|
1978
|
+
} else {
|
|
1979
|
+
$$renderer.push("<!--[!-->");
|
|
1980
|
+
$$renderer.push("<!--]-->");
|
|
1981
|
+
}
|
|
1982
|
+
$$renderer.push(` <form method="POST" action="?/delete">`);
|
|
1983
|
+
if (Alert_dialog_footer) {
|
|
1984
|
+
$$renderer.push("<!--[-->");
|
|
1985
|
+
Alert_dialog_footer($$renderer, {
|
|
1986
|
+
children: ($$renderer) => {
|
|
1987
|
+
if (Alert_dialog_cancel) {
|
|
1988
|
+
$$renderer.push("<!--[-->");
|
|
1989
|
+
Alert_dialog_cancel($$renderer, {
|
|
1990
|
+
type: "button",
|
|
1991
|
+
children: ($$renderer) => {
|
|
1992
|
+
$$renderer.push(`<!---->${escape_html(m.common.cancel)}`);
|
|
1993
|
+
},
|
|
1994
|
+
$$slots: { default: true }
|
|
1995
|
+
});
|
|
1996
|
+
$$renderer.push("<!--]-->");
|
|
1997
|
+
} else {
|
|
1998
|
+
$$renderer.push("<!--[!-->");
|
|
1999
|
+
$$renderer.push("<!--]-->");
|
|
2000
|
+
}
|
|
2001
|
+
$$renderer.push(` `);
|
|
2002
|
+
if (Alert_dialog_action) {
|
|
2003
|
+
$$renderer.push("<!--[-->");
|
|
2004
|
+
Alert_dialog_action($$renderer, {
|
|
2005
|
+
type: "submit",
|
|
2006
|
+
variant: "destructive",
|
|
2007
|
+
children: ($$renderer) => {
|
|
2008
|
+
$$renderer.push(`<!---->${escape_html(m.common.delete)}`);
|
|
2009
|
+
},
|
|
2010
|
+
$$slots: { default: true }
|
|
2011
|
+
});
|
|
2012
|
+
$$renderer.push("<!--]-->");
|
|
2013
|
+
} else {
|
|
2014
|
+
$$renderer.push("<!--[!-->");
|
|
2015
|
+
$$renderer.push("<!--]-->");
|
|
2016
|
+
}
|
|
2017
|
+
},
|
|
2018
|
+
$$slots: { default: true }
|
|
2019
|
+
});
|
|
2020
|
+
$$renderer.push("<!--]-->");
|
|
2021
|
+
} else {
|
|
2022
|
+
$$renderer.push("<!--[!-->");
|
|
2023
|
+
$$renderer.push("<!--]-->");
|
|
2024
|
+
}
|
|
2025
|
+
$$renderer.push(`</form>`);
|
|
2026
|
+
},
|
|
2027
|
+
$$slots: { default: true }
|
|
2028
|
+
});
|
|
2029
|
+
$$renderer.push("<!--]-->");
|
|
2030
|
+
} else {
|
|
2031
|
+
$$renderer.push("<!--[!-->");
|
|
2032
|
+
$$renderer.push("<!--]-->");
|
|
2033
|
+
}
|
|
2034
|
+
},
|
|
2035
|
+
$$slots: { default: true }
|
|
2036
|
+
});
|
|
2037
|
+
$$renderer.push("<!--]-->");
|
|
2038
|
+
} else {
|
|
2039
|
+
$$renderer.push("<!--[!-->");
|
|
2040
|
+
$$renderer.push("<!--]-->");
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
do {
|
|
2044
|
+
$$settled = true;
|
|
2045
|
+
$$inner_renderer = $$renderer.copy();
|
|
2046
|
+
$$render_inner($$inner_renderer);
|
|
2047
|
+
} while (!$$settled);
|
|
2048
|
+
$$renderer.subsume($$inner_renderer);
|
|
2049
|
+
});
|
|
2050
|
+
}
|
|
2051
|
+
//#endregion
|
|
2052
|
+
//#region src/routes/p/[slug]/c/[id]/+page.svelte
|
|
2053
|
+
function _page($$renderer, $$props) {
|
|
2054
|
+
$$renderer.component(($$renderer) => {
|
|
2055
|
+
let { data } = $$props;
|
|
2056
|
+
$$renderer.push(`<!---->`);
|
|
2057
|
+
Chat($$renderer, {
|
|
2058
|
+
conversation: data.conversation,
|
|
2059
|
+
efforts: data.efforts,
|
|
2060
|
+
presets: data.presets,
|
|
2061
|
+
defaultPresetId: data.defaultPresetId,
|
|
2062
|
+
me: data.user?.name ?? "",
|
|
2063
|
+
folders: data.folders,
|
|
2064
|
+
folderId: data.conversations.find((c) => c.id === data.conversation.id)?.folderId ?? null,
|
|
2065
|
+
avatar: data.profile.avatar
|
|
2066
|
+
});
|
|
2067
|
+
$$renderer.push(`<!---->`);
|
|
2068
|
+
});
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
export { _page as default };
|
|
2072
|
+
//# sourceMappingURL=_page.svelte.js-DO1qyELK.js.map
|