@mndrk/agx 1.4.53 → 1.4.54
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/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/app-build-manifest.json +56 -56
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/app-path-routes-manifest.json +14 -14
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/build-manifest.json +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/prerender-manifest.json +9 -9
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/_not-found.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/audit/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/[...nextauth]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/daemon-secret/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/device/code/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/device/token/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/refresh/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/domains/[id]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/domains/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/learnings/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/logs/stream/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/orchestrator/tasks/[taskId]/start/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/orchestrator/tasks/[taskId]/status/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/queue/complete/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/queue/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/stage-prompts/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/comments/[commentId]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/comments/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/heartbeat/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/history/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/logs/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/[id]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/tasks/stream/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/user-settings/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/workflows/[id]/nodes/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/workflows/[id]/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/auth/callback/route_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/auth/device/page.js +5 -5
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/auth/device/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/auth/device.html +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/auth/device.rsc +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/dashboard.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/dashboard.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/index.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/login.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/login.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/[slug]/tasks/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/[slug]/workflow/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/projects.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.html +2 -2
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app/settings.rsc +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/app-paths-manifest.json +14 -14
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/pages/404.html +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/pages/500.html +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/pages-manifest.json +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/server-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/server/server-reference-manifest.json +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/auth/device/page-288ccb59b548ddcc.js +1 -0
- package/lib/cli/runCli.js +42 -4
- package/package.json +1 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/_error.js +0 -28
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/app/auth/device/page-c62bf52616c5236a.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/fallback/amp.js +0 -1015
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/fallback/main-app.js +0 -1893
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/fallback/main.js +0 -1616
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/fallback/pages/_app.js +0 -28
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/fallback/pages/_error.js +0 -28
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/fallback/react-refresh.js +0 -62
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/fallback/webpack.js +0 -1368
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/main.js +0 -1616
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/pages/_app.js +0 -28
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/pages/_error.js +0 -28
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/polyfills.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/react-refresh.js +0 -62
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/chunks/webpack.js +0 -1363
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/development/_buildManifest.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/development/_ssgManifest.js +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/webpack/31f47ea03c63852d.webpack.hot-update.json +0 -1
- package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/webpack/webpack.31f47ea03c63852d.hot-update.js +0 -12
- /package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/{sBq1ZSRHDpXvs00GEPvwU → LM3I1rgG9I2QwtrZCfWRB}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/Projects/Agents/agx-cloud/.next/static/{sBq1ZSRHDpXvs00GEPvwU → LM3I1rgG9I2QwtrZCfWRB}/_ssgManifest.js +0 -0
package/lib/cli/runCli.js
CHANGED
|
@@ -785,10 +785,28 @@ async function checkOnboarding() {
|
|
|
785
785
|
let decisionPayload;
|
|
786
786
|
try {
|
|
787
787
|
if (localArtifacts) {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
788
|
+
// Derive project slug from task, or auto-detect from cwd
|
|
789
|
+
let derivedProjectSlug = task?.project_slug || task?.project?.slug || task?.project_name || task?.project?.name;
|
|
790
|
+
if (!derivedProjectSlug) {
|
|
791
|
+
// Auto-detect from cwd (git repo folder name or current folder)
|
|
792
|
+
const cwd = process.cwd();
|
|
793
|
+
let dir = cwd;
|
|
794
|
+
while (dir !== require('path').dirname(dir)) {
|
|
795
|
+
const gitPath = require('path').join(dir, '.git');
|
|
796
|
+
try {
|
|
797
|
+
const stat = require('fs').statSync(gitPath);
|
|
798
|
+
if (stat.isDirectory() || stat.isFile()) {
|
|
799
|
+
derivedProjectSlug = require('path').basename(dir);
|
|
800
|
+
break;
|
|
801
|
+
}
|
|
802
|
+
} catch { /* continue */ }
|
|
803
|
+
dir = require('path').dirname(dir);
|
|
804
|
+
}
|
|
805
|
+
if (!derivedProjectSlug) {
|
|
806
|
+
derivedProjectSlug = require('path').basename(cwd);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
projectSlug = storage.slugify(derivedProjectSlug, { maxLength: 64 }) || 'untitled';
|
|
792
810
|
taskSlug = storage.slugify(
|
|
793
811
|
task?.slug || taskId || 'untitled',
|
|
794
812
|
{ maxLength: 64 }
|
|
@@ -1183,6 +1201,26 @@ async function checkOnboarding() {
|
|
|
1183
1201
|
const projectIdx = args.findIndex(a => a === '--project');
|
|
1184
1202
|
if (projectIdx !== -1 && args[projectIdx + 1]) {
|
|
1185
1203
|
projectSlug = args[projectIdx + 1];
|
|
1204
|
+
} else {
|
|
1205
|
+
// Auto-detect project from cwd (git repo folder name or current folder)
|
|
1206
|
+
const cwd = process.cwd();
|
|
1207
|
+
let dir = cwd;
|
|
1208
|
+
let foundGit = false;
|
|
1209
|
+
while (dir !== require('path').dirname(dir)) {
|
|
1210
|
+
const gitPath = require('path').join(dir, '.git');
|
|
1211
|
+
try {
|
|
1212
|
+
const stat = require('fs').statSync(gitPath);
|
|
1213
|
+
if (stat.isDirectory() || stat.isFile()) {
|
|
1214
|
+
projectSlug = storage.slugify(require('path').basename(dir));
|
|
1215
|
+
foundGit = true;
|
|
1216
|
+
break;
|
|
1217
|
+
}
|
|
1218
|
+
} catch { /* continue */ }
|
|
1219
|
+
dir = require('path').dirname(dir);
|
|
1220
|
+
}
|
|
1221
|
+
if (!foundGit) {
|
|
1222
|
+
projectSlug = storage.slugify(require('path').basename(cwd));
|
|
1223
|
+
}
|
|
1186
1224
|
}
|
|
1187
1225
|
let ticketType = null;
|
|
1188
1226
|
const ticketTypeIdx = args.findIndex(a => a === '--type' || a === '--ticket-type');
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* ATTENTION: An "eval-source-map" devtool has been used.
|
|
3
|
-
* This devtool is neither made for production nor for readable output files.
|
|
4
|
-
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
|
5
|
-
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
6
|
-
* or disable the default devtool with "devtool: false".
|
|
7
|
-
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
|
-
*/
|
|
9
|
-
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([["/_error"],{
|
|
10
|
-
|
|
11
|
-
/***/ "(pages-dir-browser)/./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2FUsers%2Fmendrika%2FProjects%2FAgents%2Fagx-cloud%2Fnode_modules%2Fnext%2Fdist%2Fpages%2F_error.js&page=%2F_error!":
|
|
12
|
-
/*!************************************************************************************************************************************************************************************************************************!*\
|
|
13
|
-
!*** ./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2FUsers%2Fmendrika%2FProjects%2FAgents%2Fagx-cloud%2Fnode_modules%2Fnext%2Fdist%2Fpages%2F_error.js&page=%2F_error! ***!
|
|
14
|
-
\************************************************************************************************************************************************************************************************************************/
|
|
15
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
16
|
-
|
|
17
|
-
eval(__webpack_require__.ts("\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/_error\",\n function () {\n return __webpack_require__(/*! ./node_modules/next/dist/pages/_error.js */ \"(pages-dir-browser)/./node_modules/next/dist/pages/_error.js\");\n }\n ]);\n if(true) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/_error\"])\n });\n }\n //# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHBhZ2VzLWRpci1icm93c2VyKS8uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3QvYnVpbGQvd2VicGFjay9sb2FkZXJzL25leHQtY2xpZW50LXBhZ2VzLWxvYWRlci5qcz9hYnNvbHV0ZVBhZ2VQYXRoPSUyRlVzZXJzJTJGbWVuZHJpa2ElMkZQcm9qZWN0cyUyRkFnZW50cyUyRmFneC1jbG91ZCUyRm5vZGVfbW9kdWxlcyUyRm5leHQlMkZkaXN0JTJGcGFnZXMlMkZfZXJyb3IuanMmcGFnZT0lMkZfZXJyb3IhIiwibWFwcGluZ3MiOiI7QUFDQTtBQUNBO0FBQ0E7QUFDQSxlQUFlLG1CQUFPLENBQUMsOEdBQTBDO0FBQ2pFO0FBQ0E7QUFDQSxPQUFPLElBQVU7QUFDakIsTUFBTSxVQUFVO0FBQ2hCO0FBQ0EsT0FBTztBQUNQO0FBQ0EiLCJzb3VyY2VzIjpbIiJdLCJzb3VyY2VzQ29udGVudCI6WyJcbiAgICAod2luZG93Ll9fTkVYVF9QID0gd2luZG93Ll9fTkVYVF9QIHx8IFtdKS5wdXNoKFtcbiAgICAgIFwiL19lcnJvclwiLFxuICAgICAgZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gcmVxdWlyZShcIi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9wYWdlcy9fZXJyb3IuanNcIik7XG4gICAgICB9XG4gICAgXSk7XG4gICAgaWYobW9kdWxlLmhvdCkge1xuICAgICAgbW9kdWxlLmhvdC5kaXNwb3NlKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgd2luZG93Ll9fTkVYVF9QLnB1c2goW1wiL19lcnJvclwiXSlcbiAgICAgIH0pO1xuICAgIH1cbiAgIl0sIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(pages-dir-browser)/./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2FUsers%2Fmendrika%2FProjects%2FAgents%2Fagx-cloud%2Fnode_modules%2Fnext%2Fdist%2Fpages%2F_error.js&page=%2F_error!\n"));
|
|
18
|
-
|
|
19
|
-
/***/ })
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
/******/ __webpack_require__ => { // webpackRuntimeModules
|
|
23
|
-
/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
24
|
-
/******/ __webpack_require__.O(0, ["main"], () => (__webpack_exec__("(pages-dir-browser)/./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2FUsers%2Fmendrika%2FProjects%2FAgents%2Fagx-cloud%2Fnode_modules%2Fnext%2Fdist%2Fpages%2F_error.js&page=%2F_error!")));
|
|
25
|
-
/******/ var __webpack_exports__ = __webpack_require__.O();
|
|
26
|
-
/******/ _N_E = __webpack_exports__;
|
|
27
|
-
/******/ }
|
|
28
|
-
]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8008],{63:(e,t,r)=>{"use strict";var s=r(7260);r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}}),r.o(s,"useSearchParams")&&r.d(t,{useSearchParams:function(){return s.useSearchParams}})},926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{callServer:function(){return s.callServer},createServerReference:function(){return c.createServerReference},findSourceMapURL:function(){return n.findSourceMapURL}});let s=r(1209),n=r(5153),c=r(7197)},5109:(e,t,r)=>{Promise.resolve().then(r.bind(r,6797))},6797:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var s=r(5155),n=r(2115),c=r(63),a=r(926);let l=(0,a.createServerReference)("40a2689ab42e12f6a75bc92b4713763e52cdd2fb1d",a.callServer,void 0,a.findSourceMapURL,"approveDeviceCode");function o(){let e=(0,c.useSearchParams)(),t=(0,c.useRouter)(),r=e.get("user_code")||"",[a,o]=(0,n.useState)(r),[u,i]=(0,n.useState)(!1),[d,f]=(0,n.useState)(null),[x,h]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(x){let e=setTimeout(()=>{t.push("/projects")},3e3);return()=>clearTimeout(e)}},[x,t]);let m=async e=>{e.preventDefault(),i(!0),f(null);try{let e=await l(a);if(!e.success)throw Error(e.error);h(!0)}catch(e){f(e.message)}finally{i(!1)}};return x?(0,s.jsx)("div",{className:"flex flex-col items-center justify-center min-h-screen bg-neutral-900 text-white p-4",children:(0,s.jsxs)("div",{className:"max-w-md w-full bg-neutral-800 p-8 rounded-xl shadow-2xl text-center",children:[(0,s.jsx)("h1",{className:"text-3xl font-bold mb-4 text-green-400",children:"Success!"}),(0,s.jsx)("p",{className:"text-gray-300 mb-2",children:"You have successfully authenticated your device."}),(0,s.jsx)("p",{className:"text-gray-400 text-sm mb-6 italic",children:"Redirecting to projects in a few seconds..."}),(0,s.jsx)("button",{onClick:()=>t.push("/projects"),className:"w-full py-3 px-4 bg-white text-black font-semibold rounded-lg hover:bg-gray-200 transition-colors",children:"Go to Projects"})]})}):(0,s.jsx)("div",{className:"flex flex-col items-center justify-center min-h-screen bg-neutral-900 text-white p-4",children:(0,s.jsxs)("div",{className:"max-w-md w-full bg-neutral-800 p-8 rounded-xl shadow-2xl",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold mb-6 text-center",children:"Connect Device"}),(0,s.jsx)("p",{className:"text-gray-400 mb-8 text-center text-sm",children:"Enter the code displayed on your device to authorize it."}),(0,s.jsxs)("form",{onSubmit:m,className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"code",className:"block text-sm font-medium text-gray-400 mb-2",children:"Device Code"}),(0,s.jsx)("input",{type:"text",id:"code",value:a,onChange:e=>o(e.target.value.toUpperCase()),placeholder:"BCDF-XXXX",className:"w-full px-4 py-3 bg-neutral-900 border border-neutral-700 rounded-lg text-white placeholder-neutral-600 focus:outline-none focus:ring-2 focus:ring-blue-500 font-mono text-center tracking-widest text-lg uppercase",required:!0})]}),d&&(0,s.jsx)("div",{className:"p-3 bg-red-900/50 border border-red-800 rounded-lg text-red-200 text-center text-sm",children:d}),(0,s.jsx)("button",{type:"submit",disabled:u,className:"w-full py-3 px-4 bg-white text-black font-semibold rounded-lg hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-white transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:u?"Verifying...":"Authorize Device"})]})]})})}function u(){return(0,s.jsx)(n.Suspense,{fallback:(0,s.jsx)("div",{children:"Loading..."}),children:(0,s.jsx)(o,{})})}}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=5109)),_N_E=e.O()}]);
|