thursday-agent 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/task/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/task/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
- package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page/server-reference-manifest.json +40 -40
- 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/chunks/[root-of-the-server]__02va5wz._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0ls6_8y._.js +4 -4
- package/.next/server/chunks/[root-of-the-server]__0ncs9uu._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1-ga0kh._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1anc1p9._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1ccon1w._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__1orn-5b._.js +4 -3
- package/.next/server/chunks/[root-of-the-server]__1wa1k7r._.js +3 -3
- package/.next/server/chunks/_0-fjql4._.js +5 -5
- package/.next/server/chunks/_00xh_q0._.js +3 -5
- package/.next/server/chunks/_05h2cii._.js +1 -1
- package/.next/server/chunks/_0fzqt2y._.js +48 -44
- package/.next/server/chunks/_0mecv0f._.js +5 -5
- package/.next/server/chunks/_0mh8j4m._.js +1 -1
- package/.next/server/chunks/_0wp4le3._.js +1 -1
- package/.next/server/chunks/_0y5fg-x._.js +1 -1
- package/.next/server/chunks/_1230wbx._.js +3 -3
- package/.next/server/chunks/_15hq89o._.js +1 -1
- package/.next/server/chunks/{_03kp0jp._.js → _1c78vw5._.js} +58 -56
- package/.next/server/chunks/_1j8k_j5._.js +1 -1
- package/.next/server/chunks/_1krd9rf._.js +1 -1
- package/.next/server/chunks/_1php4eq._.js +1 -1
- package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
- package/.next/server/chunks/features_1qf3cei._.js +1 -1
- package/.next/server/chunks/features_memory_1uqvksn._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__092knlj._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__1eh7hid._.js → [root-of-the-server]__0s9dq5u._.js} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__1cyjywu._.js → [root-of-the-server]__0s9l2sv._.js} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0zkv7z_._.js → [root-of-the-server]__0xsog8n._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__10-dz5o._.js +13 -9
- package/.next/server/chunks/ssr/[root-of-the-server]__1gtlw6v._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__1mzi-ju._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1ox7hbk._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0_69wqr._.js → [root-of-the-server]__202p40z._.js} +1 -1
- package/.next/server/chunks/ssr/_001_ms1._.js +1 -1
- package/.next/server/chunks/ssr/{_0c-ql2m._.js → _0fz4mf_._.js} +2 -2
- package/.next/server/chunks/ssr/{_07uchnc._.js → _0gb4gmf._.js} +2 -2
- package/.next/server/chunks/ssr/_0i_6q1w._.js +2 -2
- package/.next/server/chunks/ssr/{_20kd_n0._.js → _0ilna52._.js} +3 -3
- package/.next/server/chunks/ssr/{_0mo2w06._.js → _0n3toaw._.js} +2 -2
- package/.next/server/chunks/ssr/{_0mb8zc8._.js → _0s99bgb._.js} +2 -2
- package/.next/server/chunks/ssr/_0zcjrbg._.js +3 -0
- package/.next/server/chunks/ssr/{_13z3f85._.js → _1-_etts._.js} +2 -2
- package/.next/server/chunks/ssr/_13fke0x._.js +1 -1
- package/.next/server/chunks/ssr/{_01_6m32._.js → _1b2mjwr._.js} +2 -2
- package/.next/server/chunks/ssr/{_1eoqg_g._.js → _1f-dg-6._.js} +2 -2
- package/.next/server/chunks/ssr/{_0y0tiht._.js → _1fojd41._.js} +3 -3
- package/.next/server/chunks/ssr/_1gd8q8l._.js +3 -0
- package/.next/server/chunks/ssr/{_1xvgn77._.js → _1h0rw11._.js} +2 -2
- package/.next/server/chunks/ssr/_1jhd09t._.js +3 -0
- package/.next/server/chunks/ssr/{_0u2jv_x._.js → _1lz_cq2._.js} +46 -44
- package/.next/server/chunks/ssr/{_0kbkmar._.js → _1nnsk7z._.js} +2 -2
- package/.next/server/chunks/ssr/_1sji22n._.js +1 -1
- package/.next/server/chunks/ssr/_1vyd1ji._.js +1 -1
- package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_0z5tsu8._.js → node_modules_00etblx._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1h4a4pp._.js → node_modules_04jf_m8._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0h5hnr1._.js → node_modules_08dhkiq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1vqb6po._.js → node_modules_0940ns5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1i7u1ia._.js → node_modules_09q35v_._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_124bue5._.js → node_modules_0_-_a--._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0h7u60n._.js → node_modules_0arus10._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0rjg6t1._.js → node_modules_0b__sgl._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_113tz0l._.js → node_modules_0cxaxk9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0lm7_vm._.js → node_modules_0g7fzk3._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0h50b8n._.js → node_modules_0had7xd._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1-hc6uv._.js → node_modules_0pvd7q-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1bc7gu8._.js → node_modules_0yugy6m._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0y_cded._.js → node_modules_14om4ar._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0zp9r92._.js → node_modules_14q6g4n._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0eu1va6._.js → node_modules_198nmll._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1t9cyee._.js → node_modules_1_pc9kq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_063xwpp._.js → node_modules_1aaxuef._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0bvraul._.js → node_modules_1cx_ql6._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1xx28h1._.js → node_modules_1cz2hle._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1l0qtdu._.js → node_modules_1efrqxi._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1juq3hs._.js → node_modules_1eg7m6c._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1_n3ztw._.js → node_modules_1gdh31p._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0mwym0g._.js → node_modules_1hpopmo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1bgb6-f._.js → node_modules_1qpjvy5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1uuj9x1._.js → node_modules_1vh5ntv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0d3skpl._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1b748ic._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0i44kk5._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1z4hm5e._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@vercel_oidc_dist_0qe30a_._.js → node_modules_@vercel_oidc_dist_06mk8id._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +41 -41
- package/.next/static/chunks/00rd4-v8r7axp.js +1 -0
- package/.next/static/chunks/{0tmgrnlje14-s.js → 08qe4as2q428z.js} +2 -2
- package/.next/static/chunks/{3ok9_x74rip3v.js → 0fl3gwe4-l6tz.js} +1 -1
- package/.next/static/chunks/{2a0k6jlq0_v1u.js → 0gnqdjn2lvdad.js} +2 -2
- package/.next/static/chunks/{1okqiww3pnwka.js → 0hwap1-p0m5sa.js} +1 -1
- package/.next/static/chunks/{1ekc7ul556kbl.js → 0w52rrrmuj9r9.js} +1 -1
- package/.next/static/chunks/{3agpgkwaa321p.js → 0wcprt5ot5she.js} +1 -1
- package/.next/static/chunks/{3xpbkl66ssib5.js → 15m575979un5f.js} +6 -6
- package/.next/static/chunks/{2fzs9fm8yarvq.js → 17p6tk6k88dq6.js} +1 -1
- package/.next/static/chunks/{26-pr2c9ro222.js → 1jd09sxcjddu1.js} +1 -1
- package/.next/static/chunks/{280t0_e99i276.js → 1w73ece_6bheu.js} +1 -1
- package/.next/static/chunks/{1grhjo7a5a0_-.js → 214ya3n5gxeih.js} +1 -1
- package/.next/static/chunks/22_zkas21rpna.js +1 -0
- package/.next/static/chunks/{0x79tx04dxbpp.js → 2u7xt6mxg44lf.js} +1 -1
- package/.next/static/chunks/{17donp69y4do7.js → 39j0fvpybzabl.js} +8 -8
- package/.next/static/chunks/{28cizcdaabd4h.js → 3akmqm77muj4-.js} +1 -1
- package/.next/static/chunks/3cq5g494yuke8.css +1 -0
- package/.next/static/chunks/3woj-xd7ki5_i.js +1 -0
- package/.next/static/chunks/{3cfi_q6d_wtci.js → 3zmcsnuo25zvq.js} +1 -1
- package/README.md +46 -23
- package/app/api/events/app-event.ts +0 -2
- package/bin/port.mjs +65 -0
- package/bin/thursday.mjs +2 -33
- package/docs/how-it-works.md +11 -7
- package/docs/images/face-dark.png +0 -0
- package/docs/images/face-light.png +0 -0
- package/docs/images/keeps-going.png +0 -0
- package/features/ai/chatgpt.ts +42 -20
- package/features/ai/load-tools.ts +20 -14
- package/features/ai/prompts/bot.prompt.ts +90 -88
- package/features/ai/prompts/thursday.prompt.ts +48 -41
- package/features/ai/tools/memory.tool.ts +65 -62
- package/features/ai/tools/tool-name.ts +0 -1
- package/features/ai/tools/workspace.tool.ts +3 -0
- package/features/bot/bot.action.ts +6 -1
- package/features/bot/bot.run.ts +11 -7
- package/features/bot/bot.runner.ts +34 -16
- package/features/bot/bot.schema.ts +25 -0
- package/features/bot/components/bot-room.tsx +57 -4
- package/features/bot/components/bot-tool.tsx +0 -1
- package/features/bot/task.query.ts +25 -6
- package/features/bot/task.store.ts +23 -4
- package/features/memory/components/memory-edit.tsx +7 -5
- package/features/thursday/components/thursday.tsx +0 -3
- package/features/thursday/tool-line.ts +0 -1
- package/features/thursday/use-thursday.ts +1 -1
- package/package.json +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1pduf5n._.js +0 -3
- package/.next/server/chunks/ssr/_14_lw10._.js +0 -3
- package/.next/server/chunks/ssr/_1spzm8z._.js +0 -3
- package/.next/server/chunks/ssr/lib_date-like_ts_02is0pw._.js +0 -3
- package/.next/static/chunks/0xzgvc0fkdb6t.js +0 -1
- package/.next/static/chunks/14hgtsjg-kael.css +0 -1
- package/.next/static/chunks/2hw2f6zmt7fmt.js +0 -1
- package/.next/static/chunks/3111pj5wnjgos.js +0 -1
- package/features/memory/components/memory-view.tsx +0 -84
- /package/.next/static/{x1cCqY0kWpR_VcYx_lWO5 → kaTO0UHqF1bMnWgCDik2f}/_buildManifest.js +0 -0
- /package/.next/static/{x1cCqY0kWpR_VcYx_lWO5 → kaTO0UHqF1bMnWgCDik2f}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{x1cCqY0kWpR_VcYx_lWO5 → kaTO0UHqF1bMnWgCDik2f}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[411509,702080,a=>{"use strict";var b=a.i(57441);a.s(["default",0,b],702080);var b=b,c=a.i(287702),d=a.i(61876),e=a.i(199169),f=a.i(616682),g=a.i(324835);let h=b.object({color:b.string().regex(/^(#[0-9a-fA-F]{6}|currentColor)$/,"Hex color").optional(),shape:b.enum(g.MARK_SHAPES).optional(),outline:b.boolean().optional()}),i=b.string().max(f.COMMON_VALIDATE.prompt.max),j=b.object({id:b.number(),name:b.string(),serverName:b.string()}),k=b.string().trim().transform(a=>a.replace(/\s+/g," ")).pipe(b.string().min(1,"A name is required").max(f.COMMON_VALIDATE.name.max)),l=b.object({input:b.number(),output:b.number()});b.object({name:b.string(),description:b.string(),systemPrompt:b.string().nullish(),icon:h.nullish(),provider:d.textModelProviderSchema.nullish(),model:b.string().nullish(),compactAt:b.number().nullish(),disabled:b.boolean(),createdAt:e.DateLikeSchema,tools:j.array().default([]),tokens:l,lastJobAt:e.DateLikeSchema.nullish()}),b.object({name:k,description:b.string().trim().min(1,"Say what this bot is for").max(f.COMMON_VALIDATE.description.max),systemPrompt:i.optional(),icon:h.optional(),provider:d.textModelProviderSchema.nullish(),model:b.string().trim().max(80).nullish(),compactAt:b.coerce.number().int().min(8e3,"At least 8k").nullish(),disabled:b.boolean().optional(),toolIds:b.number().int().array().max(10).default([])}),b.object({file:b.string(),path:b.string(),line:b.string(),at:e.DateLikeSchema,bytes:b.number()});let m=c.PAGE_SIZE,n="Continue",o=b.discriminatedUnion("type",[b.object({type:b.literal("text"),text:b.string()}),b.object({type:b.literal("image"),src:b.string()})]),p=b.object({id:b.string(),seq:b.number(),bot:b.string().nullable(),parent:b.string().nullable(),at:e.DateLikeSchema}),q=b.discriminatedUnion("kind",[p.extend({kind:b.literal("user"),text:b.string()}),p.extend({kind:b.literal("text"),text:b.string()}),p.extend({kind:b.literal("note"),text:b.string()}),p.extend({kind:b.literal("tool"),callId:b.string(),name:b.string(),input:b.string(),note:b.string().nullish(),path:b.string().nullish()}),p.extend({kind:b.literal("tool-result"),callId:b.string(),name:b.string(),results:o.array(),more:b.boolean()}),p.extend({kind:b.literal("ask"),callId:b.string(),to:b.string(),text:b.string()}),p.extend({kind:b.literal("ask-result"),callId:b.string(),text:b.string()}),p.extend({kind:b.literal("waiting"),callId:b.string(),question:b.string(),options:b.string().array()})]),r=b.object({question:b.string(),options:b.string().array(),auto:b.boolean()});b.object({id:b.string(),bot:b.string(),label:b.string(),request:b.string(),status:b.enum(["running","waiting","done","failed"]),outcome:b.string().nullable(),ask:r.nullable(),seen:b.boolean(),tokens:l,contextTokens:b.number(),contextBudget:b.number(),createdAt:e.DateLikeSchema,updatedAt:e.DateLikeSchema,lines:q.array()}),a.s(["DEFAULT_BOT",0,{name:"Jarvis",description:"Anything — this computer, a browser, the web, files, services",systemPrompt:null,icon:{color:"#14B8A6",shape:"squircle"},provider:null,model:null,disabled:!1,compactAt:null},"MAX_PINNED_TOOLS",0,10,"TASK_CONTINUE",0,n,"TASK_HISTORY_PAGE",0,m,"botIconSchema",0,h,"isAppStop",0,a=>{let b=a?.options??[];return 1===b.length&&b[0]===n},"randomBotIcon",0,function(){return{color:(0,g.randomMarkColors)(1)[0],shape:g.MARK_SHAPES[Math.floor(Math.random()*g.MARK_SHAPES.length)]}}],411509)},398026,a=>{"use strict";var b=a.i(287702),c=a.i(421042),d=a.i(324835);let e=[{name:"Jarvis",description:"Any job — turns it into a plan, hands each part to whoever it belongs to, does the rest, answers with one result",hint:"Plans a job and hands out the parts",icon:{shape:"squircle"},recommended:!0,systemPrompt:"You are Jarvis. A job reaches you as a sentence and leaves as a plan: what it actually needs, in what order, and who does each part. Settle what is still open in one round rather than guessing at it, then send for what the job is made of before you build — a part another bot exists for is theirs, and everything nobody else is for is yours. You hold the whole while they hold pieces: the order the parts run in, the seams where what comes back has to fit together, and the single thing that is handed over at the end. The plan is how the job gets done, not what gets handed back."},{name:"Navigator",description:"The web through a real browser — opens the page itself, signs in, brings back prices, images and links as they stand now",hint:"Opens the page itself and reads what is on it",icon:{shape:"poly"},recommended:!0,systemPrompt:`You are Navigator. Every browser job is yours: load the \`${b.BROWSER_SKILL}\` skill first and work through it. A search result says a page exists; you say what is on it right now — so open it, sign in where it asks you to, and keep going past the first screen until you have the thing itself: exact figures, the links that open them, the images off the page. Nothing you did not see goes in what you hand back, and a page that refused you is a fact with a url on it, not a gap to fill in from memory. Whoever asked should never need to open the site after you.`},{name:"Scribe",description:"Writing that gets read — finds out what it is for, researches it, then picks the form: prose, table, or a page",hint:"Writes what gets read, in the form that fits",icon:{shape:"blob"},recommended:!0,systemPrompt:"You are Scribe. Who reads it and what they do next decides everything else, so learn that first, then research before you claim: every number and name you write traces back to something you actually read. Pick the form by the reading — a `.md` for something read once, a `.csv` for what gets sorted, a page (the `interactive-page` skill) for something used or something whose pictures are the point. When the request does not settle which it is — something read once or something used — ask before you write rather than committing a whole draft to a guess. Cut what the reader would skip, and never spend a paragraph where a table or a picture answers in one glance. One page they finish beats five they abandon."},{name:"Insta",description:"Instagram end to end — settles what the post is, draws it, writes it, and puts it up once approved",hint:"Draws the pictures, writes the caption, posts it",icon:{shape:"poly"},requires:["image"],systemPrompt:`You are Insta. One job takes a post from nothing to live on instagram.com — settle what it is, sign in, draw it, write it, put it up. Load the \`${b.BROWSER_SKILL}\` skill before any browser step.
|
|
1
|
+
module.exports=[421042,a=>{"use strict";a.s(["STUDIO_TOOLS",0,{generate_image:"generate_image",generate_speech:"generate_speech",transcribe:"transcribe",generate_video:"generate_video"},"TOOL_NAMES",0,{memory_recall:"memory_recall",memory_remember:"memory_remember",memory_forget:"memory_forget",memory_conversation:"memory_conversation",bash:"bash",write_file:"write_file",tool_search:"tool_search",tool_call:"tool_call",load_skill:"load_skill",web_search:"web_search",delegate:"delegate",task:"task",ask_bot:"ask_bot",ask_thursday:"ask_thursday",ask_back:"ask_back",answer:"answer",end_call:"end_call"}])},411509,702080,a=>{"use strict";var b=a.i(57441);a.s(["default",0,b],702080);var b=b,c=a.i(287702),d=a.i(61876),e=a.i(199169),f=a.i(616682),g=a.i(324835);let h=b.object({color:b.string().regex(/^(#[0-9a-fA-F]{6}|currentColor)$/,"Hex color").optional(),shape:b.enum(g.MARK_SHAPES).optional(),outline:b.boolean().optional()}),i=b.string().max(f.COMMON_VALIDATE.prompt.max),j=b.object({id:b.number(),name:b.string(),serverName:b.string()}),k=b.string().trim().transform(a=>a.replace(/\s+/g," ")).pipe(b.string().min(1,"A name is required").max(f.COMMON_VALIDATE.name.max)),l=b.object({input:b.number(),output:b.number()});b.object({name:b.string(),description:b.string(),systemPrompt:b.string().nullish(),icon:h.nullish(),provider:d.textModelProviderSchema.nullish(),model:b.string().nullish(),compactAt:b.number().nullish(),disabled:b.boolean(),createdAt:e.DateLikeSchema,tools:j.array().default([]),tokens:l,lastJobAt:e.DateLikeSchema.nullish()}),b.object({name:k,description:b.string().trim().min(1,"Say what this bot is for").max(f.COMMON_VALIDATE.description.max),systemPrompt:i.optional(),icon:h.optional(),provider:d.textModelProviderSchema.nullish(),model:b.string().trim().max(80).nullish(),compactAt:b.coerce.number().int().min(8e3,"At least 8k").nullish(),disabled:b.boolean().optional(),toolIds:b.number().int().array().max(10).default([])}),b.object({file:b.string(),path:b.string(),line:b.string(),at:e.DateLikeSchema,bytes:b.number()});let m=c.PAGE_SIZE,n="Continue",o=b.discriminatedUnion("type",[b.object({type:b.literal("text"),text:b.string()}),b.object({type:b.literal("image"),src:b.string()})]),p=b.object({id:b.string(),seq:b.number(),bot:b.string().nullable(),parent:b.string().nullable(),at:e.DateLikeSchema}),q=b.discriminatedUnion("kind",[p.extend({kind:b.literal("user"),text:b.string()}),p.extend({kind:b.literal("text"),text:b.string()}),p.extend({kind:b.literal("note"),text:b.string()}),p.extend({kind:b.literal("stop"),text:b.string()}),p.extend({kind:b.literal("tool"),callId:b.string(),name:b.string(),input:b.string(),note:b.string().nullish(),path:b.string().nullish()}),p.extend({kind:b.literal("tool-result"),callId:b.string(),name:b.string(),results:o.array(),more:b.boolean()}),p.extend({kind:b.literal("ask"),callId:b.string(),to:b.string(),text:b.string()}),p.extend({kind:b.literal("ask-result"),callId:b.string(),text:b.string()}),p.extend({kind:b.literal("waiting"),callId:b.string(),question:b.string(),options:b.string().array()})]),r=b.object({question:b.string(),options:b.string().array(),auto:b.boolean()});b.object({id:b.string(),bot:b.string(),label:b.string(),request:b.string(),status:b.enum(["running","waiting","done","failed"]),outcome:b.string().nullable(),ask:r.nullable(),seen:b.boolean(),tokens:l,contextTokens:b.number(),contextBudget:b.number(),createdAt:e.DateLikeSchema,updatedAt:e.DateLikeSchema,lines:q.array()}),a.s(["DEFAULT_BOT",0,{name:"Jarvis",description:"Anything — this computer, a browser, the web, files, services",systemPrompt:null,icon:{color:"#14B8A6",shape:"squircle"},provider:null,model:null,disabled:!1,compactAt:null},"MAX_PINNED_TOOLS",0,10,"TASK_CONTINUE",0,n,"TASK_HISTORY_PAGE",0,m,"botIconSchema",0,h,"isAppStop",0,a=>{let b=a?.options??[];return 1===b.length&&b[0]===n},"randomBotIcon",0,function(){return{color:(0,g.randomMarkColors)(1)[0],shape:g.MARK_SHAPES[Math.floor(Math.random()*g.MARK_SHAPES.length)]}}],411509)},398026,a=>{"use strict";var b=a.i(287702),c=a.i(421042),d=a.i(324835);let e=[{name:"Jarvis",description:"Any job — turns it into a plan, hands each part to whoever it belongs to, does the rest, answers with one result",hint:"Plans a job and hands out the parts",icon:{shape:"squircle"},recommended:!0,systemPrompt:"You are Jarvis. A job reaches you as a sentence and leaves as a plan: what it actually needs, in what order, and who does each part. Settle what is still open in one round rather than guessing at it, then send for what the job is made of before you build — a part another bot exists for is theirs, and everything nobody else is for is yours. You hold the whole while they hold pieces: the order the parts run in, the seams where what comes back has to fit together, and the single thing that is handed over at the end. The plan is how the job gets done, not what gets handed back."},{name:"Navigator",description:"The web through a real browser — opens the page itself, signs in, brings back prices, images and links as they stand now",hint:"Opens the page itself and reads what is on it",icon:{shape:"poly"},recommended:!0,systemPrompt:`You are Navigator. Every browser job is yours: load the \`${b.BROWSER_SKILL}\` skill first and work through it. A search result says a page exists; you say what is on it right now — so open it, sign in where it asks you to, and keep going past the first screen until you have the thing itself: exact figures, the links that open them, the images off the page. Nothing you did not see goes in what you hand back, and a page that refused you is a fact with a url on it, not a gap to fill in from memory. Whoever asked should never need to open the site after you.`},{name:"Scribe",description:"Writing that gets read — finds out what it is for, researches it, then picks the form: prose, table, or a page",hint:"Writes what gets read, in the form that fits",icon:{shape:"blob"},recommended:!0,systemPrompt:"You are Scribe. Who reads it and what they do next decides everything else, so learn that first, then research before you claim: every number and name you write traces back to something you actually read. Pick the form by the reading — a `.md` for something read once, a `.csv` for what gets sorted, a page (the `interactive-page` skill) for something used or something whose pictures are the point. When the request does not settle which it is — something read once or something used — ask before you write rather than committing a whole draft to a guess. Cut what the reader would skip, and never spend a paragraph where a table or a picture answers in one glance. One page they finish beats five they abandon."},{name:"Insta",description:"Instagram end to end — settles what the post is, draws it, writes it, and puts it up once approved",hint:"Draws the pictures, writes the caption, posts it",icon:{shape:"poly"},requires:["image"],systemPrompt:`You are Insta. One job takes a post from nothing to live on instagram.com — settle what it is, sign in, draw it, write it, put it up. Load the \`${b.BROWSER_SKILL}\` skill before any browser step.
|
|
2
2
|
|
|
3
3
|
Settle it in one question. Ask only for what the request leaves open, in a single \`${c.TOOL_NAMES.ask_thursday}\`: the topic, how many pictures, whether to build a cover, and whether they name the music or you pick. A request that already says its topic is not asked for it again. Told to decide yourself: \`${c.TOOL_NAMES.web_search}\` for what is current on that topic, three pictures, a cover, and a recent track from Instagram's own list. Never ask twice for one round.
|
|
4
4
|
|
|
@@ -37,6 +37,6 @@ Photos in one step too: every \`curl -o\` in a single \`bash\` call, into the tr
|
|
|
37
37
|
|
|
38
38
|
The page is the deliverable: the days in order, the map under each, the photos with whose page they came from, and the facts that decide what to pack. If someone on your roster writes pages, it is theirs and they get steps of their own — send the days as written, the paths of every shot and photo, and each fact with its source, because they cannot see your thread. If nobody does, write it yourself with the \`interactive-page\` skill.
|
|
39
39
|
|
|
40
|
-
Answer with the folder under \`artifacts/\` and what is in it: the page, a map per day, the pictures.`}],f=e.filter(a=>a.recommended);a.s(["BOT_SEEDS",0,e,"RECOMMENDED_SEEDS",0,f,"rollSeedColors",0,()=>(0,d.randomMarkColors)(e.length)])},
|
|
40
|
+
Answer with the folder under \`artifacts/\` and what is in it: the page, a map per day, the pictures.`}],f=e.filter(a=>a.recommended);a.s(["BOT_SEEDS",0,e,"RECOMMENDED_SEEDS",0,f,"rollSeedColors",0,()=>(0,d.randomMarkColors)(e.length)])},754257,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fbba25fbc238da78607616372d2248ff6f07a1267",b.callServer,void 0,b.findSourceMapURL,"createSeedBotsAction");a.s(["createSeedBotsAction",0,c])},478978,a=>{"use strict";var b=a.i(61876);let c=[...new Set(Object.values(b.SPEACH_MODEL_PROVIDERS).map(a=>a.apiKeyName))],d={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},e={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},f="EXA_API_KEY",g={key:"DEFAULT_MODEL",label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:b.TEXT_MODEL_PROVIDER_LIST.flatMap(a=>a.suggestModels.map(b=>({value:`${a.id}/${b.id}`,label:`${a.label} \xb7 ${b.label}`,needs:a.apiKeyName})))},h=a=>c.includes(a.apiKeyName),i=a=>({key:a.apiKeyName,label:a.label,provider:a.id,signIn:a.signIn}),j=[{id:"voice",title:"voice",hint:"calls run on one of these",section:"keys",require:"any",note:"one is required",entries:b.TEXT_MODEL_PROVIDER_LIST.filter(h).map(i)},{id:"text",title:"models",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:b.TEXT_MODEL_PROVIDER_LIST.filter(a=>!h(a)).map(i)},{id:"search",title:"search",hint:"how bots look things up — one key, or their own model's",section:"keys",require:"none",entries:[{key:f,label:"Exa",hint:"web search in one call — dashboard.exa.ai"}]},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own",section:"models",require:"none",entries:[g]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(d).map(a=>({key:d[a],...e[a],kind:a,choices:b.MEDIA_MODEL_PROVIDER_LIST.flatMap(b=>b.models[a].map(a=>({value:`${b.id}/${a.id}`,label:`${b.label} \xb7 ${a.label}`,needs:b.apiKeyName})))}))}];Object.fromEntries(j.flatMap(a=>a.entries).map(a=>[a.key,a])),j.flatMap(a=>a.entries.map(a=>a.key)),Object.fromEntries(j.flatMap(a=>a.entries).filter(a=>a.choices?.length).map(a=>[a.key,a.choices])),a.s(["CONFIG_GROUPS",0,j,"EXA_API_KEY",0,f,"MEDIA_MODEL_KEYS",0,d,"groupSatisfied",0,function(a,b){return"none"===a.require||(a.requireKeys??a.entries.map(a=>a.key)).some(b)},"isConfigSet",0,function(a,b){return a?.some(a=>a.key===b&&a.set)??!1},"mediaModelWords",0,a=>`${"image"===a?"an":"a"} ${a} model`])},28996,a=>{"use strict";let b=(0,a.i(920226).create)()(a=>({open:!1,section:"thursday",show:b=>a(a=>({open:!0,section:b??a.section})),hide:()=>a({open:!1}),pick:b=>a({section:b})}));a.s(["openSettings",0,a=>b.getState().show(a),"useSettingsStore",0,b])},616682,a=>{"use strict";a.s(["COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}}])},425256,a=>{"use strict";var b=a.i(164831);let c={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};c.node;let d=(0,b.default)(c);a.s(["History",0,d],425256)},924613,a=>{"use strict";var b=a.i(164831);let c={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};c.node;let d=(0,b.default)(c);a.s(["Wrench",0,d],924613)},920226,a=>{"use strict";var b=a.i(572131);let c=a=>{let b,c=new Set,d=(a,d)=>{let e="function"==typeof a?a(b):a;if(!Object.is(e,b)){let a=b;b=(null!=d?d:"object"!=typeof e||null===e)?e:Object.assign({},b,e),c.forEach(c=>c(b,a))}},e=()=>b,f={setState:d,getState:e,getInitialState:()=>g,subscribe:a=>(c.add(a),()=>c.delete(a))},g=b=a(d,e,f);return f},d=a=>{let d=a?c(a):c,e=a=>(function(a,c=a=>a){let d=b.default.useSyncExternalStore(a.subscribe,b.default.useCallback(()=>c(a.getState()),[a,c]),b.default.useCallback(()=>c(a.getInitialState()),[a,c]));return b.default.useDebugValue(d),d})(d,a);return Object.assign(e,d),e};a.s(["create",0,a=>a?d(a):d],920226)}];
|
|
41
41
|
|
|
42
|
-
//# sourceMappingURL=
|
|
42
|
+
//# sourceMappingURL=_0ilna52._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[588237,a=>{"use strict";var b=a.i(187924),c=a.i(497895);a.s(["Table",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,b.jsx)("table",{"data-slot":"table",className:(0,c.cn)("w-full caption-bottom text-sm",a),...d})})},"TableBody",0,function({className:a,...d}){return(0,b.jsx)("tbody",{"data-slot":"table-body",className:(0,c.cn)("[&_tr:last-child]:border-0",a),...d})},"TableCell",0,function({className:a,...d}){return(0,b.jsx)("td",{"data-slot":"table-cell",className:(0,c.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0",a),...d})},"TableHead",0,function({className:a,...d}){return(0,b.jsx)("th",{"data-slot":"table-head",className:(0,c.cn)("h-9 px-2 text-left align-middle font-mono text-[11px] font-normal tracking-[0.1em] whitespace-nowrap text-muted-foreground uppercase [&:has([role=checkbox])]:pr-0",a),...d})},"TableHeader",0,function({className:a,...d}){return(0,b.jsx)("thead",{"data-slot":"table-header",className:(0,c.cn)("[&_tr]:border-b",a),...d})},"TableRow",0,function({className:a,...d}){return(0,b.jsx)("tr",{"data-slot":"table-row",className:(0,c.cn)("border-b border-border/60 transition-colors data-[state=selected]:bg-muted hover:bg-muted/40",a),...d})}])},369768,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(572131),f=a.i(767561),g=a.i(340695),h=a.i(965733),i=a.i(846991),j=a.i(950463),k=a.i(588237),l=a.i(287702),m=a.i(559553),n=a.i(935220),o=a.i(313237),p=a.i(497895),q=b([i]);[i]=q.then?(await q)():q;let A=new Set(["frame","image","audio","video"]);function r(a){let b=(0,m.workspaceRelative)(a);if(!b)return{how:"os"};let c=(0,m.viewKindOf)(b);return A.has(c)?{how:"tab",path:b,href:f.queryKey.fileView(b)}:"none"===c?{how:"os"}:{how:"dialog",path:b}}let B=(0,e.createContext)(null),C={dialog:{prose:"px-5 py-4",block:"px-4 py-3"},page:{prose:"px-5 py-6 sm:px-8",block:"px-5 py-5"},inline:{prose:"pb-3",block:"pb-3"}};function s({kind:a,content:b,truncated:c,where:e="dialog"}){return(0,d.jsxs)(d.Fragment,{children:[null!=c&&(0,d.jsx)(t,{of:c}),(0,d.jsx)(u,{kind:a,content:b,where:e})]})}function t({of:a}){return(0,d.jsxs)("p",{className:"border-b border-border/60 px-5 py-2.5 font-mono text-[11px] text-muted-foreground",children:[`Showing the first ${(0,p.formatBytes)(l.WORKSPACE_VIEW.textMax)} of ${(0,p.formatBytes)(a)}. `,"Open the file itself for the rest."]})}function u({kind:a,content:b,where:c}){let e=C[c];switch(a){case"markdown":return(0,d.jsx)("div",{className:(0,p.cn)("min-w-0 text-sm leading-relaxed",e.prose),children:(0,d.jsx)(i.Markdown,{children:b})});case"csv":return(0,d.jsx)(z,{content:b,className:e.block});case"json":return(0,d.jsx)(y,{text:function(a){try{return JSON.stringify(JSON.parse(a),null,2)}catch{return a}}(b),className:e.block});default:return(0,d.jsx)(y,{text:b,className:e.block})}}function v(a){let[b,c]=(0,e.useState)(null),[d,g]=(0,e.useState)(null),[h,i]=(0,e.useState)(null);return(0,e.useEffect)(()=>{if(!a)return;c(null),g(null),i(null);let b=!1;return fetch(f.queryKey.file(a),{headers:{range:`bytes=0-${l.WORKSPACE_VIEW.textMax-1}`}}).then(async a=>{if(!a.ok)throw Error(await a.text());return{text:await a.text(),of:function(a){let b=a.headers.get("content-range")?.match(/^bytes \d+-(\d+)\/(\d+)$/);if(!b)return null;let[,c,d]=b.map(Number);return c+1<d?d:null}(a)}}).then(({text:a,of:d})=>{if(b)return;let e=null===d?a:a.slice(0,a.lastIndexOf("\n")+1||void 0);c(e),i(d)}).catch(a=>!b&&g((0,p.errorToString)(a))),()=>{b=!0}},[a]),{content:b,failure:d,truncated:h}}function w({path:a,bytes:b}){let[c,e]=(0,o.useServerAction)(n.openFileAction);return(0,d.jsxs)("div",{className:"space-y-4 p-8",children:[(0,d.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:[`This file is ${(0,p.formatBytes)(b)} — too big to draw here without `,"taking the window with it. Open it where it is instead."]}),(0,d.jsx)(g.Button,{variant:"outline",loading:e,onClick:()=>c(a),children:"Reveal in the file manager"})]})}function x({path:a,kind:b,onClose:c}){let{content:e,failure:f,truncated:g}=v(a),i=a?.split("/").pop()??"";return(0,d.jsx)(h.Dialog,{open:null!==a,onOpenChange:a=>!a&&c(),children:(0,d.jsxs)(h.DialogContent,{className:"flex max-h-[calc(100vh-3rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl",children:[(0,d.jsx)(h.DialogTitle,{className:"sr-only",children:i}),(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-2 border-b border-border/60 px-4 py-2.5 pr-12",children:(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px]",children:a})}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:f?(0,d.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:f}):null===e?(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(j.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-5/6"})]}):(0,d.jsx)(s,{kind:b,content:e,truncated:g})})]})})}function y({text:a,className:b}){return(0,d.jsx)("pre",{className:(0,p.cn)("overflow-x-auto font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-foreground/90",b),children:a})}function z({content:a,className:b}){let[c,...f]=(0,e.useMemo)(()=>(function(a){let b=[],c=[],d="",e=!1;for(let f=0;f<a.length;f++){let g=a[f];e?'"'===g&&'"'===a[f+1]?(d+='"',f++):'"'===g?e=!1:d+=g:'"'===g?e=!0:","===g?(c.push(d),d=""):"\n"===g||"\r"===g?("\r"===g&&"\n"===a[f+1]&&f++,c.push(d),b.push(c),c=[],d=""):d+=g}return(d.length||c.length)&&(c.push(d),b.push(c)),b.filter(a=>a.some(a=>a.trim()))})(a),[a]);return c?(0,d.jsx)("div",{className:(0,p.cn)("overflow-x-auto",b),children:(0,d.jsxs)(k.Table,{children:[(0,d.jsx)(k.TableHeader,{children:(0,d.jsx)(k.TableRow,{children:c.map((a,b)=>(0,d.jsx)(k.TableHead,{className:"whitespace-nowrap",children:a},`${b}-${a}`))})}),(0,d.jsx)(k.TableBody,{children:f.map((a,b)=>(0,d.jsx)(k.TableRow,{children:c.map((c,e)=>(0,d.jsx)(k.TableCell,{className:"whitespace-nowrap",children:a[e]??""},`${b}-${e}`))},`${b}-${a[0]??""}`))})]})}):(0,d.jsx)(y,{text:a,className:b})}a.s(["FileBody",0,s,"FileDialog",0,x,"FileLink",0,function({path:a,className:b,title:c,label:g,children:h}){let i=r(a),j=(0,e.useContext)(B),[k,l]=(0,o.useServerAction)(n.openFileAction);return"tab"===i.how?(0,d.jsx)("a",{href:i.href,target:"_blank",rel:"noreferrer",title:c??a,"aria-label":g,className:b,children:h}):(0,d.jsx)("button",{type:"button",disabled:l,title:c??a,"aria-label":g,className:b,onClick:()=>{"dialog"===i.how?j?j(i.path):window.open(f.queryKey.fileView(i.path),"_blank"):k(a)},children:h})},"FilePreview",0,function({path:a,bytes:b}){let c=(0,m.viewKindOf)(a),{content:e,failure:g,truncated:h}=v(A.has(c)?null:a);return("frame"===c||"image"===c)&&b>l.WORKSPACE_VIEW.elementMax?(0,d.jsx)(w,{path:a,bytes:b}):"frame"===c?(0,d.jsx)("iframe",{title:a,src:f.queryKey.file(a),allow:"clipboard-read; clipboard-write; fullscreen; autoplay",className:"h-full w-full bg-white"}):"image"===c?(0,d.jsx)("img",{src:f.queryKey.file(a),alt:a,className:"mx-auto max-w-full p-6"}):"audio"===c||"video"===c?"audio"===c?(0,d.jsx)("audio",{controls:!0,src:f.queryKey.file(a),className:"w-full p-6",children:(0,d.jsx)("track",{kind:"captions"})}):(0,d.jsx)("video",{controls:!0,src:f.queryKey.file(a),className:"max-w-full p-6",children:(0,d.jsx)("track",{kind:"captions"})}):g?(0,d.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:g}):null===e?(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(j.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-5/6"})]}):(0,d.jsx)(s,{kind:c,content:e,truncated:h})},"FileViewer",0,function({children:a}){let[b,c]=(0,e.useState)(null);return(0,d.jsxs)(B,{value:c,children:[a,(0,d.jsx)(x,{path:b,kind:b?(0,m.viewKindOf)(b):"text",onClose:()=>c(null)})]})},"fileTarget",0,r,"useFileText",0,v,"useOpenFile",0,function(){let a=(0,e.useContext)(B);return(0,e.useCallback)(b=>{let c=r(b);if("os"===c.how)return!1;if("dialog"===c.how&&a)return a(c.path),!0;let d="tab"===c.how?c.href:f.queryKey.fileView(c.path);return null!==window.open(d,"_blank")},[a])}]),c()}catch(a){c(a)}},!1),935220,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f647083e5350baa7762d6d282de825cdf6b737384",b.callServer,void 0,b.findSourceMapURL,"openFileAction");a.s(["openFileAction",0,c])},559553,a=>{"use strict";var b=a.i(287702);let c=a=>`text/${a}; charset=utf-8`,d={md:{kind:"markdown",mime:c("markdown")},markdown:{kind:"markdown",mime:c("markdown")},csv:{kind:"csv",mime:c("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:c("plain")},log:{kind:"text",mime:c("plain")},html:{kind:"frame",mime:c("html")},htm:{kind:"frame",mime:c("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},css:{kind:"none",mime:c("css")},js:{kind:"none",mime:c("javascript")},woff2:{kind:"none",mime:"font/woff2"}},e=Object.entries(d).filter(([,a])=>"none"!==a.kind).map(([a])=>a),f=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${e.join("|")})\b`,"giu"),g=`${b.PATHS.workspace}/`;function h(a){let b=a.trim(),c=b.indexOf(g);return c>=0?b.slice(c+g.length)||null:b.startsWith("/")||/^[A-Za-z]:/.test(b)||b.split("/").includes("..")?null:b||null}a.s(["pathsIn",0,function(a){let b=a.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),c=new Set;for(let a of b.match(f)??[]){let b=function(a){let b=h(a);if(!b)return null;let[c,...d]=b.split("/");return d.length&&c.includes(".")?null:b}(a);b&&c.add(b)}return[...c].slice(0,6)},"viewKindOf",0,a=>d[a.split(".").pop()?.toLowerCase()??""]?.kind??"none","workspaceRelative",0,h])}];
|
|
1
|
+
module.exports=[588237,a=>{"use strict";var b=a.i(187924),c=a.i(497895);a.s(["Table",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,b.jsx)("table",{"data-slot":"table",className:(0,c.cn)("w-full caption-bottom text-sm",a),...d})})},"TableBody",0,function({className:a,...d}){return(0,b.jsx)("tbody",{"data-slot":"table-body",className:(0,c.cn)("[&_tr:last-child]:border-0",a),...d})},"TableCell",0,function({className:a,...d}){return(0,b.jsx)("td",{"data-slot":"table-cell",className:(0,c.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0",a),...d})},"TableHead",0,function({className:a,...d}){return(0,b.jsx)("th",{"data-slot":"table-head",className:(0,c.cn)("h-9 px-2 text-left align-middle font-mono text-[11px] font-normal tracking-[0.1em] whitespace-nowrap text-muted-foreground uppercase [&:has([role=checkbox])]:pr-0",a),...d})},"TableHeader",0,function({className:a,...d}){return(0,b.jsx)("thead",{"data-slot":"table-header",className:(0,c.cn)("[&_tr]:border-b",a),...d})},"TableRow",0,function({className:a,...d}){return(0,b.jsx)("tr",{"data-slot":"table-row",className:(0,c.cn)("border-b border-border/60 transition-colors data-[state=selected]:bg-muted hover:bg-muted/40",a),...d})}])},369768,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(572131),f=a.i(767561),g=a.i(340695),h=a.i(965733),i=a.i(846991),j=a.i(950463),k=a.i(588237),l=a.i(287702),m=a.i(559553),n=a.i(337967),o=a.i(313237),p=a.i(497895),q=b([i]);[i]=q.then?(await q)():q;let A=new Set(["frame","image","audio","video"]);function r(a){let b=(0,m.workspaceRelative)(a);if(!b)return{how:"os"};let c=(0,m.viewKindOf)(b);return A.has(c)?{how:"tab",path:b,href:f.queryKey.fileView(b)}:"none"===c?{how:"os"}:{how:"dialog",path:b}}let B=(0,e.createContext)(null),C={dialog:{prose:"px-5 py-4",block:"px-4 py-3"},page:{prose:"px-5 py-6 sm:px-8",block:"px-5 py-5"},inline:{prose:"pb-3",block:"pb-3"}};function s({kind:a,content:b,truncated:c,where:e="dialog"}){return(0,d.jsxs)(d.Fragment,{children:[null!=c&&(0,d.jsx)(t,{of:c}),(0,d.jsx)(u,{kind:a,content:b,where:e})]})}function t({of:a}){return(0,d.jsxs)("p",{className:"border-b border-border/60 px-5 py-2.5 font-mono text-[11px] text-muted-foreground",children:[`Showing the first ${(0,p.formatBytes)(l.WORKSPACE_VIEW.textMax)} of ${(0,p.formatBytes)(a)}. `,"Open the file itself for the rest."]})}function u({kind:a,content:b,where:c}){let e=C[c];switch(a){case"markdown":return(0,d.jsx)("div",{className:(0,p.cn)("min-w-0 text-sm leading-relaxed",e.prose),children:(0,d.jsx)(i.Markdown,{children:b})});case"csv":return(0,d.jsx)(z,{content:b,className:e.block});case"json":return(0,d.jsx)(y,{text:function(a){try{return JSON.stringify(JSON.parse(a),null,2)}catch{return a}}(b),className:e.block});default:return(0,d.jsx)(y,{text:b,className:e.block})}}function v(a){let[b,c]=(0,e.useState)(null),[d,g]=(0,e.useState)(null),[h,i]=(0,e.useState)(null);return(0,e.useEffect)(()=>{if(!a)return;c(null),g(null),i(null);let b=!1;return fetch(f.queryKey.file(a),{headers:{range:`bytes=0-${l.WORKSPACE_VIEW.textMax-1}`}}).then(async a=>{if(!a.ok)throw Error(await a.text());return{text:await a.text(),of:function(a){let b=a.headers.get("content-range")?.match(/^bytes \d+-(\d+)\/(\d+)$/);if(!b)return null;let[,c,d]=b.map(Number);return c+1<d?d:null}(a)}}).then(({text:a,of:d})=>{if(b)return;let e=null===d?a:a.slice(0,a.lastIndexOf("\n")+1||void 0);c(e),i(d)}).catch(a=>!b&&g((0,p.errorToString)(a))),()=>{b=!0}},[a]),{content:b,failure:d,truncated:h}}function w({path:a,bytes:b}){let[c,e]=(0,o.useServerAction)(n.openFileAction);return(0,d.jsxs)("div",{className:"space-y-4 p-8",children:[(0,d.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:[`This file is ${(0,p.formatBytes)(b)} — too big to draw here without `,"taking the window with it. Open it where it is instead."]}),(0,d.jsx)(g.Button,{variant:"outline",loading:e,onClick:()=>c(a),children:"Reveal in the file manager"})]})}function x({path:a,kind:b,onClose:c}){let{content:e,failure:f,truncated:g}=v(a),i=a?.split("/").pop()??"";return(0,d.jsx)(h.Dialog,{open:null!==a,onOpenChange:a=>!a&&c(),children:(0,d.jsxs)(h.DialogContent,{className:"flex max-h-[calc(100vh-3rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl",children:[(0,d.jsx)(h.DialogTitle,{className:"sr-only",children:i}),(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-2 border-b border-border/60 px-4 py-2.5 pr-12",children:(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px]",children:a})}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:f?(0,d.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:f}):null===e?(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(j.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-5/6"})]}):(0,d.jsx)(s,{kind:b,content:e,truncated:g})})]})})}function y({text:a,className:b}){return(0,d.jsx)("pre",{className:(0,p.cn)("overflow-x-auto font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-foreground/90",b),children:a})}function z({content:a,className:b}){let[c,...f]=(0,e.useMemo)(()=>(function(a){let b=[],c=[],d="",e=!1;for(let f=0;f<a.length;f++){let g=a[f];e?'"'===g&&'"'===a[f+1]?(d+='"',f++):'"'===g?e=!1:d+=g:'"'===g?e=!0:","===g?(c.push(d),d=""):"\n"===g||"\r"===g?("\r"===g&&"\n"===a[f+1]&&f++,c.push(d),b.push(c),c=[],d=""):d+=g}return(d.length||c.length)&&(c.push(d),b.push(c)),b.filter(a=>a.some(a=>a.trim()))})(a),[a]);return c?(0,d.jsx)("div",{className:(0,p.cn)("overflow-x-auto",b),children:(0,d.jsxs)(k.Table,{children:[(0,d.jsx)(k.TableHeader,{children:(0,d.jsx)(k.TableRow,{children:c.map((a,b)=>(0,d.jsx)(k.TableHead,{className:"whitespace-nowrap",children:a},`${b}-${a}`))})}),(0,d.jsx)(k.TableBody,{children:f.map((a,b)=>(0,d.jsx)(k.TableRow,{children:c.map((c,e)=>(0,d.jsx)(k.TableCell,{className:"whitespace-nowrap",children:a[e]??""},`${b}-${e}`))},`${b}-${a[0]??""}`))})]})}):(0,d.jsx)(y,{text:a,className:b})}a.s(["FileBody",0,s,"FileDialog",0,x,"FileLink",0,function({path:a,className:b,title:c,label:g,children:h}){let i=r(a),j=(0,e.useContext)(B),[k,l]=(0,o.useServerAction)(n.openFileAction);return"tab"===i.how?(0,d.jsx)("a",{href:i.href,target:"_blank",rel:"noreferrer",title:c??a,"aria-label":g,className:b,children:h}):(0,d.jsx)("button",{type:"button",disabled:l,title:c??a,"aria-label":g,className:b,onClick:()=>{"dialog"===i.how?j?j(i.path):window.open(f.queryKey.fileView(i.path),"_blank"):k(a)},children:h})},"FilePreview",0,function({path:a,bytes:b}){let c=(0,m.viewKindOf)(a),{content:e,failure:g,truncated:h}=v(A.has(c)?null:a);return("frame"===c||"image"===c)&&b>l.WORKSPACE_VIEW.elementMax?(0,d.jsx)(w,{path:a,bytes:b}):"frame"===c?(0,d.jsx)("iframe",{title:a,src:f.queryKey.file(a),allow:"clipboard-read; clipboard-write; fullscreen; autoplay",className:"h-full w-full bg-white"}):"image"===c?(0,d.jsx)("img",{src:f.queryKey.file(a),alt:a,className:"mx-auto max-w-full p-6"}):"audio"===c||"video"===c?"audio"===c?(0,d.jsx)("audio",{controls:!0,src:f.queryKey.file(a),className:"w-full p-6",children:(0,d.jsx)("track",{kind:"captions"})}):(0,d.jsx)("video",{controls:!0,src:f.queryKey.file(a),className:"max-w-full p-6",children:(0,d.jsx)("track",{kind:"captions"})}):g?(0,d.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:g}):null===e?(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(j.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-5/6"})]}):(0,d.jsx)(s,{kind:c,content:e,truncated:h})},"FileViewer",0,function({children:a}){let[b,c]=(0,e.useState)(null);return(0,d.jsxs)(B,{value:c,children:[a,(0,d.jsx)(x,{path:b,kind:b?(0,m.viewKindOf)(b):"text",onClose:()=>c(null)})]})},"fileTarget",0,r,"useFileText",0,v,"useOpenFile",0,function(){let a=(0,e.useContext)(B);return(0,e.useCallback)(b=>{let c=r(b);if("os"===c.how)return!1;if("dialog"===c.how&&a)return a(c.path),!0;let d="tab"===c.how?c.href:f.queryKey.fileView(c.path);return null!==window.open(d,"_blank")},[a])}]),c()}catch(a){c(a)}},!1),337967,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f4957e151a50cd41ee138dc20323d2118d625a8e9",b.callServer,void 0,b.findSourceMapURL,"openFileAction");a.s(["openFileAction",0,c])},559553,a=>{"use strict";var b=a.i(287702);let c=a=>`text/${a}; charset=utf-8`,d={md:{kind:"markdown",mime:c("markdown")},markdown:{kind:"markdown",mime:c("markdown")},csv:{kind:"csv",mime:c("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:c("plain")},log:{kind:"text",mime:c("plain")},html:{kind:"frame",mime:c("html")},htm:{kind:"frame",mime:c("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},css:{kind:"none",mime:c("css")},js:{kind:"none",mime:c("javascript")},woff2:{kind:"none",mime:"font/woff2"}},e=Object.entries(d).filter(([,a])=>"none"!==a.kind).map(([a])=>a),f=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${e.join("|")})\b`,"giu"),g=`${b.PATHS.workspace}/`;function h(a){let b=a.trim(),c=b.indexOf(g);return c>=0?b.slice(c+g.length)||null:b.startsWith("/")||/^[A-Za-z]:/.test(b)||b.split("/").includes("..")?null:b||null}a.s(["pathsIn",0,function(a){let b=a.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),c=new Set;for(let a of b.match(f)??[]){let b=function(a){let b=h(a);if(!b)return null;let[c,...d]=b.split("/");return d.length&&c.includes(".")?null:b}(a);b&&c.add(b)}return[...c].slice(0,6)},"viewKindOf",0,a=>d[a.split(".").pop()?.toLowerCase()??""]?.kind??"none","workspaceRelative",0,h])}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=_0n3toaw._.js.map
|