reflex-agent 0.18.2 → 0.19.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/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +101 -102
- package/.next/app-path-routes-manifest.json +9 -9
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/required-server-files.json +2 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/agents/[agentId]/page.js +2 -2
- package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -1
- package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route.js +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/images/[rootId]/[file]/route.js +1 -1
- package/.next/server/app/api/images/[rootId]/[file]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/callback/route.js +2 -2
- package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/start/route.js +1 -1
- package/.next/server/app/api/oauth/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/attachments/route.js +0 -0
- package/.next/server/app/api/roots/[id]/attachments/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js +2 -2
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route.js +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route.js +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js.nft.json +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/iframe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/style.css/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/install-archive/route_client-reference-manifest.js +1 -1
- package/.next/server/app/audit/page.js +2 -2
- package/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/server/app/dispatcher/page.js +2 -2
- package/.next/server/app/dispatcher/page.js.nft.json +1 -1
- package/.next/server/app/dispatcher/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding/page.js +3 -3
- package/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js +2 -2
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/chat/[topicId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js +2 -2
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/kb/[...slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/memory/page.js +2 -2
- package/.next/server/app/roots/[id]/memory/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/memory/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/page.js +4 -4
- package/.next/server/app/roots/[id]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js +2 -2
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/workflows/[wfId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/workflows/page.js +2 -2
- package/.next/server/app/roots/[id]/workflows/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/workflows/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/new/page.js +4 -4
- package/.next/server/app/roots/new/page.js.nft.json +1 -1
- package/.next/server/app/roots/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js +5 -5
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/share/[id]/file/page.js +2 -2
- package/.next/server/app/share/[id]/file/page.js.nft.json +1 -1
- package/.next/server/app/share/[id]/file/page_client-reference-manifest.js +1 -1
- package/.next/server/app/share/[id]/page.js +2 -2
- package/.next/server/app/share/[id]/page.js.nft.json +1 -1
- package/.next/server/app/share/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/utilities/[scope]/[id]/page.js +2 -2
- package/.next/server/app/utilities/[scope]/[id]/page.js.nft.json +1 -1
- package/.next/server/app/utilities/[scope]/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/utilities/page.js +2 -2
- package/.next/server/app/utilities/page.js.nft.json +1 -1
- package/.next/server/app/utilities/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +9 -9
- package/.next/server/chunks/{6435.js → 1088.js} +1 -1
- package/.next/server/chunks/1105.js +1 -1
- package/.next/server/chunks/1179.js +1 -0
- package/.next/server/chunks/1223.js +1 -1
- package/.next/server/chunks/1244.js +1 -1
- package/.next/server/chunks/1281.js +80 -0
- package/.next/server/chunks/1336.js +252 -0
- package/.next/server/chunks/1353.js +51 -0
- package/.next/server/chunks/1431.js +1 -0
- package/.next/server/chunks/146.js +2 -0
- package/.next/server/chunks/1491.js +79 -0
- package/.next/server/chunks/1496.js +148 -0
- package/.next/server/chunks/{9631.js → 1589.js} +2 -2
- package/.next/server/chunks/1623.js +1 -0
- package/.next/server/chunks/1862.js +77 -0
- package/.next/server/chunks/1888.js +1 -1
- package/.next/server/chunks/1908.js +1 -0
- package/.next/server/chunks/192.js +1 -0
- package/.next/server/chunks/2069.js +1 -0
- package/.next/server/chunks/2087.js +24 -0
- package/.next/server/chunks/209.js +1 -0
- package/.next/server/chunks/2115.js +77 -0
- package/.next/server/chunks/2232.js +80 -0
- package/.next/server/chunks/{4460.js → 2262.js} +2 -2
- package/.next/server/chunks/2280.js +1 -0
- package/.next/server/chunks/2433.js +1 -1
- package/.next/server/chunks/2485.js +3 -8
- package/.next/server/chunks/2503.js +1 -1
- package/.next/server/chunks/2539.js +93 -0
- package/.next/server/chunks/2764.js +80 -0
- package/.next/server/chunks/285.js +24 -75
- package/.next/server/chunks/2888.js +7 -0
- package/.next/server/chunks/302.js +1 -0
- package/.next/server/chunks/3029.js +36 -0
- package/.next/server/chunks/3110.js +0 -0
- package/.next/server/chunks/3117.js +1 -0
- package/.next/server/chunks/3258.js +23 -0
- package/.next/server/chunks/331.js +1 -0
- package/.next/server/chunks/3332.js +1 -1
- package/.next/server/chunks/{4251.js → 3474.js} +24 -25
- package/.next/server/chunks/3552.js +43 -0
- package/.next/server/chunks/3583.js +104 -0
- package/.next/server/chunks/3631.js +1 -0
- package/.next/server/chunks/3633.js +1 -0
- package/.next/server/chunks/383.js +1 -80
- package/.next/server/chunks/3834.js +1 -1
- package/.next/server/chunks/3953.js +1 -0
- package/.next/server/chunks/3992.js +1 -0
- package/.next/server/chunks/4013.js +1 -0
- package/.next/server/chunks/4031.js +3 -3
- package/.next/server/chunks/4119.js +1 -0
- package/.next/server/chunks/4230.js +12 -0
- package/.next/server/chunks/4250.js +1 -0
- package/.next/server/chunks/4294.js +1 -0
- package/.next/server/chunks/4312.js +1 -0
- package/.next/server/chunks/4342.js +1 -0
- package/.next/server/chunks/4360.js +1 -0
- package/.next/server/chunks/449.js +226 -0
- package/.next/server/chunks/4578.js +0 -0
- package/.next/server/chunks/4585.js +1 -0
- package/.next/server/chunks/4611.js +1 -1
- package/.next/server/chunks/4639.js +1 -0
- package/.next/server/chunks/4682.js +1 -0
- package/.next/server/chunks/4788.js +153 -0
- package/.next/server/chunks/4812.js +2 -2
- package/.next/server/chunks/4925.js +1 -1
- package/.next/server/chunks/4952.js +1 -0
- package/.next/server/chunks/4969.js +4 -1
- package/.next/server/chunks/4989.js +801 -0
- package/.next/server/chunks/5211.js +64 -0
- package/.next/server/chunks/5243.js +1 -1
- package/.next/server/chunks/5308.js +1 -0
- package/.next/server/chunks/5461.js +1 -0
- package/.next/server/chunks/5549.js +1 -0
- package/.next/server/chunks/5719.js +34 -0
- package/.next/server/chunks/5810.js +12 -0
- package/.next/server/chunks/5922.js +1 -0
- package/.next/server/chunks/6142.js +1 -1
- package/.next/server/chunks/6216.js +1 -1
- package/.next/server/chunks/6318.js +9 -0
- package/.next/server/chunks/6483.js +1 -1
- package/.next/server/chunks/6509.js +1 -0
- package/.next/server/chunks/6571.js +166 -0
- package/.next/server/chunks/660.js +1 -0
- package/.next/server/chunks/6692.js +1 -0
- package/.next/server/chunks/6730.js +1 -1
- package/.next/server/chunks/6852.js +1 -0
- package/.next/server/chunks/6970.js +1 -0
- package/.next/server/chunks/7007.js +1 -0
- package/.next/server/chunks/7188.js +1 -1
- package/.next/server/chunks/7220.js +1 -1
- package/.next/server/chunks/7228.js +1 -0
- package/.next/server/chunks/7244.js +1 -0
- package/.next/server/chunks/7373.js +90 -0
- package/.next/server/chunks/7430.js +1 -1
- package/.next/server/chunks/7523.js +1 -0
- package/.next/server/chunks/7576.js +1 -0
- package/.next/server/chunks/7742.js +7 -0
- package/.next/server/chunks/7811.js +215 -0
- package/.next/server/chunks/7885.js +1 -0
- package/.next/server/chunks/8032.js +3 -0
- package/.next/server/chunks/8095.js +24 -0
- package/.next/server/chunks/8129.js +5 -0
- package/.next/server/chunks/8294.js +1 -0
- package/.next/server/chunks/832.js +1 -0
- package/.next/server/chunks/8464.js +180 -0
- package/.next/server/chunks/8511.js +0 -0
- package/.next/server/chunks/8514.js +1 -1
- package/.next/server/chunks/8583.js +4 -0
- package/.next/server/chunks/8609.js +55 -0
- package/.next/server/chunks/8711.js +1 -0
- package/.next/server/chunks/8714.js +1 -0
- package/.next/server/chunks/8730.js +1 -0
- package/.next/server/chunks/8868.js +1 -0
- package/.next/server/chunks/9048.js +1 -0
- package/.next/server/chunks/9058.js +1 -0
- package/.next/server/chunks/9062.js +1 -0
- package/.next/server/chunks/9094.js +1 -0
- package/.next/server/chunks/9098.js +1 -1
- package/.next/server/chunks/9099.js +1 -0
- package/.next/server/chunks/9171.js +287 -0
- package/.next/server/chunks/9181.js +1 -0
- package/.next/server/chunks/9293.js +1 -1
- package/.next/server/chunks/9478.js +1 -0
- package/.next/server/chunks/9494.js +141 -0
- package/.next/server/chunks/952.js +1 -0
- package/.next/server/chunks/9600.js +1 -0
- package/.next/server/chunks/9607.js +29 -0
- package/.next/server/chunks/9653.js +115 -0
- package/.next/server/chunks/9784.js +1 -0
- package/.next/server/chunks/9798.js +1 -0
- package/.next/server/chunks/9990.js +1 -0
- package/.next/server/edge-instrumentation.js +2 -0
- package/.next/server/edge-instrumentation.js.map +1 -0
- package/.next/server/functions-config-manifest.json +3 -3
- package/.next/server/instrumentation.js +1 -0
- package/.next/server/instrumentation.js.nft.json +1 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +6 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/_error.js +3 -3
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/3363-f417b308a8cd156d.js +1 -0
- package/.next/static/chunks/3686-0107521d2c14950c.js +1 -0
- package/.next/static/chunks/3695-3576767108de7f38.js +1 -0
- package/.next/static/chunks/4108.19abaa6d618295ed.js +1 -0
- package/.next/static/chunks/5933-4013a6dab4565b5e.js +1 -0
- package/.next/static/chunks/7425-9684ea815b4b1731.js +1 -0
- package/.next/static/chunks/7552-def8a17828891c8c.js +1 -0
- package/.next/static/chunks/8776-2df966dd98c68fd7.js +1 -0
- package/.next/static/chunks/app/layout-baad68d32b917b8f.js +1 -0
- package/.next/static/chunks/app/onboarding/page-b1b1e6a4467ed781.js +1 -0
- package/.next/static/chunks/app/page-556a2139313c3c71.js +1 -0
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-52223811258d07b2.js +1 -0
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-0df769f27549cd16.js +1 -0
- package/.next/static/chunks/app/roots/[id]/memory/{page-4edc11023d8a13fd.js → page-1f6bc3a624b141a5.js} +1 -1
- package/.next/static/chunks/app/roots/[id]/page-17493991b2d391b3.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-a21fe3541418a80a.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/page-0952e5fb53d53c3e.js +1 -0
- package/.next/static/chunks/app/roots/new/{page-98d64261cc2ae2a1.js → page-4f571184c1856103.js} +1 -1
- package/.next/static/chunks/app/settings/page-8c0ad1c1856da988.js +1 -0
- package/.next/static/chunks/app/share/[id]/page-b27a0bc7b9c6cda9.js +1 -0
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-0fe4c377098064d5.js +1 -0
- package/.next/static/chunks/app/utilities/page-445933dcd5a500ae.js +1 -0
- package/.next/static/chunks/{webpack-dbfe1e5d0f7f7a98.js → webpack-88066a85eb2d605f.js} +1 -1
- package/.next/trace +116 -90
- package/dist/lib/reflex/ids.js +66 -0
- package/dist/lib/reflex/ids.js.map +1 -0
- package/dist/lib/reflex/paths.js +26 -0
- package/dist/lib/reflex/paths.js.map +1 -1
- package/dist/lib/reflex/store/json-store.js +50 -0
- package/dist/lib/reflex/store/json-store.js.map +1 -0
- package/package.json +10 -6
- package/.next/server/chunks/133.js +0 -1
- package/.next/server/chunks/1358.js +0 -1
- package/.next/server/chunks/2389.js +0 -4
- package/.next/server/chunks/2787.js +0 -1
- package/.next/server/chunks/3240.js +0 -1
- package/.next/server/chunks/3295.js +0 -1
- package/.next/server/chunks/4842.js +0 -1
- package/.next/server/chunks/5319.js +0 -1
- package/.next/server/chunks/5543.js +0 -1
- package/.next/server/chunks/569.js +0 -1
- package/.next/server/chunks/6356.js +0 -3
- package/.next/server/chunks/7229.js +0 -2
- package/.next/server/chunks/7607.js +0 -1
- package/.next/server/chunks/8040.js +0 -1
- package/.next/server/chunks/8124.js +0 -1
- package/.next/server/chunks/8576.js +0 -7
- package/.next/server/chunks/9809.js +0 -1
- package/.next/server/chunks/9835.js +0 -1
- package/.next/static/chunks/2885-3b6efe9070ae7699.js +0 -1
- package/.next/static/chunks/334-e9ffb96d6720ee5b.js +0 -1
- package/.next/static/chunks/4108.a04c1e0b768f6392.js +0 -1
- package/.next/static/chunks/5371-f2503fe0dffea57d.js +0 -1
- package/.next/static/chunks/5744-eccd279a734c778c.js +0 -1
- package/.next/static/chunks/6568-e4d2de23d9f8d347.js +0 -1
- package/.next/static/chunks/6642-02be14d0b5ca62b7.js +0 -1
- package/.next/static/chunks/8566-5d4c89b722d9cee1.js +0 -1
- package/.next/static/chunks/8775-890699c74c28df61.js +0 -1
- package/.next/static/chunks/app/layout-48a6fb46c228b814.js +0 -1
- package/.next/static/chunks/app/onboarding/page-06103f281ff3f063.js +0 -1
- package/.next/static/chunks/app/page-eed31ba1b952cf24.js +0 -1
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-5fc17c5819406917.js +0 -1
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-a52b2005a7e538ca.js +0 -1
- package/.next/static/chunks/app/roots/[id]/page-0f0d498f4b4bd7bf.js +0 -1
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-f93d6b1bb29e79f0.js +0 -1
- package/.next/static/chunks/app/roots/[id]/workflows/page-562913d54bcd08d5.js +0 -1
- package/.next/static/chunks/app/settings/page-7a4d8a407fbe5ed8.js +0 -1
- package/.next/static/chunks/app/share/[id]/page-a0540dba09771e84.js +0 -1
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-2cee9be029f211c6.js +0 -1
- package/.next/static/chunks/app/utilities/page-197156f16167514e.js +0 -1
- /package/.next/static/{kKiRbrTiD77WXduAvKNfN → EXoiX_YvMRCB6oNXqJnaz}/_buildManifest.js +0 -0
- /package/.next/static/{kKiRbrTiD77WXduAvKNfN → EXoiX_YvMRCB6oNXqJnaz}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=569,exports.ids=[569,4553],exports.modules={10569:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{isDue:()=>q,startWidgetScheduler:()=>m,stopWidgetScheduler:()=>n});var e=c(53905),f=c(93554),g=c(51021),h=c(69509),i=c(1405),j=c(94553),k=a([f,g]);[f,g]=k.then?(await k)():k;let s="__reflexWidgetScheduler";function l(){return globalThis[s]||(globalThis[s]={intervalId:null,ticking:!1,startedAt:new Date().toISOString()}),globalThis[s]}function m(){let a=l();a.intervalId||(setTimeout(()=>{o().catch(a=>{console.error("[widget-scheduler] initial tick failed:",a)})},3e4),a.intervalId=setInterval(()=>{o().catch(a=>{console.error("[widget-scheduler] tick failed:",a)})},3e5))}function n(){let a=l();a.intervalId&&(clearInterval(a.intervalId),a.intervalId=null)}async function o(){let a=l();if(!a.ticking){a.ticking=!0;try{for(let a of(await (0,e.listRoots)()))try{await p(a.id,a.path)}catch(b){console.error(`[widget-scheduler] root ${a.id} failed:`,b instanceof Error?b.message:b)}}finally{a.ticking=!1}}}async function p(a,b){for(let d of(await (0,h.listWidgets)(b))){if(q(d)){if("utility-card"===d.kind){let{refreshUtilityCard:b}=await Promise.all([c.e(9861),c.e(4031),c.e(269)]).then(c.bind(c,30269)),e=await b(a,d.id);e.ok||console.error(`[widget-scheduler] ${d.id} card refresh: ${e.error}`);continue}d.sourceTopicId&&(f.z.isActive(d.sourceTopicId)||await r(a,b,d))}}}function q(a){if(!a.refresh||"manual"===a.refresh)return!1;let b=i.VQ[a.refresh];if(!b)return!1;let c=a.lastRefreshAt??a.updatedAt,d=Date.now()-Date.parse(c);return Number.isFinite(d)&&d>=b}async function r(a,b,c){let d={...c,lastRefreshAt:new Date().toISOString()};await (0,h.writeWidget)(b,d);let e=await (0,j.buildRefreshPromptForWidget)(b,d),f=await (0,g.startOrchestratorTurn)({rootId:a,topicId:c.sourceTopicId,message:e,attachments:[]});"error"in f&&console.error(`[widget-scheduler] couldn't start refresh for ${c.id}: ${f.error}`)}d()}catch(a){d(a)}})},94553:(a,b,c)=>{c.d(b,{buildRefreshPromptForWidget:()=>e});var d=c(69509);async function e(a,b){let c=b.memoryFile?await (0,d.iq)(a,b.memoryFile):null,e=[];return e.push(`[Reflex auto-refresh] Widget "${b.title}" (id: \`${b.id}\`, kind: \`${b.kind}\`) is due for an update.`),e.push(""),e.push("Current widget data:"),e.push("```json"),e.push(JSON.stringify(b.data,null,2)),e.push("```"),e.push(""),b.memory&&b.memory.trim()&&(e.push("Current inline memory:"),e.push("```"),e.push(b.memory),e.push("```"),e.push("")),b.memoryFile&&(e.push(`Memory file: \`${b.memoryFile}\``),c&&c.trim()?(e.push("```markdown"),e.push(c.slice(0,4e3)),e.push("```")):e.push("_(file is empty or does not exist — create it on the first update)_"),e.push("")),e.push("What to do:"),e.push(`- Emit \`<<reflex:widget-update>>\` with id="${b.id}" and fresh data.`),e.push("- If `memory` exists, update its contents (dedup links, value history, etc.). Do not reset it to empty."),b.memoryFile&&e.push(`- If it makes sense, append to memoryFile (\`${b.memoryFile}\`) via \`<<reflex:kb>>\` (kind="widget-memory", title="<title>"). Do not duplicate the widget's own data there.`),e.push("- Keep the chat reply short (one line) — this is an automatic refresh, no extended commentary needed."),e.push(`- Cadence: \`${b.refresh??"manual"}\`. Do not change it without an explicit request.`),e.join("\n")}}};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=6356,exports.ids=[6356],exports.modules={5264:(a,b,c)=>{c.d(b,{ShareButton:()=>p});var d=c(64173),e=c(17240);let f=(0,c(42557).A)("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);var g=c(12619),h=c(28082),i=c(66979),j=c(42324),k=c(44052),l=c(71813),m=c(3265);let n=(0,m.createServerReference)("40af21268aee9de3b7119be64c660a3d2fc748d535",m.callServer,void 0,m.findSourceMapURL,"createShareAction");var o=c(13323);function p(a){let b=(0,l.c)("app"),[c,m]=(0,e.useState)(!1),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useTransition)(),[t,u]=(0,e.useState)(null);return c?t?(0,d.jsxs)("div",{className:"rounded border bg-card p-2 text-xs space-y-1.5 w-full max-w-sm",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-emerald-700",children:[(0,d.jsx)(g.A,{className:"h-3.5 w-3.5"}),(0,d.jsx)("span",{className:"font-medium",children:b("share.button.createdTitle")})]}),(0,d.jsx)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"block font-mono text-[11px] text-violet-700 hover:underline break-all",children:t.url}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(t.url).then(()=>k.oR.success(b("share.button.copied"))),className:"inline-flex items-center gap-1 rounded border px-2 py-0.5 hover:bg-accent",children:[(0,d.jsx)(h.A,{className:"h-3 w-3"}),b("share.button.copy")]}),(0,d.jsx)("button",{type:"button",onClick:()=>{u(null),m(!1),q("")},className:"text-muted-foreground hover:text-foreground",children:b("share.button.done")})]})]}):(0,d.jsxs)("div",{className:"rounded border bg-card p-2 text-xs space-y-1.5 w-full max-w-sm",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)(f,{className:"h-3.5 w-3.5 text-violet-600"}),(0,d.jsx)("span",{className:"font-medium",children:b("share.button.newLink")}),(0,d.jsx)("button",{type:"button",onClick:()=>m(!1),className:"ml-auto text-muted-foreground hover:text-foreground",children:(0,d.jsx)(i.A,{className:"h-3 w-3"})})]}),(0,d.jsx)("label",{className:"block text-[10px] text-muted-foreground",children:b("share.button.passwordLabel")}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)(j.A,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground pointer-events-none"}),(0,d.jsx)("input",{type:"password",value:p,onChange:a=>q(a.target.value),autoFocus:!0,placeholder:b("share.button.passwordPlaceholder"),className:"w-full rounded border bg-background pl-6 pr-2 py-1 text-xs focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),(0,d.jsx)("button",{type:"button",onClick:()=>{s(async()=>{let c=await (0,o.N)(),d=await n({kind:a.kind,...a.rootId?{rootId:a.rootId}:{},...a.utilityScope?{utilityScope:a.utilityScope}:{},...a.utilityId?{utilityId:a.utilityId}:{},...a.kbRelPath?{kbRelPath:a.kbRelPath}:{},...a.label?{label:a.label}:{},...p.trim()?{password:p.trim()}:{}});if(!d.ok)return void k.oR.error(d.error);let e=c.status.publicUrl??window.location.origin,f=new URL(`/share/${d.share.id}`,e).toString();u({share:d.share,url:f}),navigator.clipboard.writeText(f).catch(()=>null),k.oR.success(c.status.running?b("share.button.created"):b("share.button.createdNoTunnel"))})},disabled:r,className:"w-full rounded bg-violet-600 text-white px-2 py-1 hover:bg-violet-700 disabled:opacity-50 inline-flex items-center justify-center gap-1",children:r?b("share.button.creating"):b("share.button.create")}),(0,d.jsx)("p",{className:"text-[10px] text-muted-foreground",children:b("share.button.footer")})]}):(0,d.jsxs)("button",{type:"button",onClick:()=>m(!0),className:a.iconOnly?"p-1 rounded hover:bg-accent text-muted-foreground hover:text-violet-700":"inline-flex items-center gap-1 rounded border px-2 py-1 text-xs hover:bg-accent",title:b("share.button.title"),children:[(0,d.jsx)(f,{className:"h-3.5 w-3.5"}),!a.iconOnly&&b("share.button.label")]})}},12650:(a,b,c)=>{c.d(b,{E:()=>f});var d=c(64173),e=c(91344);function f({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"skeleton",className:(0,e.cn)("animate-pulse rounded-md bg-accent",a),...b})}},14425:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(42557).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},15620:(a,b,c)=>{c.d(b,{CommandBar:()=>o});var d=c(64173),e=c(17240),f=c(87671),g=c(71813),h=c(73569),i=c(44052),j=c(79308),k=c(25613),l=c(8836),m=c(88724),n=c(6449);function o({rootId:a,focusFile:b}){let c=(0,g.c)("roots"),[,o]=(0,e.useTransition)(),p=(0,f.useRouter)();return(0,d.jsx)(l.E,{label:c("commandBar.label"),children:(0,d.jsx)(n.L,{rootId:a,placeholder:c("commandBar.placeholder"),submitLabel:c("commandBar.submit"),pendingLabel:c("commandBar.submitPending"),SubmitIcon:h.A,onSubmit:async({message:d,attachments:e})=>await new Promise(f=>{o(async()=>{let g=await (0,j.g)(a,d,e,b);if(!g.ok){i.oR.error(g.error??c("commandBar.startFailed")),f(!1);return}(0,m.$d)(m.Zi.topicsChanged(a)),d.trim()&&(0,k.h)(a,g.topicId,d).then(b=>{b.ok&&(0,m.$d)(m.Zi.topicsChanged(a))}),p.push(`/roots/${a}/chat/${g.topicId}`),f(!0)})})})})}},16551:(a,b,c)=>{c.d(b,{Xi:()=>k,av:()=>l,j7:()=>j,tU:()=>h});var d=c(64173);c(17240);var e=c(20483),f=c(61193),g=c(91344);function h({className:a,orientation:b="horizontal",...c}){return(0,d.jsx)(f.Root,{"data-slot":"tabs","data-orientation":b,orientation:b,className:(0,g.cn)("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",a),...c})}let i=(0,e.F)("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function j({className:a,variant:b="default",...c}){return(0,d.jsx)(f.List,{"data-slot":"tabs-list","data-variant":b,className:(0,g.cn)(i({variant:b}),a),...c})}function k({className:a,...b}){return(0,d.jsx)(f.Trigger,{"data-slot":"tabs-trigger",className:(0,g.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",a),...b})}function l({className:a,...b}){return(0,d.jsx)(f.Content,{"data-slot":"tabs-content",className:(0,g.cn)("flex-1 outline-none",a),...b})}},16805:(a,b,c)=>{c.d(b,{ShareButton:()=>d});let d=(0,c(54491).registerClientReference)(function(){throw Error("Attempted to call ShareButton() from the server but ShareButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/reflex-agent/reflex-agent/app/_components/share-button.tsx","ShareButton")},22007:(a,b,c)=>{c.d(b,{InsertImageButton:()=>C});var d=c(64173),e=c(17240),f=c(87671),g=c(29130),h=c(71813),i=c(20583),j=c(66979),k=c(69552),l=c(65943);let m=(0,c(42557).A)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);var n=c(44052),o=c(47071),p=c(45477),q=c(80281),r=c(71155),s=c(16551),t=c(27456),u=c(12650),v=c(3265);let w=(0,v.createServerReference)("405ed0e5b3e6a22cff3025f7c5f276f695cc6be10d",v.callServer,void 0,v.findSourceMapURL,"generateAction"),x=(0,v.createServerReference)("408cc75c61588c659caa07242da0143eaa4822a34f",v.callServer,void 0,v.findSourceMapURL,"searchAction"),y=(0,v.createServerReference)("401477526ae11c4ba1341e704869a286d5159eea9f",v.callServer,void 0,v.findSourceMapURL,"attachAction"),z=(0,v.createServerReference)("40bea5c26db14e6c04d0b623728ad61b13c8aff415",v.callServer,void 0,v.findSourceMapURL,"uploadAction"),A=["1:1","16:9","9:16","4:3","3:4","21:9"];function B({rootId:a,open:b,onOpenChange:c,onInsert:f}){let v=(0,h.c)("app"),[B,C]=(0,e.useState)(""),[D,E]=(0,e.useState)("gemini"),[F,G]=(0,e.useState)("1:1"),[H,I]=(0,e.useState)(!0),[J,K]=(0,e.useState)(null),[L,M]=(0,e.useTransition)(),[N,O]=(0,e.useState)(""),[P,Q]=(0,e.useState)("unsplash"),[R,S]=(0,e.useState)([]),[T,U]=(0,e.useTransition)(),[V,W]=(0,e.useState)(null),[X,Y]=(0,e.useState)(!0),[Z,$]=(0,e.useState)(""),[_,aa]=(0,e.useState)(!0),[ab,ac]=(0,e.useTransition)();if(!b)return null;let ad=()=>{N.trim()&&(S([]),U(async()=>{let b=await x({rootId:a,query:N.trim(),provider:P,count:12});if(!b.ok)return void n.oR.error(b.error);S(b.results)}))};return(0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:a=>{a.target===a.currentTarget&&c(!1)},children:[(0,d.jsx)("div",{"aria-hidden":!0,className:"absolute inset-0 bg-background/80 backdrop-blur-sm",onClick:()=>c(!1)}),(0,d.jsxs)("div",{className:"relative bg-card border rounded-lg shadow-xl w-full max-w-3xl max-h-[85vh] flex flex-col",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 border-b",children:[(0,d.jsx)(g.A,{className:"h-4 w-4 text-violet-600"}),(0,d.jsx)("h2",{className:"text-sm font-medium flex-1",children:v("images.titleHeader")}),(0,d.jsx)(i.$,{type:"button",size:"icon",variant:"ghost",className:"h-7 w-7",onClick:()=>c(!1),children:(0,d.jsx)(j.A,{className:"h-4 w-4"})})]}),(0,d.jsxs)(s.tU,{defaultValue:"generate",className:"flex-1 min-h-0 flex flex-col",children:[(0,d.jsxs)(s.j7,{className:"mx-4 mt-3 self-start",children:[(0,d.jsxs)(s.Xi,{value:"generate",children:[(0,d.jsx)(k.A,{className:"mr-1 h-3.5 w-3.5"})," ",v("images.tabGenerate")]}),(0,d.jsxs)(s.Xi,{value:"search",children:[(0,d.jsx)(l.A,{className:"mr-1 h-3.5 w-3.5"})," ",v("images.tabSearch")]}),(0,d.jsxs)(s.Xi,{value:"upload",children:[(0,d.jsx)(m,{className:"mr-1 h-3.5 w-3.5"})," ",v("images.tabUpload")]})]}),(0,d.jsxs)(t.F,{className:"flex-1 min-h-0",children:[(0,d.jsxs)(s.av,{value:"generate",className:"px-4 py-4 space-y-3",children:[(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)(q.J,{htmlFor:"img-prompt",children:v("images.promptLabel")}),(0,d.jsx)(p.T,{id:"img-prompt",value:B,onChange:a=>C(a.target.value),placeholder:v("images.promptPlaceholder"),rows:4})]}),(0,d.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)(q.J,{children:v("images.providerLabel")}),(0,d.jsxs)(r.l6,{value:D,onValueChange:a=>E(a),children:[(0,d.jsx)(r.bq,{children:(0,d.jsx)(r.yv,{})}),(0,d.jsxs)(r.gC,{children:[(0,d.jsx)(r.eb,{value:"gemini",children:"Gemini Nano Banana"}),(0,d.jsx)(r.eb,{value:"codex",children:"Codex $imagegen"})]})]})]}),(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)(q.J,{children:v("images.aspectLabel")}),(0,d.jsxs)(r.l6,{value:F,onValueChange:G,children:[(0,d.jsx)(r.bq,{children:(0,d.jsx)(r.yv,{})}),(0,d.jsx)(r.gC,{children:A.map(a=>(0,d.jsx)(r.eb,{value:a,children:a},a))})]})]})]}),(0,d.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,d.jsx)("input",{type:"checkbox",checked:H,onChange:a=>I(a.target.checked)}),v("images.saveToKb")]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(i.$,{type:"button",size:"sm",onClick:()=>{B.trim()&&(K(null),M(async()=>{let b=await w({rootId:a,prompt:B.trim(),provider:D,aspectRatio:F,attachToKb:H});if(!b.ok)return void n.oR.error(b.error);K({url:b.url,markdown:b.markdown,...b.kbRelPath?{kbRelPath:b.kbRelPath}:{}})}))},disabled:L||!B.trim(),children:L?v("images.generating"):v("images.generate")}),L&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:v("images.takesAMinute")})]}),L?(0,d.jsx)(u.E,{className:"h-64 w-full"}):J?(0,d.jsxs)("div",{className:"space-y-2 border rounded p-3",children:[(0,d.jsx)("img",{src:J.url,alt:B,className:"max-h-80 mx-auto rounded"}),(0,d.jsxs)("div",{className:"flex gap-2 justify-end",children:[(0,d.jsx)(i.$,{type:"button",size:"sm",variant:"outline",onClick:()=>K(null),children:v("images.again")}),(0,d.jsx)(i.$,{type:"button",size:"sm",onClick:()=>{J&&(f?.(J),n.oR.success(J.kbRelPath?v("images.savedToKb",{path:J.kbRelPath}):v("images.ready")),c(!1))},children:v("images.insert")})]})]}):null]}),(0,d.jsxs)(s.av,{value:"search",className:"px-4 py-4 space-y-3",children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(o.p,{value:N,onChange:a=>O(a.target.value),placeholder:v("images.searchPlaceholder"),onKeyDown:a=>{"Enter"===a.key&&ad()}}),(0,d.jsxs)(r.l6,{value:P,onValueChange:a=>Q(a),children:[(0,d.jsx)(r.bq,{className:"w-36",children:(0,d.jsx)(r.yv,{})}),(0,d.jsxs)(r.gC,{children:[(0,d.jsx)(r.eb,{value:"unsplash",children:"Unsplash"}),(0,d.jsx)(r.eb,{value:"pexels",children:"Pexels"}),(0,d.jsx)(r.eb,{value:"brave",children:v("images.braveWeb")})]})]}),(0,d.jsx)(i.$,{type:"button",size:"sm",onClick:ad,disabled:T||!N.trim(),children:v("images.find")})]}),(0,d.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,d.jsx)("input",{type:"checkbox",checked:X,onChange:a=>Y(a.target.checked)}),v("images.saveToKb")]}),T&&0===R.length?(0,d.jsx)("div",{className:"grid grid-cols-3 gap-2",children:Array.from({length:6}).map((a,b)=>(0,d.jsx)(u.E,{className:"h-32 w-full"},b))}):R.length>0?(0,d.jsx)("div",{className:"grid grid-cols-3 gap-2",children:R.map(b=>(0,d.jsxs)("button",{type:"button",disabled:null!==V,onClick:()=>{W(b.url),U(async()=>{let d=await y({rootId:a,sourceUrl:b.url,alt:N.trim()||"image",attribution:b.attribution,attachToKb:X});if(W(null),!d.ok)return void n.oR.error(d.error);f?.({url:d.url,markdown:d.markdown,...d.kbRelPath?{kbRelPath:d.kbRelPath}:{}}),n.oR.success(d.kbRelPath?v("images.savedToKb",{path:d.kbRelPath}):v("images.savedToProject")),c(!1)})},className:"group relative overflow-hidden rounded border hover:border-violet-500 disabled:opacity-50",title:`${b.attribution.name} \xb7 ${b.provider}`,children:[(0,d.jsx)("img",{src:b.thumb,alt:"",className:"h-32 w-full object-cover"}),(0,d.jsx)("div",{className:"absolute bottom-0 inset-x-0 px-1.5 py-0.5 text-[10px] bg-black/60 text-white truncate",children:b.attribution.name}),V===b.url&&(0,d.jsx)("div",{className:"absolute inset-0 bg-black/40 flex items-center justify-center text-xs text-white",children:v("images.saving")})]},b.url))}):(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:v("images.noKeys")})]}),(0,d.jsxs)(s.av,{value:"upload",className:"px-4 py-4 space-y-3",children:[(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)(q.J,{htmlFor:"img-alt",children:v("images.altLabel")}),(0,d.jsx)(o.p,{id:"img-alt",value:Z,onChange:a=>$(a.target.value),placeholder:v("images.altPlaceholder")})]}),(0,d.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,d.jsx)("input",{type:"checkbox",checked:_,onChange:a=>aa(a.target.checked)}),v("images.saveToKb")]}),(0,d.jsx)(o.p,{type:"file",accept:"image/*",disabled:ab,onChange:b=>{let d=b.target.files?.[0];d&&ac(async()=>{let b=function(a){let b=new Uint8Array(a),c="";for(let a=0;a<b.length;a+=32768){let d=b.subarray(a,a+32768);c+=String.fromCharCode.apply(null,Array.from(d))}return btoa(c)}(await d.arrayBuffer()),e=await z({rootId:a,base64:b,mime:d.type,alt:Z||d.name.replace(/\.[^.]+$/,""),attachToKb:_});if(!e.ok)return void n.oR.error(e.error);f?.({url:e.url,markdown:e.markdown,...e.kbRelPath?{kbRelPath:e.kbRelPath}:{}}),n.oR.success(e.kbRelPath?v("images.savedToKb",{path:e.kbRelPath}):v("images.uploaded")),c(!1)})}}),ab&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:v("images.uploading")})]})]})]})]})]})}function C({rootId:a,redirectToKb:b=!0}){let[c,j]=(0,e.useState)(!1),k=(0,f.useRouter)(),l=(0,h.c)("app");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>j(!0),children:[(0,d.jsx)(g.A,{className:"mr-1 h-4 w-4"})," ",l("images.button")]}),(0,d.jsx)(B,{rootId:a,open:c,onOpenChange:j,onInsert:({kbRelPath:c})=>{if(b&&c){let b=c.split("/").map(encodeURIComponent).join("/");k.push(`/roots/${a}/kb/${b}`)}}})]})}},25613:(a,b,c)=>{c.d(b,{h:()=>e});var d=c(3265);let e=(0,d.createServerReference)("7010628a78159b1f83a5690a4560f1bb4885d9c35a",d.callServer,void 0,d.findSourceMapURL,"generateTopicTitleAction")},27129:(a,b,c)=>{c.d(b,{Cz:()=>k,IK:()=>l,hN:()=>j,uA:()=>i});var d=c(73745);c(66493);var e=c(56942),f=c(53905),g=c(84579),h=c(91388);async function i(a){try{let b,c=await (0,g.generateImage)({rootId:a.rootId,prompt:a.prompt,...a.provider?{provider:a.provider}:{},...a.aspectRatio?{aspectRatio:a.aspectRatio}:{},...a.alt?{alt:a.alt}:{}}),d=n(a.alt||a.prompt),e=``;return a.attachToKb&&(b=await m(a.rootId,{title:a.alt||a.prompt.slice(0,80),markdown:e,meta:{provider:c.provider,prompt:a.prompt,sha:c.sha,...a.aspectRatio?{aspectRatio:a.aspectRatio}:{}}})),{ok:!0,url:c.urlPath,sha:c.sha,markdown:e,...b?{kbRelPath:b}:{}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function j(a){try{let b=await (0,g.searchImages)({query:a.query,...a.provider?{provider:a.provider}:{},...a.count?{count:a.count}:{}});return{ok:!0,results:b}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function k(a){try{let b,c=await (0,g.attachRemote)({rootId:a.rootId,sourceUrl:a.sourceUrl}),d=n(a.alt||"image"),e=a.attribution?`
|
|
2
|
-
|
|
3
|
-
_Photo: [${a.attribution.name}](${a.attribution.link})_`:"",f=`${e}`;return a.attachToKb&&(b=await m(a.rootId,{title:a.alt||"Found image",markdown:f,meta:{source:"web",sourceUrl:a.sourceUrl,sha:c.sha,...a.attribution?{author:a.attribution.name,authorUrl:a.attribution.link}:{}}})),{ok:!0,url:c.urlPath,sha:c.sha,markdown:f,...b?{kbRelPath:b}:{}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function l(a){try{let b,c=Buffer.from(a.base64,"base64");if(0===c.byteLength)return{ok:!1,error:"Empty upload"};if(!a.mime.startsWith("image/"))return{ok:!1,error:`Unsupported mime: ${a.mime}`};let d=await (0,h.YN)(a.rootId,c,a.mime),e=n(a.alt||"image"),f=``;return a.attachToKb&&(b=await m(a.rootId,{title:a.alt||"Uploaded image",markdown:f,meta:{source:"upload",sha:d.sha,mime:a.mime}})),{ok:!0,url:d.urlPath,sha:d.sha,markdown:f,...b?{kbRelPath:b}:{}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function m(a,b){let c=await (0,f.getRoot)(a);if(!c)throw Error(`unknown rootId: ${a}`);return(await (0,e.j)({rootPath:c.path,directive:{kind:"image",title:b.title,body:b.markdown,meta:b.meta}})).relPath}function n(a){return a.replace(/[\[\]\n]/g," ").slice(0,200)}(0,c(63781).D)([i,j,k,l]),(0,d.A)(i,"405ed0e5b3e6a22cff3025f7c5f276f695cc6be10d",null),(0,d.A)(j,"408cc75c61588c659caa07242da0143eaa4822a34f",null),(0,d.A)(k,"401477526ae11c4ba1341e704869a286d5159eea9f",null),(0,d.A)(l,"40bea5c26db14e6c04d0b623728ad61b13c8aff415",null)},29130:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(42557).A)("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},71155:(a,b,c)=>{c.d(b,{bq:()=>l,eb:()=>n,gC:()=>m,l6:()=>j,yv:()=>k});var d=c(64173);c(17240);var e=c(58405),f=c(12619),g=c(78724),h=c(13976),i=c(91344);function j({...a}){return(0,d.jsx)(h.Root,{"data-slot":"select",...a})}function k({...a}){return(0,d.jsx)(h.Value,{"data-slot":"select-value",...a})}function l({className:a,size:b="default",children:c,...f}){return(0,d.jsxs)(h.Trigger,{"data-slot":"select-trigger","data-size":b,className:(0,i.cn)("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",a),...f,children:[c,(0,d.jsx)(h.Icon,{asChild:!0,children:(0,d.jsx)(e.A,{className:"size-4 opacity-50"})})]})}function m({className:a,children:b,position:c="item-aligned",align:e="center",...f}){return(0,d.jsx)(h.Portal,{children:(0,d.jsxs)(h.Content,{"data-slot":"select-content",className:(0,i.cn)("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","popper"===c&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:c,align:e,...f,children:[(0,d.jsx)(o,{}),(0,d.jsx)(h.Viewport,{className:(0,i.cn)("p-1","popper"===c&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:b}),(0,d.jsx)(p,{})]})})}function n({className:a,children:b,...c}){return(0,d.jsxs)(h.Item,{"data-slot":"select-item",className:(0,i.cn)("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",a),...c,children:[(0,d.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,d.jsx)(h.ItemIndicator,{children:(0,d.jsx)(f.A,{className:"size-4"})})}),(0,d.jsx)(h.ItemText,{children:b})]})}function o({className:a,...b}){return(0,d.jsx)(h.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:(0,i.cn)("flex cursor-default items-center justify-center py-1",a),...b,children:(0,d.jsx)(g.A,{className:"size-4"})})}function p({className:a,...b}){return(0,d.jsx)(h.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:(0,i.cn)("flex cursor-default items-center justify-center py-1",a),...b,children:(0,d.jsx)(e.A,{className:"size-4"})})}},78724:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(42557).A)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},79308:(a,b,c)=>{c.d(b,{g:()=>e});var d=c(3265);let e=(0,d.createServerReference)("78dbb9bb90114fd6df202c0c0a59303b73f21fc8f3",d.callServer,void 0,d.findSourceMapURL,"startTopicAction")},86673:(a,b,c)=>{c.d(b,{InsertImageButton:()=>d});let d=(0,c(54491).registerClientReference)(function(){throw Error("Attempted to call InsertImageButton() from the server but InsertImageButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/reflex-agent/reflex-agent/app/_components/kb/insert-image-button.tsx","InsertImageButton")},88842:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(19963).A)("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]])}};
|