reflex-agent 0.2.1 → 0.2.3
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 -101
- package/.next/app-path-routes-manifest.json +11 -11
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +3 -51
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +3 -3
- package/.next/server/app/agents/[agentId]/page.js +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_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_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_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_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_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_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/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/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/onboarding/page.js +3 -3
- 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 +3 -3
- 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 +3 -3
- 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]/page.js +3 -3
- 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_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/workflows/page.js +1 -1
- 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 +2 -2
- 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_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 +4 -4
- package/.next/server/app/utilities/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +11 -11
- package/.next/server/chunks/1105.js +1 -1
- package/.next/server/chunks/1223.js +1 -1
- package/.next/server/chunks/133.js +7 -7
- package/.next/server/chunks/1888.js +1 -1
- package/.next/server/chunks/1960.js +1 -1
- package/.next/server/chunks/1986.js +1 -1
- package/.next/server/chunks/2433.js +1 -1
- package/.next/server/chunks/2485.js +1 -1
- package/.next/server/chunks/2503.js +1 -1
- package/.next/server/chunks/2528.js +4 -0
- package/.next/server/chunks/3332.js +1 -1
- package/.next/server/chunks/4031.js +1 -1
- package/.next/server/chunks/4065.js +1 -0
- package/.next/server/chunks/4925.js +1 -1
- package/.next/server/chunks/5243.js +1 -1
- package/.next/server/chunks/6730.js +1 -1
- package/.next/server/chunks/6909.js +5 -5
- package/.next/server/chunks/6981.js +1 -0
- package/.next/server/chunks/7017.js +3 -0
- package/.next/server/chunks/{5401.js → 7800.js} +1 -1
- package/.next/server/chunks/8494.js +1 -0
- package/.next/server/chunks/8514.js +1 -1
- package/.next/server/chunks/9098.js +1 -1
- package/.next/server/chunks/9293.js +1 -1
- package/.next/server/chunks/9328.js +2 -2
- package/.next/server/chunks/9423.js +3 -0
- package/.next/server/chunks/9455.js +1 -0
- package/.next/server/chunks/9579.js +1 -1
- package/.next/server/functions-config-manifest.json +2 -2
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/_error.js +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/1384-d28fb6c6c058876f.js +1 -0
- package/.next/static/chunks/2718-78fee2c0de782178.js +1 -0
- package/.next/static/chunks/4108.1ef6b5e7679b56ac.js +1 -0
- package/.next/static/chunks/7238-11701befb3ca3e41.js +1 -0
- package/.next/static/chunks/7951-590bf2004d7935b5.js +1 -0
- package/.next/static/chunks/8423-ffded33a21b27360.js +1 -0
- package/.next/static/chunks/app/{layout-c7a35075cfbfa3e3.js → layout-4fbf9f91ad45e221.js} +1 -1
- package/.next/static/chunks/app/onboarding/page-532b193d1c4b0dee.js +1 -0
- package/.next/static/chunks/app/page-e3ec0990b78ce7c7.js +1 -0
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/{page-1b55f68984817d29.js → page-11aad9a40def2e0d.js} +1 -1
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-d8757a85e873dfa1.js +1 -0
- package/.next/static/chunks/app/roots/[id]/page-76216026efb90ae0.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/{page-738e8e4128baa722.js → page-c4b6e3825f8626f5.js} +1 -1
- package/.next/static/chunks/app/roots/new/page-53ea8d2787e79425.js +1 -0
- package/.next/static/chunks/app/settings/page-7ebaf2b62f256538.js +1 -0
- package/.next/static/chunks/app/share/[id]/{page-5bbc8503cb9a9eeb.js → page-d5bbbb7e454d1375.js} +1 -1
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-e2f928a37483d113.js +1 -0
- package/.next/static/chunks/app/utilities/page-839262ff726a52a2.js +1 -0
- package/.next/static/chunks/{webpack-2e8cca5826414cc6.js → webpack-87b4bb79fdc48563.js} +1 -1
- package/.next/trace +46 -46
- package/README.md +12 -1
- package/dist/bin/cli.js +1 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/preload.js +22 -0
- package/dist/bin/preload.js.map +1 -0
- package/dist/lib/reflex/commands/start.js +35 -0
- package/dist/lib/reflex/commands/start.js.map +1 -1
- package/dist/lib/reflex/home.js +18 -0
- package/dist/lib/reflex/home.js.map +1 -0
- package/dist/lib/reflex/prompts/store.js +2 -2
- package/dist/lib/reflex/prompts/store.js.map +1 -1
- package/lib/server/utilities/worker-bootstrap.js +87 -0
- package/package.json +2 -1
- package/.next/server/app/roots/new.html +0 -1
- package/.next/server/app/roots/new.meta +0 -7
- package/.next/server/app/roots/new.rsc +0 -21
- package/.next/server/app/settings.html +0 -1
- package/.next/server/app/settings.meta +0 -7
- package/.next/server/app/settings.rsc +0 -22
- package/.next/server/chunks/5152.js +0 -1
- package/.next/server/chunks/5373.js +0 -1
- package/.next/server/chunks/5436.js +0 -1
- package/.next/server/chunks/5986.js +0 -3
- package/.next/server/chunks/613.js +0 -1
- package/.next/server/chunks/6536.js +0 -3
- package/.next/server/chunks/6602.js +0 -4
- package/.next/static/chunks/4108.d6ed46bc2fcab462.js +0 -1
- package/.next/static/chunks/4895-712004156efeccf2.js +0 -1
- package/.next/static/chunks/6489-ecde2d94e57eb8a9.js +0 -1
- package/.next/static/chunks/6727-d38536774bdb32d5.js +0 -1
- package/.next/static/chunks/6734-9d524ec49e4ba49c.js +0 -1
- package/.next/static/chunks/6744-dbfe3cc4ce461613.js +0 -1
- package/.next/static/chunks/app/onboarding/page-cde5b92b13b03c63.js +0 -1
- package/.next/static/chunks/app/page-ddaeffdc9a15f597.js +0 -1
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-d4358cb6042740c4.js +0 -1
- package/.next/static/chunks/app/roots/[id]/page-703d96bf8208af2f.js +0 -1
- package/.next/static/chunks/app/roots/new/page-534769dce46d0d29.js +0 -1
- package/.next/static/chunks/app/settings/page-86ee3d07ea1acbc7.js +0 -1
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-72546d245b840091.js +0 -1
- package/.next/static/chunks/app/utilities/page-9f949d831421d314.js +0 -1
- /package/.next/static/{p8t15rbWhT5Rrs5fOXWZ6 → vTfQfQnAWV_hFVZjWEYvZ}/_buildManifest.js +0 -0
- /package/.next/static/{p8t15rbWhT5Rrs5fOXWZ6 → vTfQfQnAWV_hFVZjWEYvZ}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><!--p8t15rbWhT5Rrs5fOXWZ6--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/87e01f779d555d04.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-2e8cca5826414cc6.js"/><script src="/_next/static/chunks/6fe292aa-7126ff9d6732e864.js" async=""></script><script src="/_next/static/chunks/146-ccee3b26755b68c8.js" async=""></script><script src="/_next/static/chunks/main-app-ebe67847147d19aa.js" async=""></script><script src="/_next/static/chunks/4400-cdb1f7913ae34e09.js" async=""></script><script src="/_next/static/chunks/1217-407174d9b164a499.js" async=""></script><script src="/_next/static/chunks/5097-f07f6aeee3f60a33.js" async=""></script><script src="/_next/static/chunks/9045-731ff0865352dd95.js" async=""></script><script src="/_next/static/chunks/app/layout-c7a35075cfbfa3e3.js" async=""></script><script src="/_next/static/chunks/3335-5647a38ab2cfa88d.js" async=""></script><script src="/_next/static/chunks/5235-990ba9c4c8446446.js" async=""></script><script src="/_next/static/chunks/app/settings/page-86ee3d07ea1acbc7.js" async=""></script><title>Reflex</title><meta name="description" content="Local-first knowledge base built by an agent."/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div class="h-screen flex"><aside class="w-72 shrink-0 border-r bg-muted/30 flex flex-col"><div class="px-4 py-4 flex items-center gap-2 border-b"><span class="reflex-gradient inline-flex h-7 w-7 items-center justify-center rounded-lg text-white shadow-sm"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles h-4 w-4"><path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"></path><path d="M20 3v4"></path><path d="M22 5h-4"></path><path d="M4 17v2"></path><path d="M5 18H3"></path></svg></span><div class="leading-tight"><a class="text-sm font-semibold tracking-tight hover:underline" href="/">Reflex</a><div class="text-[10px] uppercase tracking-wider text-muted-foreground">knowledge base</div></div></div><div dir="ltr" data-slot="scroll-area" class="relative flex-1" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" data-slot="scroll-area-viewport" class="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1" style="overflow-x:hidden;overflow-y:hidden"><div style="min-width:100%;display:table"><nav class="px-2 pt-3 pb-6"><div class="px-2 mb-1 text-[10px] uppercase tracking-wider text-muted-foreground">Пространства</div><div class="px-2 py-3 text-xs text-muted-foreground">Пока пусто.</div><div class="mt-2 px-2"><a data-slot="button" data-variant="ghost" data-size="sm" class="inline-flex shrink-0 items-center font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5 h-7 w-full justify-start text-xs" href="/roots/new"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-plus mr-1 h-3.5 w-3.5"><path d="M12 10v6"></path><path d="M9 13h6"></path><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"></path></svg> Добавить пространство</a></div></nav></div></div></div><div data-orientation="horizontal" role="none" data-slot="separator" class="shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px"></div><div class="px-2 py-2 space-y-0.5"><a data-slot="button" data-variant="ghost" data-size="sm" class="inline-flex shrink-0 items-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5 w-full justify-start" href="/utilities"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-boxes mr-2 h-4 w-4"><path d="M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"></path><path d="m7 16.5-4.74-2.85"></path><path d="m7 16.5 5-3"></path><path d="M7 16.5v5.17"></path><path d="M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"></path><path d="m17 16.5-5-3"></path><path d="m17 16.5 4.74-2.85"></path><path d="M17 16.5v5.17"></path><path d="M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"></path><path d="M12 8 7.26 5.15"></path><path d="m12 8 4.74-2.85"></path><path d="M12 13.5V8"></path></svg> Мини-приложения</a><a data-slot="button" data-variant="ghost" data-size="sm" class="inline-flex shrink-0 items-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5 w-full justify-start" href="/audit"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-search mr-2 h-4 w-4"><path d="M14 2v4a2 2 0 0 0 2 2h4"></path><path d="M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3"></path><path d="m9 18-1.5-1.5"></path><circle cx="5" cy="14" r="3"></circle></svg> Аудит</a><a data-slot="button" data-variant="secondary" data-size="sm" class="inline-flex shrink-0 items-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-secondary text-secondary-foreground hover:bg-secondary/80 h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5 w-full justify-start" href="/settings"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings mr-2 h-4 w-4"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"></path><circle cx="12" cy="12" r="3"></circle></svg> Settings</a></div></aside><main class="flex-1 min-w-0 flex flex-col"><main class="mx-auto w-full max-w-4xl flex-1 px-6 py-10"><header class="mb-8"><a data-slot="button" data-variant="ghost" data-size="sm" class="inline-flex shrink-0 items-center justify-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5 mb-2 -ml-3" href="/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-left mr-1 h-4 w-4"><path d="m12 19-7-7 7-7"></path><path d="M19 12H5"></path></svg> Roots</a><h1 class="text-3xl font-semibold tracking-tight">Settings</h1><p class="text-muted-foreground mt-1">Pick which harness runs each kind of task and which model it uses. Agentic work (analyze / chat) goes to Claude Code or Codex; RAG and embedding work goes to Ollama by default.</p></header><div data-orientation="horizontal" role="none" data-slot="separator" class="shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px mb-6"></div><div class="space-y-8"><div data-slot="card" class="flex flex-col gap-6 rounded-xl border py-6 text-card-foreground shadow-sm border-violet-200 dark:border-violet-900/50 bg-violet-50/40 dark:bg-violet-950/20"><div data-slot="card-content" class="px-6 pt-5 pb-5 flex items-center gap-3"><div class="flex-1"><div class="text-sm font-medium">Простой режим</div><p class="text-xs text-muted-foreground mt-0.5">Видны только основные настройки. Включи расширенный, чтобы поменять модели, подключения и промпты.</p></div><button data-slot="button" data-variant="default" data-size="sm" class="inline-flex shrink-0 items-center justify-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-primary text-primary-foreground hover:bg-primary/90 h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5" type="button">Расширенный режим</button></div></div><section><h2 class="text-lg font-semibold mb-3">Output language</h2><div data-slot="card" class="flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm"><div data-slot="card-content" class="px-6 pt-6"><p class="text-sm text-muted-foreground mb-3">The agent injects this into every system prompt and writes all Markdown artifacts in this language. Code, paths, and quoted source stay verbatim.</p><div class="flex items-center gap-3 max-w-xl"><div class="flex-1"><label data-slot="label" class="flex items-center gap-2 font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 text-xs text-muted-foreground">Preset</label><button type="button" role="combobox" aria-controls="radix-_R_2d2qnpfjb_" aria-expanded="false" aria-autocomplete="none" dir="ltr" data-state="closed" data-slot="select-trigger" data-size="default" class="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 mt-1"><span data-slot="select-value" style="pointer-events:none"></span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-4 opacity-50" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button><select aria-hidden="true" tabindex="-1" style="position:absolute;border:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;word-wrap:normal"></select></div></div></div></div></section><section><h2 class="text-lg font-semibold mb-3">Обработка изображений</h2><div data-slot="card" class="flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm"><div data-slot="card-content" class="px-6 pt-6 space-y-4"><div class="flex items-start justify-between gap-4"><div><p class="text-sm">Reflex автоматически ресайзит и перекодирует прикреплённые изображения перед сохранением в<!-- --> <code class="font-mono text-xs">.reflex/attachments/</code>.</p><p class="text-xs text-muted-foreground mt-1">Сокращает токены модели и место на диске. Векторы (SVG) и анимированные GIF/WebP остаются как есть.</p></div><div class="flex items-center gap-2 shrink-0"><label data-slot="label" class="flex items-center gap-2 font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 text-xs" for="img-enabled">включено</label><button type="button" role="switch" aria-checked="true" data-state="checked" value="on" data-slot="switch" data-size="default" class="peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80" id="img-enabled"><span data-state="checked" data-slot="switch-thumb" class="pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground"></span></button><input type="checkbox" aria-hidden="true" style="transform:translateX(-100%);position:absolute;pointer-events:none;opacity:0;margin:0" tabindex="-1" checked="" value="on"/></div></div><div class="space-y-4"><div><div class="flex items-center justify-between mb-2"><label data-slot="label" class="flex items-center gap-2 font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 text-xs text-muted-foreground">Макс. сторона</label><span class="font-mono text-xs">2000<!-- -->px</span></div><span dir="ltr" data-orientation="horizontal" aria-disabled="false" data-slot="slider" class="relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col" style="--radix-slider-thumb-transform:translateX(-50%)"><span data-orientation="horizontal" data-slot="slider-track" class="relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"><span data-orientation="horizontal" data-slot="slider-range" class="absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full" style="left:0%;right:78.0241935483871%"></span></span><span style="transform:var(--radix-slider-thumb-transform);position:absolute;left:calc(0% + 0px)"><span role="slider" aria-valuemin="256" aria-valuemax="8192" aria-orientation="horizontal" data-orientation="horizontal" tabindex="0" data-slot="slider-thumb" class="block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50" style="display:none" data-radix-collection-item=""></span><input style="display:none"/></span></span><div class="flex justify-between text-[10px] text-muted-foreground mt-1"><span>256</span><span>2048</span><span>4096</span><span>8192</span></div></div><div><div class="flex items-center justify-between mb-2"><label data-slot="label" class="flex items-center gap-2 font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 text-xs text-muted-foreground">Качество (JPEG / WebP)</label><span class="font-mono text-xs">85</span></div><span dir="ltr" data-orientation="horizontal" aria-disabled="false" data-slot="slider" class="relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col" style="--radix-slider-thumb-transform:translateX(-50%)"><span data-orientation="horizontal" data-slot="slider-track" class="relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"><span data-orientation="horizontal" data-slot="slider-range" class="absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full" style="left:0%;right:25%"></span></span><span style="transform:var(--radix-slider-thumb-transform);position:absolute;left:calc(0% + 0px)"><span role="slider" aria-valuemin="40" aria-valuemax="100" aria-orientation="horizontal" data-orientation="horizontal" tabindex="0" data-slot="slider-thumb" class="block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50" style="display:none" data-radix-collection-item=""></span><input style="display:none"/></span></span></div><div class="max-w-xs"><label data-slot="label" class="flex items-center gap-2 font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 text-xs text-muted-foreground">Формат</label><button type="button" role="combobox" aria-controls="radix-_R_2t3qnpfjb_" aria-expanded="false" aria-autocomplete="none" dir="ltr" data-state="closed" data-slot="select-trigger" data-size="default" class="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 mt-1"><span data-slot="select-value" style="pointer-events:none"></span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-4 opacity-50" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button><select aria-hidden="true" tabindex="-1" style="position:absolute;border:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;word-wrap:normal"></select></div></div></div></div></section><section><h2 class="text-lg font-semibold mb-3">Gemini</h2><div data-slot="card" class="flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm"><div data-slot="card-content" class="px-6 pt-5 space-y-4"><div class="flex items-center gap-2 text-sm font-medium"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles h-4 w-4"><path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"></path><path d="M20 3v4"></path><path d="M22 5h-4"></path><path d="M4 17v2"></path><path d="M5 18H3"></path></svg><span>Gemini API</span><span data-slot="badge" data-variant="outline" class="inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3 border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground">не настроен</span></div><p class="text-xs text-muted-foreground">Используется для суммаризации YouTube (нативная поддержка мультимодальных URL) <strong>и для генерации картинок</strong> <!-- -->через модель Nano Banana (<code class="font-mono">gemini-2.5-flash-image</code>, ~$0.04 за картинку). Ключ хранится локально в<!-- --> <code class="font-mono">~/.reflex/api-keys/gemini.json</code> <!-- -->(0600), агентам не передаётся. Возьми ключ в<!-- --> <a href="https://aistudio.google.com/apikey" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 text-violet-700 hover:underline">aistudio.google.com/apikey<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-3 w-3"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a> <!-- -->— есть бесплатный tier (15 RPM / 1500 RPD).</p><div class="space-y-1.5"><label data-slot="label" class="font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 text-xs flex items-center gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key-round h-3 w-3"><path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"></path><circle cx="16.5" cy="7.5" r=".5" fill="currentColor"></circle></svg>API key</label><div class="flex gap-2"><input type="password" data-slot="input" class="w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 font-mono text-sm flex-1 h-8" placeholder="AIza…" value=""/><button data-slot="button" data-variant="default" data-size="sm" class="inline-flex shrink-0 items-center justify-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-primary text-primary-foreground hover:bg-primary/90 rounded-md px-3 has-[>svg]:px-2.5 h-8 gap-1" type="button" disabled=""><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-save h-3 w-3"><path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"></path><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"></path><path d="M7 3v4a1 1 0 0 0 1 1h7"></path></svg>Сохранить</button></div></div></div></div></section><section><h2 class="text-lg font-semibold mb-3">Картинки</h2><div data-slot="card" class="flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm"><div data-slot="card-content" class="px-6 pt-5 space-y-5"><div class="flex items-center gap-2 text-sm font-medium"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-image h-4 w-4"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg><span>Картинки из сети</span></div><p class="text-xs text-muted-foreground">Ключи к API stock-фотобанков. Используются виджетом «Картинка в KB» и хост-API утилит (<code class="font-mono">reflex.images.search</code>). Хранятся локально в <code class="font-mono">~/.reflex/api-keys/</code> (0600).</p><div class="space-y-2"><div class="flex items-center gap-2"><span class="text-sm font-medium">Unsplash</span><span data-slot="badge" data-variant="outline" class="inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3 border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground">не настроен</span><a href="https://unsplash.com/developers" target="_blank" rel="noopener noreferrer" class="ml-auto inline-flex items-center gap-1 text-xs text-violet-700 hover:underline">docs <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-3 w-3"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></div><p class="text-[11px] text-muted-foreground">Бесплатно 50 запросов/час. Атрибуция авторов обязательна — модалка вставляет её автоматически.</p><div class="flex gap-2"><label data-slot="label" class="flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 sr-only" for="unsplash-key"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key-round h-3 w-3"><path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"></path><circle cx="16.5" cy="7.5" r=".5" fill="currentColor"></circle></svg> <!-- -->Unsplash<!-- --> key</label><input type="password" data-slot="input" class="w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 font-mono text-sm flex-1 h-8" id="unsplash-key" placeholder="Unsplash access key" value=""/><button data-slot="button" data-variant="default" data-size="sm" class="inline-flex shrink-0 items-center justify-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-primary text-primary-foreground hover:bg-primary/90 rounded-md px-3 has-[>svg]:px-2.5 h-8 gap-1" type="button" disabled=""><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-save h-3 w-3"><path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"></path><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"></path><path d="M7 3v4a1 1 0 0 0 1 1h7"></path></svg>Сохранить</button></div></div><div class="space-y-2"><div class="flex items-center gap-2"><span class="text-sm font-medium">Pexels</span><span data-slot="badge" data-variant="outline" class="inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3 border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground">не настроен</span><a href="https://pexels.com/api/" target="_blank" rel="noopener noreferrer" class="ml-auto inline-flex items-center gap-1 text-xs text-violet-700 hover:underline">docs <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-3 w-3"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></div><p class="text-[11px] text-muted-foreground">Без жёсткого лимита для разумного использования. Атрибуция рекомендована.</p><div class="flex gap-2"><label data-slot="label" class="flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 sr-only" for="pexels-key"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key-round h-3 w-3"><path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"></path><circle cx="16.5" cy="7.5" r=".5" fill="currentColor"></circle></svg> <!-- -->Pexels<!-- --> key</label><input type="password" data-slot="input" class="w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 font-mono text-sm flex-1 h-8" id="pexels-key" placeholder="Pexels access key" value=""/><button data-slot="button" data-variant="default" data-size="sm" class="inline-flex shrink-0 items-center justify-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-primary text-primary-foreground hover:bg-primary/90 rounded-md px-3 has-[>svg]:px-2.5 h-8 gap-1" type="button" disabled=""><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-save h-3 w-3"><path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"></path><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"></path><path d="M7 3v4a1 1 0 0 0 1 1h7"></path></svg>Сохранить</button></div></div><div class="space-y-2"><div class="flex items-center gap-2"><span class="text-sm font-medium">Brave (весь веб)</span><span data-slot="badge" data-variant="outline" class="inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3 border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground">не настроен</span><a href="https://api-dashboard.search.brave.com/app/keys" target="_blank" rel="noopener noreferrer" class="ml-auto inline-flex items-center gap-1 text-xs text-violet-700 hover:underline">docs <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-3 w-3"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></div><p class="text-[11px] text-muted-foreground">Поиск картинок по всему вебу (не только stock). Если у тебя уже подключён Brave Search MCP — ключ оттуда подхватится автоматически, поле можно не заполнять.</p><div class="flex gap-2"><label data-slot="label" class="flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 sr-only" for="brave-key"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key-round h-3 w-3"><path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"></path><circle cx="16.5" cy="7.5" r=".5" fill="currentColor"></circle></svg> <!-- -->Brave (весь веб)<!-- --> key</label><input type="password" data-slot="input" class="w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 font-mono text-sm flex-1 h-8" id="brave-key" placeholder="Brave (весь веб) access key" value=""/><button data-slot="button" data-variant="default" data-size="sm" class="inline-flex shrink-0 items-center justify-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-primary text-primary-foreground hover:bg-primary/90 rounded-md px-3 has-[>svg]:px-2.5 h-8 gap-1" type="button" disabled=""><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-save h-3 w-3"><path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"></path><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"></path><path d="M7 3v4a1 1 0 0 0 1 1h7"></path></svg>Сохранить</button></div></div></div></div></section><section><h2 class="text-lg font-semibold mb-3">OAuth providers</h2><p class="text-sm text-muted-foreground mb-3">Reflex держит локально access/refresh-токены и сам обновляет их при истечении. Используй <code>$oauth:<provider></code> в env/headers MCP-сервера — Reflex подставит свежий токен при каждом вызове. Redirect URI:<!-- --> <code class="font-mono">http://localhost:3210/api/oauth/callback</code>.</p><div class="space-y-2"><button data-slot="button" data-variant="ghost" data-size="sm" class="inline-flex shrink-0 items-center justify-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 h-8 rounded-md px-3 has-[>svg]:px-2.5 gap-2 text-muted-foreground" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus h-4 w-4"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg>Добавить кастомный provider</button></div></section><section><h2 class="text-lg font-semibold mb-3">Сервисы маршрутов</h2><p class="text-sm text-muted-foreground mb-3">Какие сервисы навигации появятся в попапе «Маршрут в…» на каждой точке map-виджета. Reflex генерирует deep-link из координат — без посредников, без аккаунтов.</p><div data-slot="card" class="flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm"><div data-slot="card-content" class="px-6 pt-5 space-y-3"><div class="flex items-center gap-2 text-sm font-medium"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-map h-4 w-4 text-emerald-700"><path d="M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z"></path><path d="M15 5.764v15"></path><path d="M9 3.236v15"></path></svg><span>Сервисы маршрутов</span></div><p class="text-xs text-muted-foreground">Выбранные сервисы появятся в попапе на каждой точке карта-виджета — «Маршрут в…». Ссылка генерится прямо из координат, без посредников. Можно проверить превью-ссылку (точка по умолчанию — центр Москвы).</p><ul class="space-y-1.5"><li class="flex items-start gap-2 rounded-md border bg-card px-3 py-2"><input id="map-svc-google" type="checkbox" class="mt-1 h-3.5 w-3.5" checked=""/><label for="map-svc-google" class="min-w-0 flex-1 cursor-pointer"><div class="text-sm font-medium">Google Maps</div><p class="text-[11px] text-muted-foreground mt-0.5 leading-snug">Глобальный, navigation+street view. Работает везде кроме РФ-блокировок.</p></label><a href="https://www.google.com/maps/dir/?api=1&destination=55.7558,37.6173" target="_blank" rel="noopener noreferrer" class="text-[10px] text-muted-foreground hover:underline inline-flex items-center gap-0.5 shrink-0 mt-1" title="Открыть превью-ссылку">превью<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-2.5 w-2.5"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></li><li class="flex items-start gap-2 rounded-md border bg-card px-3 py-2"><input id="map-svc-yandex" type="checkbox" class="mt-1 h-3.5 w-3.5" checked=""/><label for="map-svc-yandex" class="min-w-0 flex-1 cursor-pointer"><div class="text-sm font-medium">Яндекс.Карты</div><p class="text-[11px] text-muted-foreground mt-0.5 leading-snug">СНГ, лучшая детализация по РФ и пробки в реальном времени.</p></label><a href="https://yandex.ru/maps/?rtext=~55.7558,37.6173&rtt=auto" target="_blank" rel="noopener noreferrer" class="text-[10px] text-muted-foreground hover:underline inline-flex items-center gap-0.5 shrink-0 mt-1" title="Открыть превью-ссылку">превью<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-2.5 w-2.5"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></li><li class="flex items-start gap-2 rounded-md border bg-card px-3 py-2"><input id="map-svc-2gis" type="checkbox" class="mt-1 h-3.5 w-3.5"/><label for="map-svc-2gis" class="min-w-0 flex-1 cursor-pointer"><div class="text-sm font-medium">2ГИС</div><p class="text-[11px] text-muted-foreground mt-0.5 leading-snug">СНГ, точные адреса и POI. Уникальная свойственность РФ-городов.</p></label><a href="https://2gis.ru/routeSearch/to/37.6173,55.7558" target="_blank" rel="noopener noreferrer" class="text-[10px] text-muted-foreground hover:underline inline-flex items-center gap-0.5 shrink-0 mt-1" title="Открыть превью-ссылку">превью<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-2.5 w-2.5"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></li><li class="flex items-start gap-2 rounded-md border bg-card px-3 py-2"><input id="map-svc-apple" type="checkbox" class="mt-1 h-3.5 w-3.5" checked=""/><label for="map-svc-apple" class="min-w-0 flex-1 cursor-pointer"><div class="text-sm font-medium">Apple Maps</div><p class="text-[11px] text-muted-foreground mt-0.5 leading-snug">Откроется в нативном приложении на iOS/macOS, иначе на сайте.</p></label><a href="https://maps.apple.com/?daddr=55.7558,37.6173" target="_blank" rel="noopener noreferrer" class="text-[10px] text-muted-foreground hover:underline inline-flex items-center gap-0.5 shrink-0 mt-1" title="Открыть превью-ссылку">превью<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-2.5 w-2.5"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></li><li class="flex items-start gap-2 rounded-md border bg-card px-3 py-2"><input id="map-svc-osm" type="checkbox" class="mt-1 h-3.5 w-3.5" checked=""/><label for="map-svc-osm" class="min-w-0 flex-1 cursor-pointer"><div class="text-sm font-medium">OpenStreetMap</div><p class="text-[11px] text-muted-foreground mt-0.5 leading-snug">Открытые данные, без аккаунта. Базовая навигация.</p></label><a href="https://www.openstreetmap.org/directions?to=55.7558,37.6173" target="_blank" rel="noopener noreferrer" class="text-[10px] text-muted-foreground hover:underline inline-flex items-center gap-0.5 shrink-0 mt-1" title="Открыть превью-ссылку">превью<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-2.5 w-2.5"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></li><li class="flex items-start gap-2 rounded-md border bg-card px-3 py-2"><input id="map-svc-waze" type="checkbox" class="mt-1 h-3.5 w-3.5"/><label for="map-svc-waze" class="min-w-0 flex-1 cursor-pointer"><div class="text-sm font-medium">Waze</div><p class="text-[11px] text-muted-foreground mt-0.5 leading-snug">Авто-навигация с краудсорсингом пробок и предупреждений.</p></label><a href="https://waze.com/ul?ll=55.7558,37.6173&navigate=yes" target="_blank" rel="noopener noreferrer" class="text-[10px] text-muted-foreground hover:underline inline-flex items-center gap-0.5 shrink-0 mt-1" title="Открыть превью-ссылку">превью<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-2.5 w-2.5"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></li><li class="flex items-start gap-2 rounded-md border bg-card px-3 py-2"><input id="map-svc-organic" type="checkbox" class="mt-1 h-3.5 w-3.5"/><label for="map-svc-organic" class="min-w-0 flex-1 cursor-pointer"><div class="text-sm font-medium">Organic Maps</div><p class="text-[11px] text-muted-foreground mt-0.5 leading-snug">Офлайн-карты с открытыми данными. Открывается в приложении.</p></label><a href="om://map?ll=55.7558,37.6173" target="_blank" rel="noopener noreferrer" class="text-[10px] text-muted-foreground hover:underline inline-flex items-center gap-0.5 shrink-0 mt-1" title="Открыть превью-ссылку">превью<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-2.5 w-2.5"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></li></ul></div></div></section><section><h2 class="text-lg font-semibold mb-3">Публичные ссылки (ngrok)</h2><p class="text-sm text-muted-foreground mb-3">Сделать утилиту, KB-файл или дашборд доступным из интернета через ngrok-туннель. Каждая ссылка опционально защищена паролем; middleware закрывает все остальные пути на ngrok-хосте.</p><div data-slot="card" class="flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm"><div data-slot="card-content" class="px-6 pt-5 space-y-4"><div class="flex items-center gap-2 text-sm font-medium"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-globe h-4 w-4 text-violet-600"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg><span>Публичные ссылки через ngrok</span><span class="text-[10px] text-destructive ml-1 inline-flex items-center gap-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-triangle-alert h-3 w-3"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"></path><path d="M12 9v4"></path><path d="M12 17h.01"></path></svg>ngrok CLI не найден</span></div><p class="text-xs text-muted-foreground">Reflex запускает <code class="font-mono">ngrok http</code> с твоим токеном; на ngrok-домене разрешены только пути<!-- --> <code class="font-mono">/share/*</code>. Установи<!-- --> <a href="https://ngrok.com/download" target="_blank" rel="noopener noreferrer" class="underline">ngrok CLI</a> <!-- -->в PATH перед запуском.</p><div class="grid gap-2"><label class="text-xs font-medium" for="ngrok-token">Authtoken (agent)</label><input id="ngrok-token" type="password" autoComplete="off" placeholder="2abc...xyz" class="rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400" value=""/><p class="text-[10px] text-muted-foreground">Найди в<!-- --> <a href="https://dashboard.ngrok.com/get-started/your-authtoken" target="_blank" rel="noopener noreferrer" class="underline">ngrok dashboard → Your Authtoken</a>. Сохраняется в <code class="font-mono">~/.reflex/ngrok.yml</code> <!-- -->(0600).</p></div><div class="grid gap-2"><label class="text-xs font-medium" for="ngrok-apikey">API key (для списка доменов, опционально)</label><input id="ngrok-apikey" type="password" autoComplete="off" placeholder="2abc...xyz" class="rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400" value=""/><p class="text-[10px] text-muted-foreground">Возьми в<!-- --> <a href="https://dashboard.ngrok.com/api" target="_blank" rel="noopener noreferrer" class="underline">dashboard → API → API keys</a>. Используется только для GET-запроса списка reserved-доменов.</p></div><div class="grid gap-2"><div class="flex items-center justify-between"><label class="text-xs font-medium" for="ngrok-domain">Reserved domain (если есть)</label><button type="button" disabled="" class="text-[11px] inline-flex items-center gap-1 text-violet-700 hover:underline disabled:opacity-50"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw h-3 w-3"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></svg>Обновить список</button></div><input id="ngrok-domain" type="text" placeholder="my-app.ngrok-free.app или оставь пустым" class="rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400" value=""/></div><div class="grid grid-cols-[1fr_auto] gap-2 items-end"><div><label class="text-xs font-medium" for="ngrok-port">Локальный порт</label><input id="ngrok-port" type="number" min="1" max="65535" class="mt-1 w-32 rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400" value="3210"/></div><button type="button" disabled="" class="rounded bg-violet-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-violet-700 disabled:opacity-50 inline-flex items-center gap-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play h-3 w-3"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg>Запустить</button></div><hr class="my-3"/><div><h3 class="text-xs font-semibold mb-2">Активные ссылки (<!-- -->0<!-- -->)</h3><p class="text-[11px] text-muted-foreground">Пока ничего не расшарено. На странице утилиты, KB-файла или дашборда появится кнопка «Поделиться».</p></div></div></div></section><div class="flex justify-end"><button data-slot="button" data-variant="default" data-size="default" class="inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 has-[>svg]:px-3"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-save mr-2 h-4 w-4"><path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"></path><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"></path><path d="M7 3v4a1 1 0 0 0 1 1h7"></path></svg> Save settings</button></div></div></main><!--$--><!--/$--></main></div><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/webpack-2e8cca5826414cc6.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n3:I[26957,[],\"\"]\n4:I[97369,[],\"\"]\n6:I[21968,[],\"OutletBoundary\"]\n8:I[33705,[],\"AsyncMetadataOutlet\"]\na:I[21968,[],\"ViewportBoundary\"]\nc:I[21968,[],\"MetadataBoundary\"]\nd:\"$Sreact.suspense\"\nf:I[6287,[],\"\"]\n:HL[\"/_next/static/css/87e01f779d555d04.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"p8t15rbWhT5Rrs5fOXWZ6\",\"p\":\"\",\"c\":[\"\",\"settings\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"settings\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/87e01f779d555d04.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],\"$L2\"]}],{\"children\":[\"settings\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[\"$L5\",null,[\"$\",\"$L6\",null,{\"children\":[\"$L7\",[\"$\",\"$L8\",null,{\"promise\":\"$@9\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$La\",null,{\"children\":\"$Lb\"}],null],[\"$\",\"$Lc\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$d\",null,{\"fallback\":null,\"children\":\"$Le\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n7:null\n"])</script><script>self.__next_f.push([1,"9:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Reflex\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Local-first knowledge base built by an agent.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"e:\"$9:metadata\"\n"])</script><script>self.__next_f.push([1,"10:I[41287,[\"4400\",\"static/chunks/4400-cdb1f7913ae34e09.js\",\"1217\",\"static/chunks/1217-407174d9b164a499.js\",\"5097\",\"static/chunks/5097-f07f6aeee3f60a33.js\",\"9045\",\"static/chunks/9045-731ff0865352dd95.js\",\"7177\",\"static/chunks/app/layout-c7a35075cfbfa3e3.js\"],\"AppSidebar\"]\n11:I[43450,[\"4400\",\"static/chunks/4400-cdb1f7913ae34e09.js\",\"1217\",\"static/chunks/1217-407174d9b164a499.js\",\"5097\",\"static/chunks/5097-f07f6aeee3f60a33.js\",\"9045\",\"static/chunks/9045-731ff0865352dd95.js\",\"7177\",\"static/chunks/app/layout-c7a35075cfbfa3e3.js\"],\"Toaster\"]\n12:I[54400,[\"4400\",\"static/chunks/4400-cdb1f7913ae34e09.js\",\"1217\",\"static/chunks/1217-407174d9b164a499.js\",\"3335\",\"static/chunks/3335-5647a38ab2cfa88d.js\",\"5097\",\"static/chunks/5097-f07f6aeee3f60a33.js\",\"5235\",\"static/chunks/5235-990ba9c4c8446446.js\",\"4662\",\"static/chunks/app/settings/page-86ee3d07ea1acbc7.js\"],\"\"]\n13:I[91074,[\"4400\",\"static/chunks/4400-cdb1f7913ae34e09.js\",\"1217\",\"static/chunks/1217-407174d9b164a499.js\",\"3335\",\"static/chunks/3335-5647a38ab2cfa88d.js\",\"5097\",\"static/chunks/5097-f07f6aeee3f60a33.js\",\"5235\",\"static/chunks/5235-990ba9c4c8446446.js\",\"4662\",\"static/chunks/app/settings/page-86ee3d07ea1acbc7.js\"],\"Separator\"]\n14:I[89134,[\"4400\",\"static/chunks/4400-cdb1f7913ae34e09.js\",\"1217\",\"static/chunks/1217-407174d9b164a499.js\",\"3335\",\"static/chunks/3335-5647a38ab2cfa88d.js\",\"5097\",\"static/chunks/5097-f07f6aeee3f60a33.js\",\"5235\",\"static/chunks/5235-990ba9c4c8446446.js\",\"4662\",\"static/chunks/app/settings/page-86ee3d07ea1acbc7.js\"],\"SettingsForm\"]\n"])</script><script>self.__next_f.push([1,"2:[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"children\":[[\"$\",\"div\",null,{\"className\":\"h-screen flex\",\"children\":[[\"$\",\"$L10\",null,{\"initialRoots\":[]}],[\"$\",\"main\",null,{\"className\":\"flex-1 min-w-0 flex flex-col\",\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}],[\"$\",\"$L11\",null,{\"richColors\":true,\"closeButton\":true}]]}]}]\n"])</script><script>self.__next_f.push([1,"5:[\"$\",\"main\",null,{\"className\":\"mx-auto w-full max-w-4xl flex-1 px-6 py-10\",\"children\":[[\"$\",\"header\",null,{\"className\":\"mb-8\",\"children\":[[\"$\",\"$L12\",null,{\"href\":\"/\",\"children\":[[\"$\",\"svg\",null,{\"ref\":\"$undefined\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"width\":24,\"height\":24,\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeWidth\":2,\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"className\":\"lucide lucide-arrow-left mr-1 h-4 w-4\",\"children\":[[\"$\",\"path\",\"1l729n\",{\"d\":\"m12 19-7-7 7-7\"}],[\"$\",\"path\",\"x3x0zl\",{\"d\":\"M19 12H5\"}],\"$undefined\"]}],\" Roots\"],\"data-slot\":\"button\",\"data-variant\":\"ghost\",\"data-size\":\"sm\",\"className\":\"inline-flex shrink-0 items-center justify-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [\u0026_svg]:pointer-events-none [\u0026_svg]:shrink-0 [\u0026_svg:not([class*='size-'])]:size-4 hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 h-8 gap-1.5 rounded-md px-3 has-[\u003esvg]:px-2.5 mb-2 -ml-3\",\"ref\":null}],[\"$\",\"h1\",null,{\"className\":\"text-3xl font-semibold tracking-tight\",\"children\":\"Settings\"}],[\"$\",\"p\",null,{\"className\":\"text-muted-foreground mt-1\",\"children\":\"Pick which harness runs each kind of task and which model it uses. Agentic work (analyze / chat) goes to Claude Code or Codex; RAG and embedding work goes to Ollama by default.\"}]]}],[\"$\",\"$L13\",null,{\"className\":\"mb-6\"}],[\"$\",\"$L14\",null,{\"initialSettings\":{\"version\":1,\"language\":\"english\",\"userName\":\"\",\"timezone\":\"\",\"uiMode\":\"simple\",\"imageProcessing\":{\"enabled\":true,\"maxDimension\":2000,\"quality\":85,\"format\":\"auto\"},\"harnesses\":{\"claude-code\":{\"enabled\":true},\"codex\":{\"enabled\":true},\"ollama\":{\"enabled\":true,\"baseUrl\":\"http://localhost:11434\"}},\"assignments\":{\"analyze\":{\"harness\":\"claude-code\",\"model\":\"claude-opus-4-7\",\"allowedTools\":[\"Read\",\"Write\",\"Edit\",\"LS\",\"Glob\",\"Grep\",\"WebSearch\",\"WebFetch\"]},\"chat\":{\"harness\":\"claude-code\",\"model\":\"claude-sonnet-4-6\",\"allowedTools\":[\"Read\",\"LS\",\"Glob\",\"Grep\",\"WebSearch\",\"WebFetch\"]},\"rag\":{\"harness\":\"ollama\",\"model\":\"llama3.1:8b\",\"allowedTools\":[]},\"embed\":{\"harness\":\"ollama\",\"model\":\"nomic-embed-text\",\"allowedTools\":[]},\"quick\":{\"harness\":\"claude-code\",\"model\":\"claude-haiku-4-5\",\"allowedTools\":[]}},\"mapServices\":{\"enabled\":[\"google\",\"yandex\",\"apple\",\"osm\"]},\"ngrok\":{\"authtoken\":\"\",\"apiKey\":\"\",\"domain\":\"\",\"port\":3210}},\"harnesses\":[{\"id\":\"claude-code\",\"label\":\"Claude Code\",\"supports\":[\"analyze\",\"chat\",\"quick\"]},{\"id\":\"codex\",\"label\":\"Codex\",\"supports\":[\"analyze\",\"chat\",\"quick\"]},{\"id\":\"ollama\",\"label\":\"Ollama\",\"supports\":[\"rag\",\"embed\",\"chat\",\"quick\"]}]}]]}]\n"])</script></body></html>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
1:"$Sreact.fragment"
|
|
2
|
-
3:I[26957,[],""]
|
|
3
|
-
4:I[97369,[],""]
|
|
4
|
-
6:I[21968,[],"OutletBoundary"]
|
|
5
|
-
8:I[33705,[],"AsyncMetadataOutlet"]
|
|
6
|
-
a:I[21968,[],"ViewportBoundary"]
|
|
7
|
-
c:I[21968,[],"MetadataBoundary"]
|
|
8
|
-
d:"$Sreact.suspense"
|
|
9
|
-
f:I[6287,[],""]
|
|
10
|
-
:HL["/_next/static/css/87e01f779d555d04.css","style"]
|
|
11
|
-
0:{"P":null,"b":"p8t15rbWhT5Rrs5fOXWZ6","p":"","c":["","settings"],"i":false,"f":[[["",{"children":["settings",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/87e01f779d555d04.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],"$L2"]}],{"children":["settings",["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":["$L5",null,["$","$L6",null,{"children":["$L7",["$","$L8",null,{"promise":"$@9"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$La",null,{"children":"$Lb"}],null],["$","$Lc",null,{"children":["$","div",null,{"hidden":true,"children":["$","$d",null,{"fallback":null,"children":"$Le"}]}]}]]}],false]],"m":"$undefined","G":["$f",[]],"s":false,"S":true}
|
|
12
|
-
b:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
13
|
-
7:null
|
|
14
|
-
9:{"metadata":[["$","title","0",{"children":"Reflex"}],["$","meta","1",{"name":"description","content":"Local-first knowledge base built by an agent."}]],"error":null,"digest":"$undefined"}
|
|
15
|
-
e:"$9:metadata"
|
|
16
|
-
10:I[41287,["4400","static/chunks/4400-cdb1f7913ae34e09.js","1217","static/chunks/1217-407174d9b164a499.js","5097","static/chunks/5097-f07f6aeee3f60a33.js","9045","static/chunks/9045-731ff0865352dd95.js","7177","static/chunks/app/layout-c7a35075cfbfa3e3.js"],"AppSidebar"]
|
|
17
|
-
11:I[43450,["4400","static/chunks/4400-cdb1f7913ae34e09.js","1217","static/chunks/1217-407174d9b164a499.js","5097","static/chunks/5097-f07f6aeee3f60a33.js","9045","static/chunks/9045-731ff0865352dd95.js","7177","static/chunks/app/layout-c7a35075cfbfa3e3.js"],"Toaster"]
|
|
18
|
-
12:I[54400,["4400","static/chunks/4400-cdb1f7913ae34e09.js","1217","static/chunks/1217-407174d9b164a499.js","3335","static/chunks/3335-5647a38ab2cfa88d.js","5097","static/chunks/5097-f07f6aeee3f60a33.js","5235","static/chunks/5235-990ba9c4c8446446.js","4662","static/chunks/app/settings/page-86ee3d07ea1acbc7.js"],""]
|
|
19
|
-
13:I[91074,["4400","static/chunks/4400-cdb1f7913ae34e09.js","1217","static/chunks/1217-407174d9b164a499.js","3335","static/chunks/3335-5647a38ab2cfa88d.js","5097","static/chunks/5097-f07f6aeee3f60a33.js","5235","static/chunks/5235-990ba9c4c8446446.js","4662","static/chunks/app/settings/page-86ee3d07ea1acbc7.js"],"Separator"]
|
|
20
|
-
14:I[89134,["4400","static/chunks/4400-cdb1f7913ae34e09.js","1217","static/chunks/1217-407174d9b164a499.js","3335","static/chunks/3335-5647a38ab2cfa88d.js","5097","static/chunks/5097-f07f6aeee3f60a33.js","5235","static/chunks/5235-990ba9c4c8446446.js","4662","static/chunks/app/settings/page-86ee3d07ea1acbc7.js"],"SettingsForm"]
|
|
21
|
-
2:["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"children":[["$","div",null,{"className":"h-screen flex","children":[["$","$L10",null,{"initialRoots":[]}],["$","main",null,{"className":"flex-1 min-w-0 flex flex-col","children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}],["$","$L11",null,{"richColors":true,"closeButton":true}]]}]}]
|
|
22
|
-
5:["$","main",null,{"className":"mx-auto w-full max-w-4xl flex-1 px-6 py-10","children":[["$","header",null,{"className":"mb-8","children":[["$","$L12",null,{"href":"/","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-arrow-left mr-1 h-4 w-4","children":[["$","path","1l729n",{"d":"m12 19-7-7 7-7"}],["$","path","x3x0zl",{"d":"M19 12H5"}],"$undefined"]}]," Roots"],"data-slot":"button","data-variant":"ghost","data-size":"sm","className":"inline-flex shrink-0 items-center justify-center text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50 h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5 mb-2 -ml-3","ref":null}],["$","h1",null,{"className":"text-3xl font-semibold tracking-tight","children":"Settings"}],["$","p",null,{"className":"text-muted-foreground mt-1","children":"Pick which harness runs each kind of task and which model it uses. Agentic work (analyze / chat) goes to Claude Code or Codex; RAG and embedding work goes to Ollama by default."}]]}],["$","$L13",null,{"className":"mb-6"}],["$","$L14",null,{"initialSettings":{"version":1,"language":"english","userName":"","timezone":"","uiMode":"simple","imageProcessing":{"enabled":true,"maxDimension":2000,"quality":85,"format":"auto"},"harnesses":{"claude-code":{"enabled":true},"codex":{"enabled":true},"ollama":{"enabled":true,"baseUrl":"http://localhost:11434"}},"assignments":{"analyze":{"harness":"claude-code","model":"claude-opus-4-7","allowedTools":["Read","Write","Edit","LS","Glob","Grep","WebSearch","WebFetch"]},"chat":{"harness":"claude-code","model":"claude-sonnet-4-6","allowedTools":["Read","LS","Glob","Grep","WebSearch","WebFetch"]},"rag":{"harness":"ollama","model":"llama3.1:8b","allowedTools":[]},"embed":{"harness":"ollama","model":"nomic-embed-text","allowedTools":[]},"quick":{"harness":"claude-code","model":"claude-haiku-4-5","allowedTools":[]}},"mapServices":{"enabled":["google","yandex","apple","osm"]},"ngrok":{"authtoken":"","apiKey":"","domain":"","port":3210}},"harnesses":[{"id":"claude-code","label":"Claude Code","supports":["analyze","chat","quick"]},{"id":"codex","label":"Codex","supports":["analyze","chat","quick"]},{"id":"ollama","label":"Ollama","supports":["rag","embed","chat","quick"]}]}]]}]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports.id=5152,exports.ids=[5152],exports.modules={17596:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(19963).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},24576:(a,b,c)=>{"use strict";c.d(b,{Zn:()=>r,_S:()=>s,mM:()=>n,qV:()=>q});var d=c(73024),e=c(76760),f=c.n(e),g=c(48161),h=c.n(g),i=c(77598),j=c.n(i);let k=f().join(h().homedir(),".reflex"),l=f().join(k,"registry.json"),m={version:1,entries:[]};function n(a){return j().createHash("sha1").update(f().resolve(a)).digest("hex").slice(0,16)}async function o(){try{let a=await d.promises.readFile(l,"utf8"),b=JSON.parse(a);if("object"==typeof b&&null!==b&&"entries"in b&&Array.isArray(b.entries))return b;return m}catch(a){if("object"==typeof a&&null!==a&&"code"in a&&"ENOENT"===a.code)return m;throw a}}async function p(a){await d.promises.mkdir(k,{recursive:!0}),await d.promises.writeFile(l,JSON.stringify(a,null,2)+"\n","utf8")}async function q(){return[...(await o()).entries].sort((a,b)=>Date.parse(b.addedAt)-Date.parse(a.addedAt))}async function r(a){return(await o()).entries.find(b=>b.id===a)??null}async function s(a){let b=f().resolve(a),c=n(b),d=await o(),e=d.entries.find(a=>a.id===c);if(e)return e;let g={id:c,path:b,addedAt:new Date().toISOString()};return await p({...d,entries:[...d.entries,g]}),g}},26290:(a,b,c)=>{"use strict";c.d(b,{cn:()=>f});var d=c(83243),e=c(86103);function f(...a){return(0,e.QP)((0,d.$)(a))}},34818:(a,b,c)=>{Promise.resolve().then(c.bind(c,60524)),Promise.resolve().then(c.bind(c,50155)),Promise.resolve().then(c.bind(c,26922)),Promise.resolve().then(c.bind(c,79008)),Promise.resolve().then(c.bind(c,68146)),Promise.resolve().then(c.bind(c,60936)),Promise.resolve().then(c.bind(c,65138)),Promise.resolve().then(c.bind(c,68902)),Promise.resolve().then(c.bind(c,69644)),Promise.resolve().then(c.bind(c,49186)),Promise.resolve().then(c.bind(c,93099)),Promise.resolve().then(c.bind(c,83594)),Promise.resolve().then(c.bind(c,24375)),Promise.resolve().then(c.bind(c,67135)),Promise.resolve().then(c.bind(c,85105)),Promise.resolve().then(c.bind(c,41886)),Promise.resolve().then(c.bind(c,33309)),Promise.resolve().then(c.bind(c,37550)),Promise.resolve().then(c.bind(c,96623)),Promise.resolve().then(c.bind(c,77372)),Promise.resolve().then(c.bind(c,65478)),Promise.resolve().then(c.bind(c,97230)),Promise.resolve().then(c.bind(c,73552)),Promise.resolve().then(c.bind(c,391)),Promise.resolve().then(c.bind(c,4235)),Promise.resolve().then(c.bind(c,41138)),Promise.resolve().then(c.bind(c,60877)),Promise.resolve().then(c.bind(c,7671)),Promise.resolve().then(c.bind(c,5637)),Promise.resolve().then(c.bind(c,36786)),Promise.resolve().then(c.t.bind(c,20594,23))},52970:(a,b,c)=>{Promise.resolve().then(c.bind(c,68394)),Promise.resolve().then(c.bind(c,51189)),Promise.resolve().then(c.bind(c,66180)),Promise.resolve().then(c.bind(c,75266)),Promise.resolve().then(c.bind(c,14360)),Promise.resolve().then(c.bind(c,6786)),Promise.resolve().then(c.bind(c,44896)),Promise.resolve().then(c.bind(c,14848)),Promise.resolve().then(c.bind(c,53710)),Promise.resolve().then(c.bind(c,30544)),Promise.resolve().then(c.bind(c,13829)),Promise.resolve().then(c.bind(c,90044)),Promise.resolve().then(c.bind(c,57673)),Promise.resolve().then(c.bind(c,97053)),Promise.resolve().then(c.bind(c,43151)),Promise.resolve().then(c.bind(c,12156)),Promise.resolve().then(c.bind(c,71615)),Promise.resolve().then(c.bind(c,4080)),Promise.resolve().then(c.bind(c,87177)),Promise.resolve().then(c.bind(c,87634)),Promise.resolve().then(c.bind(c,6912)),Promise.resolve().then(c.bind(c,13976)),Promise.resolve().then(c.bind(c,18282)),Promise.resolve().then(c.bind(c,20633)),Promise.resolve().then(c.bind(c,61193)),Promise.resolve().then(c.bind(c,66188)),Promise.resolve().then(c.bind(c,66643)),Promise.resolve().then(c.bind(c,81669)),Promise.resolve().then(c.bind(c,39991)),Promise.resolve().then(c.bind(c,54972)),Promise.resolve().then(c.t.bind(c,1056,23))},60524:(a,b,c)=>{"use strict";c.d(b,{Separator:()=>d});let d=(0,c(54491).registerClientReference)(function(){throw Error("Attempted to call Separator() from the server but Separator 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/components/ui/separator.tsx","Separator")},67248:(a,b,c)=>{"use strict";c.d(b,{E:()=>i});var d=c(63003);c(34750);var e=c(86209),f=c(65715),g=c(26290);let h=(0,e.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function i({className:a,variant:b="default",asChild:c=!1,...e}){let i=c?f.bL:"span";return(0,d.jsx)(i,{"data-slot":"badge","data-variant":b,className:(0,g.cn)(h({variant:b}),a),...e})}},72395:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{"00cd2d83814844e1283c9ba1e1c423e61ddf47de12":()=>g.i,"4004b94298efc15333005b9320b07464f06bc3c084":()=>f.z,"400d51d12215216f88212560005beda5ad7620fb46":()=>h.$z,"40666a72ba7136ed91a114ab4f47e7f9d4bc0daca3":()=>e.nY,"40939ebfea7436d72cf3d1e0af94f840b0bc73bb3c":()=>h.MU,"409b688b5a310bae92c1556c0243fee7a15cadb469":()=>f.u,"40d75f616a66027d5730682fe19f1910b8e73402bf":()=>e.nC,"600252a190752f43aa43643959677019accdba5c83":()=>e.L4,"6051e3107875786292470bca9b46ee55d3d1ce7bcf":()=>e.T$,"6085fdd91989747bc73031c5e5853218191211cf79":()=>h.Tc,"609b01efeb645bf501dbb883d7f01e8afab86a8c6e":()=>e.OQ,"7091b99a789641a5b42e215c5d4df0e01635ea4d0c":()=>e.h$,"78aa2f0aa9b7272a731bab5e297ecdda045a5f8e9d":()=>e.g3});var e=c(13415),f=c(3890),g=c(50995),h=c(15754),i=a([e,h]);[e,h]=i.then?(await i)():i,d()}catch(a){d(a)}})},84913:(a,b,c)=>{"use strict";c.d(b,{$:()=>i});var d=c(63003);c(34750);var e=c(86209),f=c(65715),g=c(26290);let h=(0,e.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function i({className:a,variant:b="default",size:c="default",asChild:e=!1,...i}){let j=e?f.bL:"button";return(0,d.jsx)(j,{"data-slot":"button","data-variant":b,"data-size":c,className:(0,g.cn)(h({variant:b,size:c,className:a})),...i})}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports.id=5373,exports.ids=[5373],exports.modules={6993:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(63003),e=c(9310),f=c(24576);async function g({children:a,params:b}){let{id:c}=await b;return await (0,f.Zn)(c)||(0,e.notFound)(),(0,d.jsx)("div",{className:"flex-1 flex flex-col min-h-0",children:a})}},51330:(a,b,c)=>{"use strict";c.d(b,{A:()=>e});var d=c(3265);let e=(0,d.createServerReference)("409d333d3e7b13a505853122dbd9a15ab36b9a90a4",d.callServer,void 0,d.findSourceMapURL,"saveGeminiKeyAction")},80432:()=>{},90160:()=>{},93387:(a,b,c)=>{"use strict";c.d(b,{p:()=>w});var d=c(64173),e=c(17240),f=c(90775),g=c(56992),h=c(39755),i=c(66979),j=c(14878),k=c(62261),l=c(69552),m=c(96705),n=c(13530),o=c(12619),p=c(73569),q=c(44052),r=c(20583),s=c(47071),t=c(3265);let u=(0,t.createServerReference)("40d2ac7d931df057cc763c3416ffd2aee8ff7a0ad9",t.callServer,void 0,t.findSourceMapURL,"summarizeYoutubeAction");var v=c(51330);function w({source:a,onSendToChat:b,autoSummarizeYoutube:c}){let[i,j]=(0,e.useState)(null);return(0,d.jsxs)("div",{className:"prose prose-neutral dark:prose-invert max-w-none [&_pre]:bg-muted [&_pre]:rounded-md [&_pre]:p-4 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-foreground [&_:not(pre)>code]:bg-muted [&_:not(pre)>code]:px-1.5 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:rounded [&_:not(pre)>code]:text-[0.9em] [&_code]:font-mono [&_table]:text-sm",children:[(0,d.jsx)(f.oz,{remarkPlugins:[g.A],rehypePlugins:[[h.A,{detect:!0,ignoreMissing:!0}]],components:{a:({href:a,children:e,...f})=>{let g=a?function(a){try{let b=new URL(a),c=b.hostname.replace(/^www\./,"");if("youtu.be"===c){let a=b.pathname.slice(1).split("/")[0];return a&&/^[A-Za-z0-9_-]{6,}$/.test(a)?a:null}if("youtube.com"===c||"m.youtube.com"===c||"youtube-nocookie.com"===c){if("/watch"===b.pathname){let a=b.searchParams.get("v");return a&&/^[A-Za-z0-9_-]{6,}$/.test(a)?a:null}let a=/^\/(shorts|embed|live|v)\/([^/?#]+)/.exec(b.pathname);if(a&&/^[A-Za-z0-9_-]{6,}$/.test(a[2]))return a[2]}}catch{}return null}(a):null;return g&&a?(0,d.jsx)(z,{url:a,videoId:g,autoSummarize:c??!1,...b?{onSendToChat:b}:{}}):(0,d.jsx)("a",{href:a,...f,children:e})},img:({src:a,alt:b,title:c})=>"string"!=typeof a||0===a.length?null:(0,d.jsx)(x,{src:a,alt:"string"==typeof b?b:"",title:"string"==typeof c?c:void 0,onZoom:a=>j(a)})},children:a}),i&&(0,d.jsx)(y,{src:i.src,alt:i.alt,onClose:()=>j(null)})]})}function x({src:a,alt:b,title:c,onZoom:e}){return(0,d.jsx)("img",{src:a,alt:b,title:c??b??"Открыть на весь экран",onClick:()=>e({src:a,alt:b}),className:"cursor-zoom-in rounded-md border bg-muted/40 transition hover:opacity-90",loading:"lazy"})}function y({src:a,alt:b,onClose:c}){return(0,e.useCallback)(a=>{"Escape"===a.key&&c()},[c]),(0,d.jsxs)("div",{className:"fixed inset-0 z-[80] flex items-center justify-center p-6 bg-background/85 backdrop-blur-sm cursor-zoom-out",onClick:c,role:"dialog","aria-label":b||"Просмотр изображения",children:[(0,d.jsx)(r.$,{type:"button",size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-9 w-9 bg-card/80 hover:bg-card",onClick:a=>{a.stopPropagation(),c()},"aria-label":"Закрыть",children:(0,d.jsx)(i.A,{className:"h-5 w-5"})}),(0,d.jsx)("img",{src:a,alt:b,className:"max-h-full max-w-full object-contain rounded-lg shadow-2xl",onClick:a=>a.stopPropagation()}),b&&(0,d.jsx)("div",{className:"absolute bottom-6 inset-x-0 mx-auto max-w-3xl px-6 text-center text-sm text-foreground/80 pointer-events-none",children:b})]})}function z({url:a,videoId:b,onSendToChat:c,autoSummarize:f}){let[g,h]=(0,e.useTransition)(),[t,w]=(0,e.useState)(null),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(""),[B,C]=(0,e.useState)(!1);(0,e.useRef)(!1);let D=()=>{w(null),h(async()=>{let b=await u({url:a});if(b.ok){w(b.text),y(!1);return}if(b.needsKey)return void y(!0);q.oR.error(b.error)})},E=async()=>{if(!z.trim())return void q.oR.error("Введи ключ");C(!0);try{let a=await (0,v.A)(z.trim());if(!a.ok)return void q.oR.error(a.error);q.oR.success("Gemini key сохранён"),A(""),y(!1),D()}finally{C(!1)}};return(0,d.jsxs)("span",{className:"not-prose my-4 block rounded-lg border bg-card overflow-hidden",children:[(0,d.jsx)("span",{className:"relative block w-full",style:{paddingTop:"56.25%"},children:(0,d.jsx)("iframe",{src:`https://www.youtube-nocookie.com/embed/${b}`,className:"absolute inset-0 h-full w-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0,title:"YouTube video"})}),(0,d.jsxs)("span",{className:"flex items-center gap-2 p-2 border-t bg-muted/30",children:[(0,d.jsx)(j.A,{className:"h-4 w-4 text-red-600 shrink-0"}),(0,d.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:underline truncate flex-1 min-w-0",children:a}),(0,d.jsxs)(r.$,{type:"button",size:"sm",variant:"outline",onClick:D,disabled:g,className:"gap-1 shrink-0 h-7",children:[g?(0,d.jsx)(k.A,{className:"h-3 w-3 animate-spin"}):(0,d.jsx)(l.A,{className:"h-3 w-3"}),"Суммаризировать"]})]}),x&&(0,d.jsxs)("span",{className:"block border-t bg-amber-50/60 p-3 space-y-2",children:[(0,d.jsxs)("span",{className:"flex items-center gap-2 text-xs text-amber-900",children:[(0,d.jsx)(m.A,{className:"h-3.5 w-3.5"}),(0,d.jsx)("span",{className:"font-medium",children:"Нужен Gemini API key"})]}),(0,d.jsxs)("span",{className:"block text-[11px] text-amber-900/80",children:["Возьми ключ в"," ",(0,d.jsx)("a",{href:"https://aistudio.google.com/apikey",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"aistudio.google.com/apikey"})," ","— бесплатный tier (15 RPM / 1500 RPD). Сохранится в"," ",(0,d.jsx)("code",{className:"font-mono",children:"~/.reflex/api-keys/gemini.json"})," ","(0600), агентам не передаётся. Модель подтянется автоматически из"," ",(0,d.jsx)("code",{className:"font-mono",children:"models.list"})," (по умолчанию — самая быстрая flash); сменить можно в Settings → Gemini."]}),(0,d.jsxs)("span",{className:"flex items-center gap-2",children:[(0,d.jsx)(s.p,{type:"password",value:z,onChange:a=>A(a.target.value),placeholder:"AIza…",className:"font-mono text-xs h-8 flex-1",disabled:B}),(0,d.jsxs)(r.$,{type:"button",size:"sm",onClick:()=>void E(),disabled:B||!z.trim(),className:"h-8 gap-1",children:[B?(0,d.jsx)(k.A,{className:"h-3 w-3 animate-spin"}):(0,d.jsx)(n.A,{className:"h-3 w-3"}),"Сохранить и продолжить"]}),(0,d.jsx)(r.$,{type:"button",size:"icon",variant:"ghost",onClick:()=>y(!1),className:"h-8 w-8",children:(0,d.jsx)(i.A,{className:"h-3.5 w-3.5"})})]})]}),t&&(0,d.jsxs)("span",{className:"block border-t p-3 space-y-2",children:[(0,d.jsxs)("span",{className:"flex items-center gap-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:[(0,d.jsx)(o.A,{className:"h-3 w-3 text-emerald-600"}),"Gemini summary",(0,d.jsxs)(r.$,{type:"button",size:"sm",variant:"ghost",onClick:D,className:"ml-auto h-6 text-[10px] gap-1",disabled:g,children:[g?(0,d.jsx)(k.A,{className:"h-3 w-3 animate-spin"}):(0,d.jsx)(l.A,{className:"h-3 w-3"}),"Переделать"]}),c&&(0,d.jsxs)(r.$,{type:"button",size:"sm",variant:"outline",onClick:()=>c(t,a),className:"h-6 text-[10px] gap-1",children:[(0,d.jsx)(p.A,{className:"h-3 w-3"}),"В чат"]})]}),(0,d.jsx)("span",{className:"block",children:(0,d.jsx)("span",{className:"block text-sm whitespace-pre-wrap leading-relaxed",children:t})})]})]})}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=5436,exports.ids=[5436],exports.modules={24139:(a,b,c)=>{c.d(b,{Z:()=>h});var d=c(73024),e=c(74342);function f(){return globalThis.__reflexPendingCache||(globalThis.__reflexPendingCache=new Map),globalThis.__reflexPendingCache}async function g(a,b){let c,g=(0,e.Rs)(a,b);try{c=await d.promises.stat(g)}catch{return[]}let h=f().get(g);if(h&&h.mtimeMs===c.mtimeMs&&h.size===c.size)return h.result;let i=function(a,b){let c=new Map;for(let d of a)switch(d.type){case"permission-request":c.set(`p:${d.requestId}`,{kind:"permission",topicId:b,requestId:d.requestId,ts:d.ts,summary:d.tool?`Permission: ${d.tool}`:d.action??"Permission request",...d.description?{details:d.description}:{}});break;case"permission-response":c.delete(`p:${d.requestId}`);break;case"question":c.set(`q:${d.questionId}`,{kind:"question",topicId:b,requestId:d.questionId,ts:d.ts,summary:d.prompt.slice(0,200),...d.choices&&d.choices.length?{details:d.choices.join(" / ")}:{}});break;case"answer":c.delete(`q:${d.questionId}`);break;case"mcp-add-request":c.set(`m:${d.requestId}`,{kind:"mcp-add",topicId:b,requestId:d.requestId,ts:d.ts,summary:`MCP add: ${d.label}`,...d.description?{details:d.description}:{}});break;case"mcp-add-response":c.delete(`m:${d.requestId}`)}return[...c.values()]}(await (0,e.wj)(a,b),b);return f().set(g,{mtimeMs:c.mtimeMs,size:c.size,result:i}),i}async function h(a,b){let c=[];return await Promise.all(b.map(async b=>{let d=await g(a,b);c.push(...d)})),c.sort((a,b)=>a.ts<b.ts?1:-1),c}},49809:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{k:()=>v,x:()=>t});var e=c(31776);c(428);var f=c(73024),g=c(76760),h=c.n(g),i=c(24576),j=c(11178),k=c(56843),l=c(16909),m=c(24139),n=c(1701),o=c(52129),p=c(7188),q=c(11244),r=c(97364),s=a([l,o]);async function t(a){try{let b=await (0,i.Zn)(a);if(!b)return{ok:!1,error:"Root not found"};let[c,d,e,f]=await Promise.all([(0,k.hk)(b.path),(0,j.CA)(b.path),(0,p.listWidgets)(b.path),(0,p.readLayout)(b.path)]),g=(0,p.reconcileLayout)(f,e.map(a=>a.id),q.SYSTEM_WIDGET_IDS);(g.order.join("|")!==f.order.join("|")||g.hidden.join("|")!==f.hidden.join("|")||JSON.stringify(g.sizes??{})!==JSON.stringify(f.sizes??{}))&&await (0,p.writeLayout)(b.path,g);let h=c.map(a=>a.meta.id),r=new Set("function"==typeof l.z.listRunningTopicsForRoot?l.z.listRunningTopicsForRoot(a):[]),[s,t,v]=await Promise.all([(0,m.Z)(b.path,h),(0,n.Mn)(),(0,o.Qv)(a).catch(()=>null)]),w=new Set(s.map(a=>a.requestId));for(let a of t)!w.has(a.requestId)&&h.includes(a.topicId)&&s.push({kind:"mcp-add",topicId:a.topicId,requestId:a.requestId,ts:a.createdAt,summary:`MCP add: ${a.directive.label}`,...a.directive.description?{details:a.directive.description}:{}});s.sort((a,b)=>a.ts<b.ts?1:-1);let x=new Map;for(let a of c)x.set(a.meta.id,a.meta);let y=[],z=[];for(let a of c){let b=a.meta;if(b.goal&&"active"===b.goalStatus){y.push({topicId:b.id,topicTitle:b.title,goal:b.goal,goalIterations:b.goalIterations??0,updatedAt:b.updatedAt,running:r.has(b.id)});continue}r.has(b.id)&&z.push({topicId:b.id,topicTitle:b.title,updatedAt:b.updatedAt})}y.sort((a,b)=>a.updatedAt<b.updatedAt?1:-1),z.sort((a,b)=>a.updatedAt<b.updatedAt?1:-1);let A=await u(d);return{ok:!0,snapshot:{rootId:a,rootPath:b.path,activeGoals:y,runningAgents:z,pendingApprovals:s,recentKb:A,suggestions:v,widgets:e,layout:g}}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function u(a){let b=Date.now()-2592e5,c=a.filter(a=>Date.parse(a.modifiedAt)>=b).sort((a,b)=>a.modifiedAt<b.modifiedAt?1:-1).slice(0,6);return Promise.all(c.map(async a=>{let b=await (0,j.xO)(a.abs);return{rel:a.rel,title:b.title??h().basename(a.rel),...b.kind?{kind:b.kind}:{},modifiedAt:a.modifiedAt,preview:""}}))}async function v(a,b){try{let c=await (0,i.Zn)(a);if(!c)return{ok:!1,error:"Root not found"};let d=h().join(c.path,".reflex",b),e=h().relative(h().join(c.path,".reflex"),d);if(e.startsWith("..")||h().isAbsolute(e))return{ok:!1,error:"Refused (path traversal)"};let g=await f.promises.readFile(d,"utf8");return{ok:!0,preview:function(a){let b=a,c=a.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/);return c&&(b=a.slice(c[0].length)),(b=b.replace(/^#+\s+/gm,"").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\r?\n+/g," ").trim()).length>200&&(b=b.slice(0,197).trimEnd()+"…"),b}(g)}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}[l,o]=s.then?(await s)():s,(0,r.D)([t,v]),(0,e.A)(t,"4039528983799e2240e5a3159479e640fa601ff8e3",null),(0,e.A)(v,"60ba81834dba3c72cf0892e2a55fa43ca725748c58",null),d()}catch(a){d(a)}})},52129:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Qt:()=>u,Qv:()=>s});var e=c(73024),f=c(48161),g=c.n(f),h=c(76760),i=c.n(h),j=c(11178),k=c(56843),l=c(16909),m=c(24139),n=c(99048),o=c(17640),p=c(24576),q=a([l,n]);function r(a){let b=a.replace(/[^A-Za-z0-9_.-]/g,"_");return i().join(g().homedir(),".reflex","roots",b,"suggestions.json")}async function s(a){try{let b=await e.promises.readFile(r(a),"utf8"),c=JSON.parse(b);if(c.rootId!==a||!Array.isArray(c.items))return null;return c}catch{return null}}async function t(a){let b=r(a.rootId);await e.promises.mkdir(i().dirname(b),{recursive:!0}),await e.promises.writeFile(b,JSON.stringify(a,null,2)+"\n",{encoding:"utf8",mode:384});try{await e.promises.chmod(b,384)}catch{}}async function u(a){var b;let c=await (0,p.Zn)(a);if(!c)return{ok:!1,error:"Root not found"};let d=(await (0,o.M)()).assignments.quick,e=await v(a,c.path);if(e.empty){let b={rootId:a,generatedAt:new Date().toISOString(),model:"n/a",items:[{title:"Проект пуст",why:"Нет тем, нет KB-файлов — нечего предлагать. Начни с /chat или создай первую запись.",action:{kind:"none",label:"OK"}}]};return await t(b),{ok:!0,cache:b}}let f=(b=e,['You analyse the state of a local Reflex knowledge-base project and propose 2–4 high-leverage actions for the user.\nOutput STRICT JSON: an object with one key `items`, value array of {title, why, action}.\naction.kind ∈ {"open-topic", "open-kb", "send-message", "none"}.\n - open-topic: target = topic id from the snapshot\n - open-kb: target = rel-path from the snapshot (.reflex/-relative)\n - send-message: target = the literal text Reflex should send. topicId = which topic to send into (use an existing id from the snapshot or omit for new chat).\n - none: informational only\nEach action.label is the button text (3-6 words, Russian or English to match the project\'s vibe).\nEach `title` is 4-9 words; each `why` is one sentence explaining the trigger.\nSkip trivialities. Don\'t propose chores that don\'t move the project forward.\nReply in Russian unless titles/paths are obviously English.\n\n## Snapshot',JSON.stringify(b,null,2),"\nReturn only the JSON object — no preamble, no markdown fences, no comments. The reply MUST start with `{` and end with `}`."].join("\n"));try{let b=await (0,n.T)(d,f,{timeoutMs:45e3}),c=function(a){let b=a.trim();b.startsWith("```")&&(b=b.replace(/^```[a-z]*\r?\n/i,"").replace(/```\s*$/i,""));let c=b.indexOf("{"),d=b.lastIndexOf("}");c>=0&&d>c&&(b=b.slice(c,d+1));let e=JSON.parse(b);if(!e||"object"!=typeof e||!Array.isArray(e.items))throw Error("Модель вернула не-JSON или без items[]");let f=[];for(let a of e.items){if(!a||"object"!=typeof a)continue;let b="string"==typeof a.title?a.title:null,c="string"==typeof a.why?a.why:null,d=a.action&&"object"==typeof a.action?a.action:null;if(!b||!c||!d)continue;let e=d.kind;if("open-topic"!==e&&"open-kb"!==e&&"send-message"!==e&&"none"!==e)continue;let g="string"==typeof d.label?d.label:"Открыть";f.push({title:b,why:c,action:{kind:e,label:g,..."string"==typeof d.target?{target:d.target}:{},..."string"==typeof d.topicId?{topicId:d.topicId}:{}}})}return f}(b),e={rootId:a,generatedAt:new Date().toISOString(),model:`${d.harness}:${d.model}`,items:c.slice(0,5)};return await t(e),{ok:!0,cache:e}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function v(a,b){let[c,d]=await Promise.all([(0,k.hk)(b),(0,j.dj)(b)]),e=c.map(a=>a.meta.id),f=new Set("function"==typeof l.z.listRunningTopicsForRoot?l.z.listRunningTopicsForRoot(a):[]),g=await (0,m.Z)(b,e),h=Date.now()-432e6,i=c.filter(a=>Date.parse(a.meta.updatedAt)<h).filter(a=>a.meta.goal&&"active"===a.meta.goalStatus).map(a=>({id:a.meta.id,title:a.meta.title,updatedAt:a.meta.updatedAt}));return{empty:0===c.length&&0===d.length,topicCount:c.length,topicsWithGoal:c.filter(a=>a.meta.goal&&"active"===a.meta.goalStatus).map(a=>({id:a.meta.id,title:a.meta.title,goal:a.meta.goal,iterations:a.meta.goalIterations??0,updatedAt:a.meta.updatedAt,running:f.has(a.meta.id)})),runningTopics:c.filter(a=>f.has(a.meta.id)).map(a=>({id:a.meta.id,title:a.meta.title})),recentKb:d.slice().sort((a,b)=>a.modifiedAt<b.modifiedAt?1:-1).slice(0,8).map(a=>({rel:a.rel,title:a.meta.title??a.rel,modifiedAt:a.modifiedAt})),pendingCount:g.length,totalKbFiles:d.length,staleTopics:i}}[l,n]=q.then?(await q)():q,d()}catch(a){d(a)}})},75436:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{"40005cf3d13239849c55972ebb98aacb986e67de11":()=>f.O1,"402911dc86b1ac898af85fb3251818acdd51a6f4e4":()=>f.rD,"4039528983799e2240e5a3159479e640fa601ff8e3":()=>e.x,"409d333d3e7b13a505853122dbd9a15ab36b9a90a4":()=>f.AZ,"40d2ac7d931df057cc763c3416ffd2aee8ff7a0ad9":()=>f.summarizeYoutubeAction,"40d982925be69266f12ff9cbf16f52d32c99cf7e09":()=>f.Gh,"60ba81834dba3c72cf0892e2a55fa43ca725748c58":()=>e.k});var e=c(49809),f=c(18746),g=a([e]);e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},99048:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{T:()=>h});var e=c(7206),f=c(17640),g=a([e]);async function h(a,b,c){let d=c?.timeoutMs??3e4;if("claude-code"===a.harness)return(await (0,e.execa)("claude",["-p",b,"--permission-mode","default","--allowedTools","","--model",a.model],{timeout:d,stdio:["ignore","pipe","pipe"]})).stdout.trim();if("codex"===a.harness)return(await (0,e.execa)("codex",["exec","--sandbox","read-only","--model",a.model,b],{timeout:d,stdio:["ignore","pipe","pipe"]})).stdout.trim();if("ollama"===a.harness){let c=(await (0,f.M)()).harnesses.ollama.baseUrl.replace(/\/$/,""),e=await fetch(`${c}/api/generate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a.model,prompt:b,stream:!1}),signal:AbortSignal.timeout(d)});if(!e.ok)throw Error(`Ollama /api/generate HTTP ${e.status}`);return((await e.json()).response??"").trim()}throw Error(`Unsupported quick harness: ${a.harness}`)}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})}};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=5986,exports.ids=[5986],exports.modules={879:(a,b,c)=>{c.d(b,{G:()=>k});var d=c(73024),e=c(76760),f=c.n(e),g=c(55136),h=c.n(g),i=c(54287);class j{constructor(a,b){this.root=a,this.layers=b}static async create(a){return new j(a,[]).enter(a)}async enter(a){let b,c=f().join(a,i.KZ);try{b=await d.promises.readFile(c,"utf8")}catch{return this}let e=h()().add(b);return new j(this.root,[...this.layers,{dir:a,ig:e}])}ignores(a){let b=f().basename(a);if(i.Lj.has(b))return!0;for(let{dir:b,ig:c}of this.layers){let d=f().relative(b,a);if(!(!d||d.startsWith(".."))&&c.ignores(d))return!0}return!1}}async function*k(a,b={}){let{maxDepth:c=1/0,followSymlinks:d=!1}=b,e=f().resolve(a),g=await j.create(e);yield{abs:e,rel:".",isDir:!0},yield*l(e,e,g,0,c,d)}async function*l(a,b,c,e,g,h){let i;if(!(e>=g)){try{i=await d.promises.readdir(b,{withFileTypes:!0})}catch{return}for(let d of(i.sort((a,b)=>a.name.localeCompare(b.name)),i)){var j,k;let i=f().join(b,d.name);if(c.ignores(i))continue;let n=d.isSymbolicLink();if(n&&!h)continue;let o=d.isDirectory()||n&&await m(i),p=(j=a,k=i,f().relative(j,k).split(f().sep).join("/"));if(yield{abs:i,rel:p,isDir:o},o){let b=await c.enter(i);yield*l(a,i,b,e+1,g,h)}}}}async function m(a){try{return(await d.promises.stat(a)).isDirectory()}catch{return!1}}},4168:(a,b,c)=>{c.d(b,{S:()=>j});var d=c(73745);c(66493);var e=c(76760),f=c.n(e),g=c(53905),h=c(54287),i=c(879);async function j(a,b){try{let d=await (0,g.Zn)(a);if(!d)return{ok:!1,error:"Root not found"};let e=(b??"").toLowerCase().trim(),j=[];try{let{listUtilities:b}=await Promise.resolve().then(c.bind(c,8118));for(let c of(await b({rootId:a})))j.push({kind:"utility",relPath:`util:${c.scope}/${c.manifest.id}`,absPath:"",label:`${c.manifest.name} (${c.scope})`,parent:"utilities"})}catch{}for await(let a of(0,i.G)((0,h.FF)(d.path))){if(a.isDir||!a.rel.toLowerCase().endsWith(".md")||a.rel.startsWith("topics/")||a.rel.startsWith("attachments/"))continue;let b=`${h.fW}/${a.rel}`;j.push({kind:"kb",relPath:b,absPath:a.abs,label:a.rel,parent:"."===f().dirname(a.rel)?h.fW:`${h.fW}/${f().dirname(a.rel)}`})}for await(let a of(0,i.G)(d.path))a.isDir||j.push({kind:"file",relPath:a.rel,absPath:a.abs,label:a.rel,parent:"."===f().dirname(a.rel)?"":f().dirname(a.rel)});let k=e?j.filter(a=>{let b=a.relPath.toLowerCase();return f().basename(a.relPath).toLowerCase().includes(e)||b.includes(e)}):j,l={utility:0,kb:1,file:2};return k.sort((a,b)=>{if(a.kind!==b.kind)return l[a.kind]-l[b.kind];if(e){let c=f().basename(a.label).toLowerCase(),d=f().basename(b.label).toLowerCase(),g=+!c.startsWith(e),h=+!d.startsWith(e);if(g!==h)return g-h}return a.relPath.localeCompare(b.relPath)}),{ok:!0,items:k.slice(0,30)}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}(0,c(63781).D)([j]),(0,d.A)(j,"60f34cb5f6b482a5a4bcd98f0904da410a527a2ab4",null)},4507:(a,b,c)=>{c.d(b,{L:()=>M});var d=c(64173),e=c(17240),f=c(54249),g=c(75430),h=c(34719),i=c(56189),j=c(41856),k=c(33120),l=c(69552),m=c(97338),n=c(25299),o=c(63387),p=c(53834),q=c(97162),r=c(62261),s=c(77311),t=c(25436),u=c(24555),v=c(68669),w=c(79145),x=c(66979),y=c(87671),z=c(44052),A=c(20583),B=c(45477),C=c(91344),D=c(3265);let E=(0,D.createServerReference)("60f34cb5f6b482a5a4bcd98f0904da410a527a2ab4",D.callServer,void 0,D.findSourceMapURL,"searchMentionsAction"),F=[{id:"plan",trigger:"plan",label:"/plan",description:"Сначала покажи план — Reflex распишет шаги и подождёт одобрения.",kind:"agent-mode",usage:"/plan <задача>",icon:"ListChecks"},{id:"goal",trigger:"goal",label:"/goal",description:"Поставь цель — Reflex будет двигаться к ней сам, без напоминаний.",kind:"agent-mode",usage:"/goal <чего достичь>",icon:"Target"},{id:"research",trigger:"research",label:"/research",description:"Глубокое исследование темы — поиск в интернете + сводка с источниками.",kind:"agent-mode",usage:"/research <тема>",icon:"Telescope"},{id:"widget",trigger:"widget",label:"/widget",description:"Создать карточку на дашборде пространства.",kind:"agent-mode",usage:"/widget <что показать>",icon:"LayoutGrid"},{id:"workflow",trigger:"workflow",label:"/workflow",description:"Собрать рецепт — линейная автоматизация из шагов под задачу.",kind:"agent-mode",usage:"/workflow <что автоматизировать>",icon:"Workflow"},{id:"remember",trigger:"remember",label:"/remember",description:"Запомнить заметку — сразу в память, без обращения к AI.",kind:"direct",usage:"/remember <что запомнить>",icon:"BookmarkPlus"},{id:"mcp",trigger:"mcp",label:"/mcp",description:"Подключить внешний сервис (мастер настройки откроется в чате).",kind:"agent-mode",usage:"/mcp <что нужно>",icon:"PackagePlus"},{id:"skill",trigger:"skill",label:"/skill",description:"Подключить роль — готовый набор инструкций на этот разговор.",kind:"agent-mode",usage:"/skill <id-роли> [запрос]",icon:"Sparkles"},{id:"delete-topic",trigger:"delete-topic",label:"/delete-topic",description:"Удалить этот разговор (с подтверждением).",kind:"direct",usage:"/delete-topic",requiresConfirm:!0,allowEmpty:!0,icon:"Trash2"},{id:"clear-project",trigger:"clear-project",label:"/clear-project",description:"ОПАСНО: очистить пространство — все разговоры, карточки, память. Двойное подтверждение.",kind:"direct",usage:"/clear-project",requiresConfirm:!0,allowEmpty:!0,icon:"AlertOctagon"},{id:"util",trigger:"util",label:"/util",description:"Открыть мини-приложение (по части названия или из списка).",kind:"direct",usage:"/util <часть названия или id>",allowEmpty:!0,icon:"Boxes"},{id:"help",trigger:"help",label:"/help",description:"Список доступных команд.",kind:"direct",usage:"/help",allowEmpty:!0,icon:"HelpCircle"}],G=(0,D.createServerReference)("6045aeea001632c03b9388bbb27307f9b85409f06d",D.callServer,void 0,D.findSourceMapURL,"rememberAction"),H=(0,D.createServerReference)("606b339f68fe3420b4187eca6ee3f6590debee6d06",D.callServer,void 0,D.findSourceMapURL,"deleteCurrentTopicCommand"),I=(0,D.createServerReference)("60baac6750be8d662265b7cf43a42a6b5c1db8b51b",D.callServer,void 0,D.findSourceMapURL,"openUtilityAction"),J=(0,D.createServerReference)("40dbd4ddbc72e3d08c6f93083ace525b84416b9c20",D.callServer,void 0,D.findSourceMapURL,"clearProjectAction");var K=c(88724);let L={ListChecks:f.A,Target:g.A,Telescope:h.A,LayoutGrid:i.A,BookmarkPlus:j.A,PackagePlus:k.A,Sparkles:l.A,Trash2:m.A,AlertOctagon:n.A,HelpCircle:o.A,Workflow:p.A,Boxes:q.A};function M({rootId:a,topicId:b,placeholder:c,submitLabel:f,pendingLabel:g,SubmitIcon:h,disabled:i,onSubmit:j,active:k,onStop:l,clarifyLabel:m="Уточнить",stopLabel:n="Стоп"}){let o=(0,y.useRouter)(),[p,q]=(0,e.useState)(""),[u,v]=(0,e.useState)([]),[w,x]=(0,e.useState)(!1),[D,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(!1),J=(0,e.useRef)(null),K=(0,e.useRef)(null),[L,M]=(0,e.useState)(null),[R,S]=(0,e.useState)([]),[T,U]=(0,e.useState)(0),[V,W]=(0,e.useState)(!1),X=(0,e.useRef)(0),[Y,Z]=(0,e.useState)(null);(0,e.useCallback)(()=>{let a=J.current;a&&(a.style.height="auto",a.style.height=Math.min(a.scrollHeight,240)+"px")},[]);let $=(0,e.useCallback)((b,c)=>{let d=c;for(;d>0;){let a=b[d-1];if("@"===a){d-=1;break}if(/\s/.test(a)){d=-1;break}d-=1}if(d<0||"@"!==b[d]||d>0&&!/\s/.test(b[d-1])){M(null),S([]);return}let e=b.slice(d+1,c);M({start:d,end:c}),U(0),W(!0);let f=++X.current;(async()=>{let b=await E(a,e);X.current===f&&(W(!1),S(b.ok?b.items:[]))})()},[a]),_=(0,e.useCallback)(()=>{M(null),S([]),X.current++},[]),aa=(0,e.useCallback)(a=>{if(!a.startsWith("/")||a.indexOf(" ")>=0)return void Z(null);let b=a.slice(1).toLowerCase(),c=F.filter(a=>a.trigger.startsWith(b)||a.label.toLowerCase().includes(b)||a.description.toLowerCase().includes(b));if(0===c.length)return void Z(null);Z({items:c,index:0})},[]),ab=(0,e.useCallback)(()=>Z(null),[]),ac=(0,e.useCallback)(a=>{let b=J.current,c=`/${a.trigger}${a.allowEmpty&&"direct"===a.kind?"":" "}`;q(c),Z(null),requestAnimationFrame(()=>{b&&(b.focus(),b.setSelectionRange(c.length,c.length))})},[]),ad=(0,e.useCallback)(a=>{let b=J.current;if(!b||!L)return;let c=p.slice(0,L.start),d=p.slice(L.end),e=`@${a.relPath} `;q(c+e+d),_();let f=c.length+e.length;requestAnimationFrame(()=>{b.focus(),b.setSelectionRange(f,f)})},[p,L,_]),ae=(0,e.useCallback)(async b=>{if(0!==b.length){x(!0);try{let c=new FormData;for(let a of b)c.append("files",a);let d=await fetch(`/api/roots/${a}/attachments`,{method:"POST",body:c});if(!d.ok){let a=await d.json().catch(()=>({}));z.oR.error(a.error??`Не удалось загрузить (${d.status})`);return}let e=await d.json();v(a=>[...a,...e.files])}catch(a){z.oR.error(a instanceof Error?a.message:String(a))}finally{x(!1)}}},[a]),af=p.trim().length>0||u.length>0,ag=k&&l?af?"clarify":"stop":"send",ah=(0,e.useCallback)(async()=>{if(D)return;if("stop"===ag){if(!l)return;G(!0);try{await l()}finally{G(!1)}return}let c=p.trim();if(!c&&0===u.length||i&&"send"===ag)return;let d=function(a){var b;let c=a.trim();if(!c.startsWith("/"))return null;let d=/^\/([a-z][a-z0-9-]*)(?:\s+([\s\S]*))?$/.exec(c);if(!d)return null;let e=(b=d[1],F.find(a=>a.trigger===b)??null);return e?{def:e,payload:(d[2]??"").trim()}:null}(c);if(d&&"direct"===d.def.kind){G(!0);try{await N({cmd:d.def,payload:d.payload,rootId:a,topicId:b,router:o}),q("")}finally{G(!1)}return}G(!0);try{"clarify"===ag&&l&&await l(),await j({message:c,attachments:u})&&(q(""),v([]))}finally{G(!1)}},[p,u,D,i,ag,l,j,a,b,o]),ai=!D&&!w&&("stop"===ag||af&&(!i||"clarify"===ag));return(0,d.jsxs)("form",{onSubmit:a=>{a.preventDefault(),ah()},onDragEnter:a=>{Array.from(a.dataTransfer.types).includes("Files")&&(a.preventDefault(),I(!0))},onDragOver:a=>{Array.from(a.dataTransfer.types).includes("Files")&&(a.preventDefault(),I(!0))},onDragLeave:a=>{a.currentTarget.contains(a.relatedTarget)||I(!1)},onDrop:a=>{a.preventDefault(),I(!1);let b=Array.from(a.dataTransfer.files);b.length>0&&ae(b)},className:(0,C.cn)("space-y-2 rounded-md transition-colors",H&&"ring-2 ring-ring/60 bg-accent/40"),children:[u.length>0&&(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5",children:u.map((a,b)=>(0,d.jsx)(Q,{attachment:a,onRemove:()=>v(b=>b.filter(b=>b!==a))},a.absPath+b))}),(0,d.jsxs)("div",{className:"flex items-end gap-2",children:[(0,d.jsxs)("div",{className:"relative flex-1",children:[(0,d.jsx)(B.T,{ref:J,value:p,onChange:a=>{q(a.target.value),$(a.target.value,a.target.selectionStart),aa(a.target.value)},onKeyUp:a=>{let b=a.currentTarget;$(b.value,b.selectionStart),aa(b.value)},onClick:a=>{let b=a.currentTarget;$(b.value,b.selectionStart),aa(b.value)},onBlur:()=>{setTimeout(()=>{_(),ab()},150)},onKeyDown:a=>{if(Y){if("ArrowDown"===a.key){a.preventDefault(),Z(a=>a?{...a,index:Math.min(a.items.length-1,a.index+1)}:null);return}if("ArrowUp"===a.key){a.preventDefault(),Z(a=>a?{...a,index:Math.max(0,a.index-1)}:null);return}if("Tab"===a.key){a.preventDefault();let b=Y.items[Y.index];b&&ac(b);return}if("Escape"===a.key){a.preventDefault(),ab();return}}if(L&&R.length>0){if("ArrowDown"===a.key){a.preventDefault(),U(a=>Math.min(R.length-1,a+1));return}if("ArrowUp"===a.key){a.preventDefault(),U(a=>Math.max(0,a-1));return}if("Enter"===a.key||"Tab"===a.key){a.preventDefault();let b=R[T];b&&ad(b);return}if("Escape"===a.key){a.preventDefault(),_();return}}"Enter"!==a.key||a.shiftKey||a.nativeEvent.isComposing||(a.preventDefault(),ah())},onPaste:a=>{let b=Array.from(a.clipboardData.files);b.length>0&&(a.preventDefault(),ae(b))},placeholder:c,rows:1,disabled:i||D,className:"resize-none min-h-[44px] max-h-60 text-base bg-background/70 border-transparent focus-visible:border-ring py-2.5 w-full"}),L&&(0,d.jsx)(P,{items:R,index:T,loading:V,onPick:ad,onHover:a=>U(a)}),Y&&!L&&(0,d.jsx)(O,{items:Y.items,index:Y.index,onPick:ac,onHover:a=>Z(b=>b?{...b,index:a}:null),topicAvailable:!!b})]}),(0,d.jsx)("input",{ref:K,type:"file",multiple:!0,className:"hidden",onChange:a=>{let b=Array.from(a.target.files??[]);b.length>0&&ae(b),a.target.value=""}}),(0,d.jsx)(A.$,{type:"button",size:"icon",variant:"ghost",onClick:()=>K.current?.click(),disabled:w||D||i,title:"Прикрепить файлы (можно drag&drop или Cmd+V)",className:"h-11 w-11 shrink-0",children:w?(0,d.jsx)(r.A,{className:"h-4 w-4 animate-spin"}):(0,d.jsx)(s.A,{className:"h-4 w-4"})}),(0,d.jsx)(A.$,{type:"submit",size:"lg",disabled:!ai,variant:"stop"===ag?"destructive":"default",className:"h-11 px-6 shadow-md shrink-0",children:D?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r.A,{className:"mr-2 h-4 w-4 animate-spin"}),g]}):"stop"===ag?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(t.A,{className:"mr-2 h-4 w-4",fill:"currentColor"}),n]}):"clarify"===ag?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h,{className:"mr-2 h-4 w-4"}),m]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h,{className:"mr-2 h-4 w-4"}),f]})})]}),(0,d.jsx)("div",{className:"text-[10px] text-muted-foreground",children:"Enter — отправить \xb7 Shift+Enter — новая строка \xb7 @ — упомянуть файл/заметку \xb7 `/` — команды \xb7 можно перетащить файлы или вставить из буфера"})]})}async function N({cmd:a,payload:b,rootId:c,topicId:d,router:e}){if("help"===a.id){let a=F.map(a=>`• ${a.label} — ${a.description}`);z.oR.info(`Доступные команды:
|
|
2
|
-
${a.join("\n")}`,{duration:12e3});return}if("remember"===a.id){if(!b)return void z.oR.error("Пусто — нечего запоминать. Использование: /remember <текст>");let a=await G(c,b);return void(a.ok?(z.oR.success(a.message??"Сохранено в KB"),(0,K.$d)(K.Zi.kbChanged(c))):z.oR.error(a.error))}if("delete-topic"===a.id){if(!d)return void z.oR.error("Команда работает только внутри топика.");if(!confirm("Удалить этот топик? Это необратимо."))return;let a=await H(c,d);return void(a.ok?(z.oR.success(a.message??"Удалено"),(0,K.$d)(K.Zi.topicsChanged(c)),a.redirectTo&&e.push(a.redirectTo)):z.oR.error(a.error))}if("util"===a.id){let a=await I(c,b);if(!a.ok)return void z.oR.error(a.error);if("redirect"===a.kind)return void e.push(a.url);let d=a.items.slice(0,8).map(a=>`• ${a.name} (${a.scope}/${a.id})`).join("\n");return void z.oR.message(`Несколько подходит — уточни запрос:
|
|
3
|
-
${d}`,{duration:12e3})}if("clear-project"===a.id){if(!confirm("ВНИМАНИЕ: будут удалены ВСЕ топики, виджеты и KB-файлы этого проекта. Это необратимо. Продолжить?"))return;let a=prompt("Введи фразу \xabочистить\xbb (без кавычек), чтобы подтвердить:");if(a?.trim().toLowerCase()!=="очистить")return void z.oR.message("Подтверждение не прошло — отмена.");let b=await J(c);return void(b.ok?(z.oR.success(b.message??"Проект очищен"),(0,K.$d)(K.Zi.topicsChanged(c)),(0,K.$d)(K.Zi.kbChanged(c)),b.redirectTo&&e.push(b.redirectTo)):z.oR.error(b.error))}z.oR.error(`Неизвестная команда: ${a.label}`)}function O({items:a,index:b,onPick:c,onHover:e,topicAvailable:f}){return(0,d.jsxs)("div",{className:"absolute bottom-full left-0 right-0 mb-2 z-50 max-h-80 overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-lg",children:[(0,d.jsx)("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider text-muted-foreground border-b",children:"Команды \xb7 Tab — вставить \xb7 ↑↓ — выбор \xb7 Esc — закрыть"}),(0,d.jsx)("ul",{children:a.map((a,g)=>{let h=L[a.icon]??l.A,i="delete-topic"===a.id&&!f;return(0,d.jsx)("li",{children:(0,d.jsxs)("button",{type:"button",onMouseDown:b=>{b.preventDefault(),i||c(a)},onMouseEnter:()=>e(g),disabled:i,className:(0,C.cn)("w-full flex items-start gap-2 px-3 py-2 text-left",g===b?"bg-accent":"hover:bg-accent/60",i&&"opacity-40 cursor-not-allowed"),children:[(0,d.jsx)(h,{className:(0,C.cn)("h-3.5 w-3.5 mt-0.5 shrink-0","direct"===a.kind?"text-amber-600":"text-violet-600")}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-baseline gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"font-mono text-xs font-medium",children:a.label}),"direct"===a.kind&&(0,d.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-amber-700",children:"прямое действие"}),a.requiresConfirm&&(0,d.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-destructive",children:"с подтверждением"})]}),(0,d.jsx)("p",{className:"text-[11px] text-muted-foreground leading-snug mt-0.5",children:a.description}),(0,d.jsx)("p",{className:"text-[10px] text-muted-foreground/80 font-mono mt-0.5",children:a.usage})]})]})},a.id)})})]})}function P({items:a,index:b,loading:c,onPick:e,onHover:f}){return(0,d.jsx)("div",{className:"absolute bottom-full left-0 right-0 mb-2 z-50 max-h-72 overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-lg",children:c&&0===a.length?(0,d.jsxs)("div",{className:"px-3 py-2 text-xs text-muted-foreground flex items-center gap-2",children:[(0,d.jsx)(r.A,{className:"h-3 w-3 animate-spin"})," поиск…"]}):0===a.length?(0,d.jsx)("div",{className:"px-3 py-2 text-xs text-muted-foreground italic",children:"ничего не найдено"}):(0,d.jsx)("ul",{children:a.map((a,c)=>{let g="kb"===a.kind?u.A:v.A;return(0,d.jsx)("li",{children:(0,d.jsxs)("button",{type:"button",onMouseDown:b=>{b.preventDefault(),e(a)},onMouseEnter:()=>f(c),className:(0,C.cn)("w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left",c===b?"bg-accent":"hover:bg-accent/60"),children:[(0,d.jsx)(g,{className:(0,C.cn)("h-3.5 w-3.5 shrink-0","kb"===a.kind?"text-primary":"text-muted-foreground")}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsx)("div",{className:"truncate font-mono text-xs",children:a.relPath}),a.parent&&(0,d.jsx)("div",{className:"truncate text-[10px] text-muted-foreground",children:a.parent})]}),(0,d.jsx)("span",{className:(0,C.cn)("text-[10px] uppercase tracking-wider shrink-0","kb"===a.kind?"text-primary":"text-muted-foreground"),children:a.kind})]})},a.absPath)})})})}function Q({attachment:a,onRemove:b}){var c;let e=a.mime.startsWith("image/")?w.A:v.A;return(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-1 text-[11px] max-w-[18rem]",children:[(0,d.jsx)(e,{className:"h-3 w-3 text-muted-foreground shrink-0"}),(0,d.jsx)("span",{className:"truncate",title:a.name,children:a.name}),(0,d.jsx)("span",{className:"text-muted-foreground",children:(c=a.size)<1024?`${c} B`:c<1048576?`${(c/1024).toFixed(1)} KB`:`${(c/1048576).toFixed(1)} MB`}),(0,d.jsx)("button",{type:"button",onClick:b,className:"ml-0.5 text-muted-foreground hover:text-foreground",children:(0,d.jsx)(x.A,{className:"h-3 w-3"})})]})}},8836:(a,b,c)=>{c.d(b,{E:()=>f});var d=c(64173),e=c(69552);function f({label:a="Спроси Reflex",headerRight:b,children:c}){return(0,d.jsx)("div",{className:"border-t bg-background",children:(0,d.jsx)("div",{className:"mx-auto max-w-3xl px-6 py-5",children:(0,d.jsx)("div",{className:"reflex-gradient rounded-2xl p-[2px] shadow-[0_8px_40px_-12px_oklch(0.55_0.2_290/0.45)]",children:(0,d.jsxs)("div",{className:"rounded-[14px] bg-background/85 backdrop-blur-xl px-5 py-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,d.jsx)("span",{className:"reflex-gradient inline-flex h-6 w-6 items-center justify-center rounded-full text-white shadow-sm",children:(0,d.jsx)(e.A,{className:"h-3.5 w-3.5"})}),(0,d.jsx)("span",{className:"text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:a}),b&&(0,d.jsx)("span",{className:"ml-auto flex items-center gap-1",children:b})]}),c]})})})})}},26290:(a,b,c)=>{c.d(b,{cn:()=>f});var d=c(83243),e=c(86103);function f(...a){return(0,e.QP)((0,d.$)(a))}},45477:(a,b,c)=>{c.d(b,{T:()=>f});var d=c(64173);c(17240);var e=c(91344);function f({className:a,...b}){return(0,d.jsx)("textarea",{"data-slot":"textarea",className:(0,e.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground 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 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",a),...b})}},67248:(a,b,c)=>{c.d(b,{E:()=>i});var d=c(63003);c(34750);var e=c(86209),f=c(65715),g=c(26290);let h=(0,e.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function i({className:a,variant:b="default",asChild:c=!1,...e}){let i=c?f.bL:"span";return(0,d.jsx)(i,{"data-slot":"badge","data-variant":b,className:(0,g.cn)(h({variant:b}),a),...e})}},72901:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{LL:()=>v,ZC:()=>z,b2:()=>u,qO:()=>t,wd:()=>y});var e=c(73745);c(66493);var f=c(73024),g=c(76760),h=c.n(g),i=c(65326),j=c(53905),k=c(54287),l=c(56942),m=c(5492),n=c(13415),o=c(93554),p=c(49410),q=c(96921),r=c(63781),s=a([n,o]);async function t(a,b){try{let c=b.trim();if(!c)return{ok:!1,error:"Пусто — нечего запоминать."};let d=await (0,j.Zn)(a);if(!d)return{ok:!1,error:"Root not found"};let e=c.split(/\r?\n/,1)[0].trim(),f=e.length>80?e.slice(0,77).trimEnd()+"…":e,g=await (0,l.j)({rootPath:d.path,directive:{kind:"note",title:f,body:c}});return(0,i.revalidatePath)(`/roots/${a}`),{ok:!0,message:`Сохранено в ${g.relPath}`}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function u(a,b){let c=await (0,n.L4)(a,b);return c.ok?{ok:!0,redirectTo:`/roots/${a}`,message:"Топик удалён"}:{ok:!1,error:c.error??"Failed"}}async function v(a){try{let b=await (0,j.Zn)(a);if(!b)return{ok:!1,error:"Root not found"};let c=(0,k.FF)(b.path);for(let a of(await (0,m.hk)(b.path)))await o.z.stopTopic(a.meta.id).catch(()=>void 0);return await w(h().join(c,"widgets")),await w(h().join(c,"dashboard-layout.json")),await w(h().join(c,"topics")),await x(c),(0,i.revalidatePath)(`/roots/${a}`),{ok:!0,redirectTo:`/roots/${a}`,message:"Проект очищен. Поехали с нуля."}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function w(a){try{await f.promises.rm(a,{recursive:!0,force:!0})}catch{}}async function x(a){let b;try{b=await f.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let c of b){let b=h().join(a,c.name);if(c.isDirectory()){await x(b);try{let a=await f.promises.readdir(b);0===a.length&&await f.promises.rmdir(b)}catch{}continue}c.name.toLowerCase().endsWith(".md")&&await f.promises.unlink(b).catch(()=>void 0)}}async function y(){let a=await (0,p.b)();return{ok:!0,commands:q.Lo,skills:a}}async function z(a,b){let{listUtilities:d}=await Promise.resolve().then(c.bind(c,8118)),e=await d({rootId:a}),f=b.trim().toLowerCase(),g=e.map(a=>({id:a.manifest.id,name:a.manifest.name,scope:a.scope,rootId:a.rootId})),h=a=>{let b=a.rootId?`?rootId=${encodeURIComponent(a.rootId)}`:"";return`/utilities/${a.scope}/${a.id}${b}`};if(!f)return 0===g.length?{ok:!1,error:"Пока ни одного мини-приложения не установлено."}:{ok:!0,kind:"choices",items:g.map(a=>({url:h(a),id:a.id,name:a.name,scope:a.scope}))};let i=g.find(a=>a.id.toLowerCase()===f);if(i)return{ok:!0,kind:"redirect",url:h(i)};let j=g.filter(a=>a.id.toLowerCase().includes(f)||a.name.toLowerCase().includes(f));return 1===j.length?{ok:!0,kind:"redirect",url:h(j[0])}:0===j.length?{ok:!1,error:`Ничего не нашлось по \xab${b}\xbb. Установлено: ${g.length}.`}:{ok:!0,kind:"choices",items:j.map(a=>({url:h(a),id:a.id,name:a.name,scope:a.scope}))}}[n,o]=s.then?(await s)():s,(0,r.D)([t,u,v,y,z]),(0,e.A)(t,"6045aeea001632c03b9388bbb27307f9b85409f06d",null),(0,e.A)(u,"606b339f68fe3420b4187eca6ee3f6590debee6d06",null),(0,e.A)(v,"40dbd4ddbc72e3d08c6f93083ace525b84416b9c20",null),(0,e.A)(y,"0079c3d81ca282a36ecb9822e223ef5deb549c1448",null),(0,e.A)(z,"60baac6750be8d662265b7cf43a42a6b5c1db8b51b",null),d()}catch(a){d(a)}})},84913:(a,b,c)=>{c.d(b,{$:()=>i});var d=c(63003);c(34750);var e=c(86209),f=c(65715),g=c(26290);let h=(0,e.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function i({className:a,variant:b="default",size:c="default",asChild:e=!1,...i}){let j=e?f.bL:"button";return(0,d.jsx)(j,{"data-slot":"button","data-variant":b,"data-size":c,className:(0,g.cn)(h({variant:b,size:c,className:a})),...i})}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=613,exports.ids=[613],exports.modules={50613:(a,b,c)=>{c.d(b,{UtilityIframe:()=>r});var d=c(64173),e=c(17240),f=c(53186),g=c(65177),h=c(66979),i=c(69552),j=c(62261),k=c(73569),l=c(1056),m=c.n(l),n=c(44052),o=c(3265);function p({scope:a,utilityId:b,utilityName:c,rootId:l,requestSnapshot:o,onClose:p}){let[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)([]),[v,w]=(0,e.useState)(""),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useTransition)(),[B,C]=(0,e.useState)(!1),D=(0,e.useRef)(null);(0,e.useRef)(null),(0,e.useRef)("");let[E,F]=(0,e.useState)(""),G=()=>{let a=v.trim();a&&l&&r&&(w(""),u(b=>[...b,{role:"user",text:a,ts:new Date().toISOString()}]),A(async()=>{let b;try{b=await Promise.race([o(),new Promise(a=>setTimeout(()=>a(void 0),600))])}catch{}let c=void 0!==b?function(a,b){let c;try{c="string"==typeof b?b:JSON.stringify(b,null,2)}catch{c=String(b)}return c.length>4e3&&(c=c.slice(0,4e3)+"\n…[truncated]"),["[Контекст мини-приложения]",c,"[/контекст]\n",a].join("\n")}(a,b):a;try{let a=await fetch(`/api/roots/${l}/chat/${r}/send`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:c})});if(!a.ok){let b=await a.json().catch(()=>({}));n.oR.error(b.error??`HTTP ${a.status}`)}}catch(a){n.oR.error(String(a))}}))};return(0,d.jsxs)("aside",{className:"flex h-full flex-col border-l bg-card",children:[(0,d.jsxs)("header",{className:"border-b px-3 py-2 flex items-center gap-2",children:[(0,d.jsx)(f.A,{className:"h-3.5 w-3.5 text-violet-600"}),(0,d.jsx)("span",{className:"text-sm font-medium",children:"Помощник"}),(0,d.jsx)("span",{className:"text-[10px] text-muted-foreground ml-1",children:"знает контекст этого приложения"}),l&&r&&(0,d.jsx)(m(),{href:`/roots/${l}/chat/${r}`,className:"ml-auto p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground",title:"Открыть в полном чате",children:(0,d.jsx)(g.A,{className:"h-3.5 w-3.5"})}),p&&(0,d.jsx)("button",{type:"button",onClick:p,className:"p-1 rounded hover:bg-accent "+(l&&r?"":"ml-auto"),title:"Скрыть",children:(0,d.jsx)(h.A,{className:"h-3.5 w-3.5"})})]}),(0,d.jsxs)("div",{ref:D,className:"flex-1 overflow-y-auto px-3 py-2 space-y-2 text-sm",children:[x&&(0,d.jsx)("p",{className:"text-xs text-red-600",children:x}),!x&&0===t.length&&!E&&(0,d.jsxs)("div",{className:"text-xs text-muted-foreground flex items-start gap-2",children:[(0,d.jsx)(i.A,{className:"h-3 w-3 mt-0.5 text-violet-600 shrink-0"}),(0,d.jsx)("span",{children:"Спроси что-нибудь про данные этого мини-приложения. Диалог сохраняется как обычный разговор — можно открыть полностью по иконке в углу."})]}),t.map((a,b)=>(0,d.jsx)(q,{role:a.role,text:a.text},b)),B&&E&&(0,d.jsx)(q,{role:"assistant",text:E,streaming:!0}),z&&!B&&(0,d.jsxs)("div",{className:"mr-6 rounded-md bg-muted/40 px-2 py-1.5 text-xs text-muted-foreground inline-flex items-center gap-2",children:[(0,d.jsx)(j.A,{className:"h-3 w-3 animate-spin"}),"Reflex думает…"]})]}),(0,d.jsxs)("div",{className:"border-t px-3 py-2 flex items-end gap-1.5",children:[(0,d.jsx)("textarea",{value:v,onChange:a=>w(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),G())},rows:1,placeholder:"Спроси (⌘↵)…",disabled:z||!!x||!r,className:"flex-1 resize-none rounded border bg-background px-2 py-1 text-xs focus:outline-none focus:ring-1 focus:ring-violet-400 max-h-24"}),(0,d.jsx)("button",{type:"button",onClick:G,disabled:z||!v.trim()||!!x||!r,className:"inline-flex items-center justify-center rounded bg-violet-600 px-2 py-1 text-white hover:bg-violet-700 disabled:opacity-50",children:z?(0,d.jsx)(j.A,{className:"h-3 w-3 animate-spin"}):(0,d.jsx)(k.A,{className:"h-3 w-3"})})]})]})}function q({role:a,text:b,streaming:c}){let e=b;return("user"===a&&(e=e.replace(/^\s*\[Контекст мини-приложения\][\s\S]*?\[\/контекст\]\s*/,"").trim()),e.trim())?(0,d.jsxs)("div",{className:"user"===a?"ml-6 rounded-md bg-violet-50 dark:bg-violet-950/30 px-2 py-1.5":"mr-6 rounded-md bg-muted/40 px-2 py-1.5 whitespace-pre-wrap",children:[(0,d.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-0.5",children:["user"===a?"Ты":"assistant"===a?"Reflex":"Система",c&&(0,d.jsx)("span",{className:"ml-1 text-violet-600",children:"●"})]}),e]}):null}function r({scope:a,id:b,rootId:c,className:g,title:h,agentChat:i,utilityName:j}){let k=(0,e.useRef)(null),l=(0,e.useRef)(null),[m,n]=(0,e.useState)(!0),o=c?`?rootId=${encodeURIComponent(c)}`:"",q=`/api/utilities/${a}/${b}/iframe${o}`,r=(0,d.jsx)("iframe",{ref:k,src:q,sandbox:"allow-scripts allow-forms allow-same-origin",className:g??"h-full w-full border-0 bg-white",title:h??`utility-${b}`});return i?(0,d.jsxs)("div",{className:"flex h-full w-full",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0 relative",children:[r,!m&&(0,d.jsxs)("button",{type:"button",onClick:()=>n(!0),className:"absolute right-3 bottom-3 inline-flex items-center gap-1 rounded-full bg-violet-600 px-3 py-1.5 text-xs text-white shadow-lg hover:bg-violet-700",title:"Открыть помощника",children:[(0,d.jsx)(f.A,{className:"h-3.5 w-3.5"}),"Помощник"]})]}),m&&(0,d.jsx)("div",{className:"w-80 shrink-0",children:(0,d.jsx)(p,{scope:a,utilityId:b,...j?{utilityName:j}:{},...c?{rootId:c}:{},requestSnapshot:()=>{let a=k.current?.contentWindow;return a?(l.current&&(clearTimeout(l.current.timer),l.current.resolve(void 0),l.current=null),new Promise(b=>{let c=setTimeout(()=>{l.current?.resolve===b&&(l.current=null,b(void 0))},500);l.current={resolve:b,timer:c};try{a.postMessage({type:"request-snapshot"},"*")}catch{clearTimeout(c),l.current=null,b(void 0)}})):Promise.resolve(void 0)},onClose:()=>n(!1)})})]}):r}o.callServer,o.findSourceMapURL,o.callServer,o.findSourceMapURL},65177:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(42557).A)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},66979:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(42557).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},73569:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(42557).A)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])}};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=6536,exports.ids=[6536],exports.modules={4979:(a,b,c)=>{c.d(b,{h:()=>e});var d=c(3265);let e=(0,d.createServerReference)("7091b99a789641a5b42e215c5d4df0e01635ea4d0c",d.callServer,void 0,d.findSourceMapURL,"generateTopicTitleAction")},8904:(a,b,c)=>{c.d(b,{g:()=>e});var d=c(3265);let e=(0,d.createServerReference)("78aa2f0aa9b7272a731bab5e297ecdda045a5f8e9d",d.callServer,void 0,d.findSourceMapURL,"startTopicAction")},11178:(a,b,c)=>{c.d(b,{CA:()=>j,IK:()=>n,RP:()=>k,dj:()=>l,xO:()=>m});var d=c(73024),e=c(76760),f=c.n(e),g=c(30192),h=c.n(g),i=c(13474);async function j(a){let b=(0,i.FF)(a);return o(b,b)}async function k(a){let b=(0,i.FF)(a);try{let a=await o(b,b),c=a.reduce((a,b)=>a+b.size,0);return{exists:!0,fileCount:a.length,totalBytes:c}}catch{return{exists:!1,fileCount:0,totalBytes:0}}}async function l(a){let b=await j(a);return await Promise.all(b.map(async a=>({...a,meta:await p(a.abs)})))}async function m(a){return p(a)}async function n(a,b){let c=(0,i.FF)(a),e=f().resolve(c,b),g=f().relative(c,e);if(g.startsWith("..")||f().isAbsolute(g))throw Error(`Refused to read outside ${i.fW}: ${b}`);return d.promises.readFile(e,"utf8")}async function o(a,b){let c;try{c=await d.promises.readdir(b,{withFileTypes:!0})}catch{return[]}let e=[],g=[];for(let d of c){let c=f().join(b,d.name);if(d.isDirectory()){if(b===a&&"topics"===d.name)continue;e.push(o(a,c));continue}d.isFile()&&d.name.toLowerCase().endsWith(".md")&&g.push({rel:f().relative(a,c).split(f().sep).join("/"),abs:c,size:0,modifiedAt:""})}let h=await Promise.all(g.map(async a=>{try{let b=await d.promises.stat(a.abs);return{...a,size:b.size,modifiedAt:b.mtime.toISOString()}}catch{return a}}));for(let a of(await Promise.all(e)))h.push(...a);return h.sort((a,b)=>a.rel.localeCompare(b.rel)),h}async function p(a){try{let b=await d.promises.readFile(a,"utf8"),c=h()(b).data;return{...void 0!==q(c.title)?{title:q(c.title)}:{},...void 0!==r(c.version)?{version:r(c.version)}:{},...void 0!==q(c.date)?{date:q(c.date)}:{},...void 0!==q(c.kind)?{kind:q(c.kind)}:{},data:c}}catch{return{data:{}}}}function q(a){return"string"==typeof a?a:a instanceof Date?a.toISOString().slice(0,10):void 0}function r(a){if("string"==typeof a||"number"==typeof a)return a}},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})}},13813:(a,b,c)=>{c.d(b,{ShareButton:()=>o});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(3265);let m=(0,l.createServerReference)("403ed4d14b11a90cacc5b9f70460c86f0b95c3568a",l.callServer,void 0,l.findSourceMapURL,"createShareAction");var n=c(21080);function o(a){let[b,c]=(0,e.useState)(!1),[l,o]=(0,e.useState)(""),[p,q]=(0,e.useTransition)(),[r,s]=(0,e.useState)(null);return b?r?(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:"Ссылка создана"})]}),(0,d.jsx)("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"block font-mono text-[11px] text-violet-700 hover:underline break-all",children:r.url}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(r.url).then(()=>k.oR.success("Скопировано")),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"}),"Скопировать"]}),(0,d.jsx)("button",{type:"button",onClick:()=>{s(null),c(!1),o("")},className:"text-muted-foreground hover:text-foreground",children:"Готово"})]})]}):(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:"Новая публичная ссылка"}),(0,d.jsx)("button",{type:"button",onClick:()=>c(!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:"Пароль (опционально)"}),(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:l,onChange:a=>o(a.target.value),autoFocus:!0,placeholder:"пусто = открытая ссылка",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:()=>{q(async()=>{let b=await (0,n.N)(),c=await m({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}:{},...l.trim()?{password:l.trim()}:{}});if(!c.ok)return void k.oR.error(c.error);let d=b.status.publicUrl??window.location.origin,e=new URL(`/share/${c.share.id}`,d).toString();s({share:c.share,url:e}),navigator.clipboard.writeText(e).catch(()=>null),k.oR.success(b.status.running?"Ссылка создана и скопирована":"Ссылка создана; запусти ngrok-туннель в настройках чтобы открыть извне")})},disabled:p,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:p?"Создание…":"Создать ссылку"}),(0,d.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"Ссылку будет видно только после старта ngrok-туннеля (Настройки → Публичные ссылки)."})]}):(0,d.jsxs)("button",{type:"button",onClick:()=>c(!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:"Создать публичную ссылку",children:[(0,d.jsx)(f,{className:"h-3.5 w-3.5"}),!a.iconOnly&&"Поделиться"]})}},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:()=>n});var d=c(64173),e=c(17240),f=c(87671),g=c(73569),h=c(44052),i=c(8904),j=c(4979),k=c(8836),l=c(88724),m=c(4507);function n({rootId:a,focusFile:b}){let[,c]=(0,e.useTransition)(),n=(0,f.useRouter)();return(0,d.jsx)(k.E,{label:"Спроси Reflex",children:(0,d.jsx)(m.L,{rootId:a,placeholder:"Задай вопрос о проекте или дай команду…",submitLabel:"Начать",pendingLabel:"Старт",SubmitIcon:g.A,onSubmit:async({message:d,attachments:e})=>await new Promise(f=>{c(async()=>{let c=await (0,i.g)(a,d,e,b);if(!c.ok){h.oR.error(c.error??"Failed to start"),f(!1);return}(0,l.$d)(l.Zi.topicsChanged(a)),d.trim()&&(0,j.h)(a,c.topicId,d).then(b=>{b.ok&&(0,l.$d)(l.Zi.topicsChanged(a))}),n.push(`/roots/${a}/chat/${c.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")},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
|
-
_Фото: [${a.attribution.name}](${a.attribution.link})_`:"",f=`${e}`;return a.attachToKb&&(b=await m(a.rootId,{title:a.alt||"Найденная картинка",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||"Загруженная картинка",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.Zn)(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,"40a53333ef77b210d862245d73a76338db8916f65d",null),(0,d.A)(j,"40520afdf05c052a0d9150d0e1bd17e823d7a24310",null),(0,d.A)(k,"4052e2de29b5cf1b17e60fc810d6d98790e5e84554",null),(0,d.A)(l,"40293fb63a31f369ce72ce8c6761e38e226a29b8ad",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"}]])},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"}]])},99891:(a,b,c)=>{c.d(b,{InsertImageButton:()=>B});var d=c(64173),e=c(17240),f=c(87671),g=c(29130),h=c(20583),i=c(66979),j=c(69552),k=c(65943);let l=(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 m=c(44052),n=c(47071),o=c(45477),p=c(80281),q=c(71155),r=c(16551),s=c(27456),t=c(12650),u=c(3265);let v=(0,u.createServerReference)("40a53333ef77b210d862245d73a76338db8916f65d",u.callServer,void 0,u.findSourceMapURL,"generateAction"),w=(0,u.createServerReference)("40520afdf05c052a0d9150d0e1bd17e823d7a24310",u.callServer,void 0,u.findSourceMapURL,"searchAction"),x=(0,u.createServerReference)("4052e2de29b5cf1b17e60fc810d6d98790e5e84554",u.callServer,void 0,u.findSourceMapURL,"attachAction"),y=(0,u.createServerReference)("40293fb63a31f369ce72ce8c6761e38e226a29b8ad",u.callServer,void 0,u.findSourceMapURL,"uploadAction"),z=["1:1","16:9","9:16","4:3","3:4","21:9"];function A({rootId:a,open:b,onOpenChange:c,onInsert:f}){let[u,A]=(0,e.useState)(""),[B,C]=(0,e.useState)("gemini"),[D,E]=(0,e.useState)("1:1"),[F,G]=(0,e.useState)(!0),[H,I]=(0,e.useState)(null),[J,K]=(0,e.useTransition)(),[L,M]=(0,e.useState)(""),[N,O]=(0,e.useState)("unsplash"),[P,Q]=(0,e.useState)([]),[R,S]=(0,e.useTransition)(),[T,U]=(0,e.useState)(null),[V,W]=(0,e.useState)(!0),[X,Y]=(0,e.useState)(""),[Z,$]=(0,e.useState)(!0),[_,aa]=(0,e.useTransition)();if(!b)return null;let ab=()=>{L.trim()&&(Q([]),S(async()=>{let b=await w({rootId:a,query:L.trim(),provider:N,count:12});if(!b.ok)return void m.oR.error(b.error);Q(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:"Картинка в KB"}),(0,d.jsx)(h.$,{type:"button",size:"icon",variant:"ghost",className:"h-7 w-7",onClick:()=>c(!1),children:(0,d.jsx)(i.A,{className:"h-4 w-4"})})]}),(0,d.jsxs)(r.tU,{defaultValue:"generate",className:"flex-1 min-h-0 flex flex-col",children:[(0,d.jsxs)(r.j7,{className:"mx-4 mt-3 self-start",children:[(0,d.jsxs)(r.Xi,{value:"generate",children:[(0,d.jsx)(j.A,{className:"mr-1 h-3.5 w-3.5"})," Сгенерировать"]}),(0,d.jsxs)(r.Xi,{value:"search",children:[(0,d.jsx)(k.A,{className:"mr-1 h-3.5 w-3.5"})," Найти"]}),(0,d.jsxs)(r.Xi,{value:"upload",children:[(0,d.jsx)(l,{className:"mr-1 h-3.5 w-3.5"})," Загрузить"]})]}),(0,d.jsxs)(s.F,{className:"flex-1 min-h-0",children:[(0,d.jsxs)(r.av,{value:"generate",className:"px-4 py-4 space-y-3",children:[(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)(p.J,{htmlFor:"img-prompt",children:"Промпт"}),(0,d.jsx)(o.T,{id:"img-prompt",value:u,onChange:a=>A(a.target.value),placeholder:"Подробное описание: стиль, композиция, освещение...",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)(p.J,{children:"Провайдер"}),(0,d.jsxs)(q.l6,{value:B,onValueChange:a=>C(a),children:[(0,d.jsx)(q.bq,{children:(0,d.jsx)(q.yv,{})}),(0,d.jsxs)(q.gC,{children:[(0,d.jsx)(q.eb,{value:"gemini",children:"Gemini Nano Banana"}),(0,d.jsx)(q.eb,{value:"codex",children:"Codex $imagegen"})]})]})]}),(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)(p.J,{children:"Соотношение"}),(0,d.jsxs)(q.l6,{value:D,onValueChange:E,children:[(0,d.jsx)(q.bq,{children:(0,d.jsx)(q.yv,{})}),(0,d.jsx)(q.gC,{children:z.map(a=>(0,d.jsx)(q.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:F,onChange:a=>G(a.target.checked)}),"Сохранить как отдельную запись в KB (kind: image)"]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(h.$,{type:"button",size:"sm",onClick:()=>{u.trim()&&(I(null),K(async()=>{let b=await v({rootId:a,prompt:u.trim(),provider:B,aspectRatio:D,attachToKb:F});if(!b.ok)return void m.oR.error(b.error);I({url:b.url,markdown:b.markdown,...b.kbRelPath?{kbRelPath:b.kbRelPath}:{}})}))},disabled:J||!u.trim(),children:J?"Генерирую...":"Сгенерировать"}),J&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:"Может занять до минуты"})]}),J?(0,d.jsx)(t.E,{className:"h-64 w-full"}):H?(0,d.jsxs)("div",{className:"space-y-2 border rounded p-3",children:[(0,d.jsx)("img",{src:H.url,alt:u,className:"max-h-80 mx-auto rounded"}),(0,d.jsxs)("div",{className:"flex gap-2 justify-end",children:[(0,d.jsx)(h.$,{type:"button",size:"sm",variant:"outline",onClick:()=>I(null),children:"Ещё раз"}),(0,d.jsx)(h.$,{type:"button",size:"sm",onClick:()=>{H&&(f?.(H),m.oR.success(H.kbRelPath?`Сохранено в KB: ${H.kbRelPath}`:"Картинка готова"),c(!1))},children:"Вставить"})]})]}):null]}),(0,d.jsxs)(r.av,{value:"search",className:"px-4 py-4 space-y-3",children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(n.p,{value:L,onChange:a=>M(a.target.value),placeholder:"например: mountains sunrise",onKeyDown:a=>{"Enter"===a.key&&ab()}}),(0,d.jsxs)(q.l6,{value:N,onValueChange:a=>O(a),children:[(0,d.jsx)(q.bq,{className:"w-36",children:(0,d.jsx)(q.yv,{})}),(0,d.jsxs)(q.gC,{children:[(0,d.jsx)(q.eb,{value:"unsplash",children:"Unsplash"}),(0,d.jsx)(q.eb,{value:"pexels",children:"Pexels"}),(0,d.jsx)(q.eb,{value:"brave",children:"Brave (весь веб)"})]})]}),(0,d.jsx)(h.$,{type:"button",size:"sm",onClick:ab,disabled:R||!L.trim(),children:"Найти"})]}),(0,d.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,d.jsx)("input",{type:"checkbox",checked:V,onChange:a=>W(a.target.checked)}),"Сохранить как отдельную запись в KB (kind: image)"]}),R&&0===P.length?(0,d.jsx)("div",{className:"grid grid-cols-3 gap-2",children:Array.from({length:6}).map((a,b)=>(0,d.jsx)(t.E,{className:"h-32 w-full"},b))}):P.length>0?(0,d.jsx)("div",{className:"grid grid-cols-3 gap-2",children:P.map(b=>(0,d.jsxs)("button",{type:"button",disabled:null!==T,onClick:()=>{U(b.url),S(async()=>{let d=await x({rootId:a,sourceUrl:b.url,alt:L.trim()||"image",attribution:b.attribution,attachToKb:V});if(U(null),!d.ok)return void m.oR.error(d.error);f?.({url:d.url,markdown:d.markdown,...d.kbRelPath?{kbRelPath:d.kbRelPath}:{}}),m.oR.success(d.kbRelPath?`Сохранено в KB: ${d.kbRelPath}`:"Картинка добавлена в проект"),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}),T===b.url&&(0,d.jsx)("div",{className:"absolute inset-0 bg-black/40 flex items-center justify-center text-xs text-white",children:"Сохраняю…"})]},b.url))}):(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:"Нужен ключ Unsplash / Pexels в Settings → Images."})]}),(0,d.jsxs)(r.av,{value:"upload",className:"px-4 py-4 space-y-3",children:[(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsx)(p.J,{htmlFor:"img-alt",children:"Подпись (alt)"}),(0,d.jsx)(n.p,{id:"img-alt",value:X,onChange:a=>Y(a.target.value),placeholder:"Что на картинке"})]}),(0,d.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,d.jsx)("input",{type:"checkbox",checked:Z,onChange:a=>$(a.target.checked)}),"Сохранить как отдельную запись в KB (kind: image)"]}),(0,d.jsx)(n.p,{type:"file",accept:"image/*",disabled:_,onChange:b=>{let d=b.target.files?.[0];d&&aa(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 y({rootId:a,base64:b,mime:d.type,alt:X||d.name.replace(/\.[^.]+$/,""),attachToKb:Z});if(!e.ok)return void m.oR.error(e.error);f?.({url:e.url,markdown:e.markdown,...e.kbRelPath?{kbRelPath:e.kbRelPath}:{}}),m.oR.success(e.kbRelPath?`Сохранено в KB: ${e.kbRelPath}`:"Картинка загружена"),c(!1)})}}),_&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:"Загружаю…"})]})]})]})]})]})}function B({rootId:a,redirectToKb:b=!0}){let[c,i]=(0,e.useState)(!1),j=(0,f.useRouter)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(h.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>i(!0),children:[(0,d.jsx)(g.A,{className:"mr-1 h-4 w-4"})," Картинка"]}),(0,d.jsx)(A,{rootId:a,open:c,onOpenChange:i,onInsert:({kbRelPath:c})=>{if(b&&c){let b=c.split("/").map(encodeURIComponent).join("/");j.push(`/roots/${a}/kb/${b}`)}}})]})}}};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=6602,exports.ids=[6602],exports.modules={16856:(a,b,c)=>{c.d(b,{Is:()=>g,L8:()=>h,ns:()=>i});var d=c(73745);c(66493);var e=c(65326),f=c(30878);async function g(a){try{if("utility"===a.kind&&(!a.utilityId||!a.utilityScope))return{ok:!1,error:"share kind=utility requires utilityId + utilityScope"};if("kb-file"===a.kind&&(!a.rootId||!a.kbRelPath))return{ok:!1,error:"share kind=kb-file requires rootId + kbRelPath"};if(("kb-tree"===a.kind||"project"===a.kind)&&!a.rootId)return{ok:!1,error:`share kind=${a.kind} requires rootId`};let b=await (0,f.cn)(a);return(0,e.revalidatePath)("/settings"),{ok:!0,share:b}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function h(){return{shares:await (0,f.Bg)()}}async function i(a){let b=await (0,f.Ru)(a);return(0,e.revalidatePath)("/settings"),{ok:b}}(0,c(63781).D)([g,h,i]),(0,d.A)(g,"403ed4d14b11a90cacc5b9f70460c86f0b95c3568a",null),(0,d.A)(h,"006be381f3bd84d5b49ca424fdcbdd5ba7aa2732e5",null),(0,d.A)(i,"40c646e8ace5a31f08b0a566acfd6617e206ed1651",null)},21080:(a,b,c)=>{c.d(b,{N:()=>e});var d=c(3265);let e=(0,d.createServerReference)("005adec00ada04c63ac5fd3676f300faaa566baba2",d.callServer,void 0,d.findSourceMapURL,"getTunnelStatusAction")},30878:(a,b,c)=>{c.d(b,{BE:()=>p,Bg:()=>n,Ru:()=>r,cn:()=>q,er:()=>o});var d=c(73024),e=c(76760),f=c.n(e),g=c(48161),h=c.n(g),i=c(77598),j=c.n(i);let k=f().join(h().homedir(),".reflex","shares.json");async function l(){try{let a=await d.promises.readFile(k,"utf8"),b=JSON.parse(a);if(b&&Array.isArray(b.shares))return b}catch{}return{version:1,shares:[]}}async function m(a){await d.promises.mkdir(f().dirname(k),{recursive:!0}),await d.promises.writeFile(k,JSON.stringify(a,null,2)+"\n",{mode:384})}async function n(){return(await l()).shares}async function o(a){return(await l()).shares.find(b=>b.id===a)??null}function p(a,b){if(!a.passwordHash)return!0;if(!a.passwordSalt)return!1;let c=j().createHash("sha256").update(a.passwordSalt+":"+b).digest("hex");return j().timingSafeEqual(Buffer.from(c,"hex"),Buffer.from(a.passwordHash,"hex"))}async function q(a){let b=await l(),c={id:function(){let a="abcdefghjkmnpqrstuvwxyz23456789",b="";for(let c=0;c<12;c++)b+=a[j().randomInt(0,a.length)];return b}(),kind:a.kind,createdAt:new Date().toISOString(),...a.rootId?{rootId:a.rootId}:{},...a.utilityScope?{utilityScope:a.utilityScope}:{},...a.utilityId?{utilityId:a.utilityId}:{},...a.kbRelPath?{kbRelPath:a.kbRelPath}:{},...a.expiresAt?{expiresAt:a.expiresAt}:{},...a.label?{label:a.label}:{}};if(a.password){let{salt:b,hash:d}=function(a){let b=j().randomBytes(16).toString("hex"),c=j().createHash("sha256").update(b+":"+a).digest("hex");return{salt:b,hash:c}}(a.password);c.passwordSalt=b,c.passwordHash=d}return b.shares=[c,...b.shares],await m(b),c}async function r(a){let b=await l(),c=b.shares.length;return b.shares=b.shares.filter(b=>b.id!==a),b.shares.length!==c&&(await m(b),!0)}},42382:(a,b,c)=>{c.d(b,{E:()=>i});var d=c(64173);c(17240);var e=c(20483),f=c(91520),g=c(91344);let h=(0,e.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function i({className:a,variant:b="default",asChild:c=!1,...e}){let i=c?f.bL:"span";return(0,d.jsx)(i,{"data-slot":"badge","data-variant":b,className:(0,g.cn)(h({variant:b}),a),...e})}},47071:(a,b,c)=>{c.d(b,{p:()=>f});var d=c(64173);c(17240);var e=c(91344);function f({className:a,type:b,...c}){return(0,d.jsx)("input",{type:b,"data-slot":"input",className:(0,e.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",a),...c})}},60524:(a,b,c)=>{c.d(b,{Separator:()=>d});let d=(0,c(54491).registerClientReference)(function(){throw Error("Attempted to call Separator() from the server but Separator 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/components/ui/separator.tsx","Separator")},80281:(a,b,c)=>{c.d(b,{J:()=>g});var d=c(64173);c(17240);var e=c(90044),f=c(91344);function g({className:a,...b}){return(0,d.jsx)(e.Root,{"data-slot":"label",className:(0,f.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a),...b})}},92814:(a,b,c)=>{c.d(b,{Ng:()=>t,bt:()=>w,Zl:()=>x,Nt:()=>u,Fm:()=>v});var d=c(73745);c(66493);var e=c(65326),f=c(36017),g=c(31421),h=c(73024),i=c(76760),j=c.n(i),k=c(48161),l=c.n(k);let m="__reflex_ngrok_tunnel__";function n(){return globalThis[m]}function o(a){globalThis[m]=a}async function p(a){let b;if(!a.authtoken)return{ok:!1,error:"ngrok authtoken is required"};let c=n();if(c&&null===c.child.exitCode)return{ok:!1,error:"Tunnel already running — stop it first."};let d=j().join(l().homedir(),".reflex");await h.promises.mkdir(d,{recursive:!0});let e=j().join(d,"ngrok.yml");await h.promises.writeFile(e,`version: 3
|
|
2
|
-
agent:
|
|
3
|
-
authtoken: ${a.authtoken}
|
|
4
|
-
`,{mode:384});let f=["http",String(a.port),"--config",e,"--log","stdout","--log-format","json"];a.domain&&f.push(`--domain=${a.domain}`);try{b=(0,g.spawn)("ngrok",f,{detached:!1,stdio:["ignore","pipe","pipe"]})}catch(a){return{ok:!1,error:"Failed to spawn ngrok — is the CLI installed and on PATH? "+(a instanceof Error?a.message:String(a))}}return b.on("error",a=>{console.error("[ngrok] spawn error:",a)}),b.on("exit",(a,c)=>{console.log(`[ngrok] tunnel exited code=${a} signal=${c??"-"}`);let d=n();d?.child===b&&o(void 0)}),b.stdout?.on("data",a=>{let b=a.toString().trim();b&&console.log("[ngrok]",b)}),b.stderr?.on("data",a=>{let b=a.toString().trim();b&&console.error("[ngrok!]",b)}),o({child:b,startedAt:new Date().toISOString(),port:a.port,...a.domain?{domain:a.domain}:{}}),{ok:!0}}async function q(){let a=Date.now()+6e3;for(;Date.now()<a;){try{let a=await fetch("http://127.0.0.1:4040/api/tunnels");if(a.ok){let b=await a.json(),c=b.tunnels.find(a=>"https"===a.proto),d=b.tunnels[0],e=c?.public_url??d?.public_url;if(e){let a=n();return a&&(a.publicUrl=e,o(a)),e}}}catch{}await new Promise(a=>setTimeout(a,400))}return null}async function r(){return new Promise(a=>{try{let b=(0,g.spawn)("ngrok",["version"],{stdio:["ignore","pipe","ignore"]}),c="";b.stdout?.on("data",a=>{c+=a.toString()}),b.on("close",()=>a(c.trim()||null)),b.on("error",()=>a(null))}catch{a(null)}})}async function s(a){if(!a)return{ok:!1,error:"ngrok API key not configured"};try{let b=await fetch("https://api.ngrok.com/reserved_domains",{headers:{Authorization:`Bearer ${a}`,"Ngrok-Version":"2"}});if(!b.ok)return{ok:!1,error:`ngrok API ${b.status}: ${(await b.text()).slice(0,200)}`};let c=await b.json();return{ok:!0,domains:(c.reserved_domains??[]).map(a=>({id:a.id,domain:a.domain,region:a.region}))}}catch(a){return{ok:!1,error:"ngrok API call failed: "+(a instanceof Error?a.message:String(a))}}}async function t(){let a=function(){let a=n();return a?null!==a.child.exitCode?(o(void 0),{running:!1}):{running:!0,...a.publicUrl?{publicUrl:a.publicUrl}:{},startedAt:a.startedAt,port:a.port,...a.domain?{domain:a.domain}:{}}:{running:!1}}();return{status:a,cliVersion:await r(),publicHost:process.env.REFLEX_NGROK_HOST??null}}async function u(){let a=await (0,f.M)();if(!a.ngrok.authtoken)return{ok:!1,error:"ngrok.authtoken пуст — заполни в настройках сверху."};let b=await p({port:a.ngrok.port,authtoken:a.ngrok.authtoken,...a.ngrok.domain?{domain:a.ngrok.domain}:{}});if(!b.ok)return b;let c=await q();if(c)try{let a=new URL(c);process.env.REFLEX_NGROK_HOST=a.host}catch{}return(0,e.revalidatePath)("/settings"),{ok:!0,publicUrl:c}}async function v(){let a=await new Promise(a=>{let b=n();if(!b)return void a(!1);let{child:c}=b,d=!1,e=b=>{d||(d=!0,o(void 0),a(b))};if(c.once("exit",()=>e(!0)),null!==c.exitCode)return void e(!0);try{c.kill("SIGTERM")}catch(a){console.error("[ngrok] SIGTERM failed:",a)}setTimeout(()=>{if(!d){try{c.kill("SIGKILL")}catch{}e(!0)}},2500)});return delete process.env.REFLEX_NGROK_HOST,(0,e.revalidatePath)("/settings"),{ok:a}}async function w(a){try{let b=await (0,f.M)(),c={...b,ngrok:{...b.ngrok,...a}};return await (0,f.D)(c),(0,e.revalidatePath)("/settings"),{ok:!0}}catch(a){return{ok:!1,error:a instanceof Error?a.message:String(a)}}}async function x(){return s((await (0,f.M)()).ngrok.apiKey)}(0,c(63781).D)([t,u,v,w,x]),(0,d.A)(t,"005adec00ada04c63ac5fd3676f300faaa566baba2",null),(0,d.A)(u,"0064965602a92a7e6738f2dd50c9c8649e58098591",null),(0,d.A)(v,"00d90c83ff3818ac4300bbac96d6eb8cc271e49800",null),(0,d.A)(w,"40f1ee513b299e663498197ffcdae6b859fb9f5187",null),(0,d.A)(x,"007586d80d3d9afecdd15a851ec6b13b2984a6600d",null)}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4108],{896:(e,c,t)=>{t.d(c,{T:()=>a});var r=t(7911);let a=(0,r.createServerReference)("60e3090027a3d5604202b6d8326408b1a1c7f2da7d",r.callServer,void 0,r.findSourceMapURL,"beginOAuthAction")},37232:(e,c,t)=>{t.d(c,{J:()=>a});var r=t(7911);let a=(0,r.createServerReference)("408c94e084cce2b605b8c18c8fe0bd5c81ddd06919",r.callServer,void 0,r.findSourceMapURL,"getOAuthClientAction")},45394:(e,c,t)=>{t.d(c,{o:()=>a});var r=t(7911);let a=(0,r.createServerReference)("00836cc3059073482c3919ef173b7f92521f4f56c9",r.callServer,void 0,r.findSourceMapURL,"listOAuthStatusesAction")},94108:(e,c,t)=>{t.d(c,{beginOAuthAction:()=>n.T,getOAuthClientAction:()=>a.J,listOAuthStatusesAction:()=>r.o,saveOAuthClientAction:()=>i.S});var r=t(45394),a=t(37232),i=t(98485),n=t(896)},98485:(e,c,t)=>{t.d(c,{S:()=>a});var r=t(7911);let a=(0,r.createServerReference)("40f6801f3ea78f166da7a2ed774ca49c0b18e2a13b",r.callServer,void 0,r.findSourceMapURL,"saveOAuthClientAction")}}]);
|