@powerhousedao/ph-clint-app 0.1.0-dev.73 → 0.1.0-dev.74
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/dist/browser/document-models/index.js +1 -1
- package/dist/browser/document-models/ph-clint-project/index.js +3 -3
- package/dist/browser/{editor-DL0W2XOS.js → editor-CAZmaheq.js} +825 -261
- package/dist/browser/{editor-DL0W2XOS.js.map → editor-CAZmaheq.js.map} +1 -1
- package/dist/browser/editors/ph-clint-project-editor/module.js +1 -1
- package/dist/browser/index.js +3 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/{module-DoAlHsjp.js → module-K5q3UobV.js} +1970 -977
- package/dist/browser/module-K5q3UobV.js.map +1 -0
- package/dist/browser/{ph-clint-project-D634z5c5.js → ph-clint-project-Bbl7jqNw.js} +4 -6
- package/dist/browser/ph-clint-project-Bbl7jqNw.js.map +1 -0
- package/dist/connect/assets/editor-CQqCB-3d.js +2 -0
- package/dist/connect/assets/editor-CQqCB-3d.js.map +1 -0
- package/dist/connect/assets/{index-BXAErAWR.js → index-DmrNLi1C.js} +20 -20
- package/dist/connect/assets/index-DmrNLi1C.js.map +1 -0
- package/dist/connect/assets/index-cjUwUwMU.css +2 -0
- package/dist/connect/assets/ph-clint-project-DZ_ZplDv.js +1142 -0
- package/dist/connect/assets/ph-clint-project-DZ_ZplDv.js.map +1 -0
- package/dist/connect/index.html +3 -3
- package/dist/connect/ph-packages.json +1 -1
- package/dist/document-models/document-models.d.ts +1 -1
- package/dist/document-models/index.d.ts +1 -1
- package/dist/document-models/ph-clint-project/index.d.ts +2 -2
- package/dist/document-models/ph-clint-project/upgrades/index.d.ts +2 -2
- package/dist/document-models/ph-clint-project/upgrades/upgrade-manifest.d.ts +2 -2
- package/dist/document-models/ph-clint-project/upgrades/upgrade-manifest.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/actions.d.ts +28 -16
- package/dist/document-models/ph-clint-project/v1/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/actions.d.ts +29 -19
- package/dist/document-models/ph-clint-project/v1/gen/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/controller.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/controller.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/creators.d.ts +28 -18
- package/dist/document-models/ph-clint-project/v1/gen/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/actions.d.ts +6 -6
- package/dist/document-models/ph-clint-project/v1/gen/deployment/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/deployment/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/deployment/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-model.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-schema.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/actions.d.ts +6 -6
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/actions.d.ts +6 -54
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/creators.d.ts +2 -14
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/error.d.ts +1 -78
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/operations.d.ts +3 -15
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/actions.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/actions.d.ts +4 -4
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/actions.d.ts +5 -5
- package/dist/document-models/ph-clint-project/v1/gen/identity/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/identity/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/identity/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/index.d.ts +25 -20
- package/dist/document-models/ph-clint-project/v1/gen/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/actions.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/error.d.ts +13 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/actions.d.ts +40 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/actions.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/creators.d.ts +11 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/creators.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/error.d.ts +79 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/error.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/operations.d.ts +18 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/operations.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/actions.d.ts +28 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/actions.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/creators.d.ts +8 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/creators.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/error.d.ts +36 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/error.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/operations.d.ts +15 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/operations.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/actions.d.ts +20 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/actions.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/creators.d.ts +6 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/creators.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/error.d.ts +41 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/error.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/operations.d.ts +13 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/operations.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/actions.d.ts +24 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/actions.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/creators.d.ts +7 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/creators.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/error.d.ts +46 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/error.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/operations.d.ts +14 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/operations.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/actions.d.ts +24 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/actions.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/creators.d.ts +7 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/creators.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/error.d.ts +51 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/error.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/operations.d.ts +14 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/operations.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/ph-factories.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/actions.d.ts +7 -7
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/actions.d.ts +7 -7
- package/dist/document-models/ph-clint-project/v1/gen/publishing/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/publishing/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/publishing/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/reducer.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/index.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/schema/types.d.ts +214 -129
- package/dist/document-models/ph-clint-project/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/zod.d.ts +23 -7
- package/dist/document-models/ph-clint-project/v1/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/types.d.ts +5 -5
- package/dist/document-models/ph-clint-project/v1/gen/types.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/utils.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/utils.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/hooks.d.ts +6 -3
- package/dist/document-models/ph-clint-project/v1/hooks.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/index.d.ts +6 -6
- package/dist/document-models/ph-clint-project/v1/module.d.ts +28 -16
- package/dist/document-models/ph-clint-project/v1/module.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/index.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/deployment.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/deployment.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/external-skills.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/external-skills.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-mastra.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-mastra.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-powerhouse.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-powerhouse.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-routine.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-routine.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/identity.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/identity.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/lifecycle.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/lifecycle.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-agent-bindings.d.ts +3 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-agent-bindings.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-main-agent.d.ts +3 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-main-agent.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-models.d.ts +3 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-models.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-profiles.d.ts +3 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-profiles.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-sub-agents.d.ts +3 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-sub-agents.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/powerhouse-packages.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/powerhouse-packages.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/publishing.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/publishing.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/tests/mastra-agent-bindings.test.d.ts +2 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-agent-bindings.test.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-main-agent.test.d.ts +2 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-main-agent.test.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-models.test.d.ts +2 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-models.test.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-profiles.test.d.ts +2 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-profiles.test.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-sub-agents.test.d.ts +2 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-sub-agents.test.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/utils.d.ts +2 -2
- package/dist/document-models/upgrade-manifests.d.ts +1 -1
- package/dist/document-models/upgrade-manifests.d.ts.map +1 -1
- package/dist/editors/ph-clint-project-editor/editor.d.ts.map +1 -1
- package/dist/node/document-models/index.mjs +1 -1
- package/dist/node/document-models/ph-clint-project/index.mjs +3 -3
- package/dist/node/{editor-mM5FSNXc.mjs → editor-DOw2BwlR.mjs} +825 -261
- package/dist/node/{editor-mM5FSNXc.mjs.map → editor-DOw2BwlR.mjs.map} +1 -1
- package/dist/node/editors/ph-clint-project-editor/module.mjs +1 -1
- package/dist/node/index.mjs +3 -3
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{module-DayL4J7r.mjs → module-DTtUZ4DR.mjs} +1970 -977
- package/dist/node/module-DTtUZ4DR.mjs.map +1 -0
- package/dist/node/{ph-clint-project-Btx_kiiQ.mjs → ph-clint-project-DFA4zHJv.mjs} +4 -6
- package/dist/node/ph-clint-project-DFA4zHJv.mjs.map +1 -0
- package/dist/style.css +27 -30
- package/package.json +1 -1
- package/dist/browser/module-DoAlHsjp.js.map +0 -1
- package/dist/browser/ph-clint-project-D634z5c5.js.map +0 -1
- package/dist/connect/assets/editor-DgkuaKuV.js +0 -2
- package/dist/connect/assets/editor-DgkuaKuV.js.map +0 -1
- package/dist/connect/assets/index-BSq-9kCR.css +0 -2
- package/dist/connect/assets/index-BXAErAWR.js.map +0 -1
- package/dist/connect/assets/ph-clint-project-BRYYVNTj.js +0 -758
- package/dist/connect/assets/ph-clint-project-BRYYVNTj.js.map +0 -1
- package/dist/node/module-DayL4J7r.mjs.map +0 -1
- package/dist/node/ph-clint-project-Btx_kiiQ.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __commonJSMin } from "./chunk-YKewjYmz.js";
|
|
2
|
-
import {
|
|
3
|
-
import { c as exportDocument, d as showRevisionHistory, f as useGetSwitchboardLink, g as useDocumentById, h as useSelectedDocumentSafe, l as setSelectedNode, m as useNodeParentFolderById, p as useNodeActions, s as useSelectedPhClintProjectDocument, u as setSelectedTimelineItem } from "./ph-clint-project-
|
|
2
|
+
import { g as actions, hr as redo, jr as generateId, vr as undo } from "./module-K5q3UobV.js";
|
|
3
|
+
import { c as exportDocument, d as showRevisionHistory, f as useGetSwitchboardLink, g as useDocumentById, h as useSelectedDocumentSafe, l as setSelectedNode, m as useNodeParentFolderById, p as useNodeActions, s as useSelectedPhClintProjectDocument, u as setSelectedTimelineItem } from "./ph-clint-project-Bbl7jqNw.js";
|
|
4
4
|
import { n as Icon, r as twMerge } from "./document-timeline-FWiQhfIq-DO4emW6K.js";
|
|
5
5
|
import { Suspense, lazy, useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -745,8 +745,26 @@ function Editor() {
|
|
|
745
745
|
id: generateId(),
|
|
746
746
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
747
747
|
}));
|
|
748
|
-
const
|
|
749
|
-
const
|
|
748
|
+
const setMainAgentName = (name) => dispatch(actions.setMainAgentName({ name }));
|
|
749
|
+
const setMainAgentDescription = (description) => dispatch(actions.setMainAgentDescription({ description }));
|
|
750
|
+
const clearMainAgentDescription = () => dispatch(actions.clearMainAgentDescription({ _: true }));
|
|
751
|
+
const setMainAgentImage = (image) => dispatch(actions.setMainAgentImage({ image }));
|
|
752
|
+
const clearMainAgentImage = () => dispatch(actions.clearMainAgentImage({ _: true }));
|
|
753
|
+
const addSubAgent = (id, name, description, modelId) => dispatch(actions.addSubAgent({
|
|
754
|
+
id,
|
|
755
|
+
name,
|
|
756
|
+
description,
|
|
757
|
+
modelId
|
|
758
|
+
}));
|
|
759
|
+
const removeSubAgent = (id) => dispatch(actions.removeSubAgent({ id }));
|
|
760
|
+
const setSubAgentName = (id, name) => dispatch(actions.setSubAgentName({
|
|
761
|
+
id,
|
|
762
|
+
name
|
|
763
|
+
}));
|
|
764
|
+
const setSubAgentDescription = (id, description) => dispatch(actions.setSubAgentDescription({
|
|
765
|
+
id,
|
|
766
|
+
description
|
|
767
|
+
}));
|
|
750
768
|
const addModel = (id, isDefault) => dispatch(actions.addModel({
|
|
751
769
|
id,
|
|
752
770
|
isDefault
|
|
@@ -769,9 +787,40 @@ function Editor() {
|
|
|
769
787
|
ids,
|
|
770
788
|
insertBefore
|
|
771
789
|
}));
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
|
|
790
|
+
const setAgentModel = (agentId, modelId) => dispatch(actions.setAgentModel({
|
|
791
|
+
agentId,
|
|
792
|
+
modelId
|
|
793
|
+
}));
|
|
794
|
+
const addAgentProfileRef = (agentId, profileId, insertBefore) => dispatch(actions.addAgentProfileRef({
|
|
795
|
+
agentId,
|
|
796
|
+
profileId,
|
|
797
|
+
insertBefore
|
|
798
|
+
}));
|
|
799
|
+
const removeAgentProfileRef = (agentId, profileId) => dispatch(actions.removeAgentProfileRef({
|
|
800
|
+
agentId,
|
|
801
|
+
profileId
|
|
802
|
+
}));
|
|
803
|
+
const reorderAgentProfileRefs = (agentId, ids, insertBefore) => dispatch(actions.reorderAgentProfileRefs({
|
|
804
|
+
agentId,
|
|
805
|
+
ids,
|
|
806
|
+
insertBefore
|
|
807
|
+
}));
|
|
808
|
+
const addAgentSkill = (agentId, name) => dispatch(actions.addAgentSkill({
|
|
809
|
+
agentId,
|
|
810
|
+
name
|
|
811
|
+
}));
|
|
812
|
+
const removeAgentSkill = (agentId, name) => dispatch(actions.removeAgentSkill({
|
|
813
|
+
agentId,
|
|
814
|
+
name
|
|
815
|
+
}));
|
|
816
|
+
const addAgentToolPattern = (agentId, pattern) => dispatch(actions.addAgentToolPattern({
|
|
817
|
+
agentId,
|
|
818
|
+
pattern
|
|
819
|
+
}));
|
|
820
|
+
const removeAgentToolPattern = (agentId, pattern) => dispatch(actions.removeAgentToolPattern({
|
|
821
|
+
agentId,
|
|
822
|
+
pattern
|
|
823
|
+
}));
|
|
775
824
|
const setEnableChat = (enabled) => dispatch(actions.setEnableChat({ enabled }));
|
|
776
825
|
const setProxyEnabled = (enabled) => dispatch(actions.setProxyEnabled({ enabled }));
|
|
777
826
|
const setObservabilityEnabled = (enabled) => dispatch(actions.setObservabilityEnabled({ enabled }));
|
|
@@ -834,19 +883,31 @@ function Editor() {
|
|
|
834
883
|
activeTab === "agent" && /* @__PURE__ */ jsx(AgentTab, {
|
|
835
884
|
mastra,
|
|
836
885
|
isAboveDisabled,
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
886
|
+
setMainAgentName,
|
|
887
|
+
setMainAgentDescription,
|
|
888
|
+
clearMainAgentDescription,
|
|
889
|
+
setMainAgentImage,
|
|
890
|
+
clearMainAgentImage,
|
|
891
|
+
addSubAgent,
|
|
892
|
+
removeSubAgent,
|
|
893
|
+
setSubAgentName,
|
|
894
|
+
setSubAgentDescription,
|
|
895
|
+
setAgentModel,
|
|
896
|
+
addAgentProfileRef,
|
|
897
|
+
removeAgentProfileRef,
|
|
898
|
+
reorderAgentProfileRefs,
|
|
899
|
+
addAgentSkill,
|
|
900
|
+
removeAgentSkill,
|
|
901
|
+
addAgentToolPattern,
|
|
902
|
+
removeAgentToolPattern,
|
|
843
903
|
addModel,
|
|
844
904
|
removeModel,
|
|
845
905
|
setDefaultModel,
|
|
846
906
|
addProfile,
|
|
847
907
|
updateProfile,
|
|
848
908
|
removeProfile,
|
|
849
|
-
reorderProfiles
|
|
909
|
+
reorderProfiles,
|
|
910
|
+
setEnableChat
|
|
850
911
|
}),
|
|
851
912
|
activeTab === "powerhouse" && /* @__PURE__ */ jsx(PowerhouseTab, {
|
|
852
913
|
packages: state.packages,
|
|
@@ -1000,67 +1061,61 @@ function PowerhouseTab(props) {
|
|
|
1000
1061
|
}
|
|
1001
1062
|
function AgentTab(props) {
|
|
1002
1063
|
const { mastra } = props;
|
|
1003
|
-
|
|
1064
|
+
const main = mastra.mainAgent;
|
|
1065
|
+
if (!mastra.enabled || !main) return /* @__PURE__ */ jsxs("section", {
|
|
1004
1066
|
className: "my-6 rounded border border-dashed border-gray-300 bg-white p-8 text-center text-gray-500",
|
|
1005
1067
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
1006
1068
|
className: "text-lg font-semibold",
|
|
1007
1069
|
children: "Agent"
|
|
1008
1070
|
}), /* @__PURE__ */ jsx("p", {
|
|
1009
1071
|
className: "mt-2",
|
|
1010
|
-
children: "Enable Mastra in the Spec tab to configure
|
|
1072
|
+
children: "Enable Mastra in the Spec tab to configure agents."
|
|
1011
1073
|
})]
|
|
1012
1074
|
});
|
|
1075
|
+
const allAgentIds = [main.id, ...mastra.subAgents.map((s) => s.id)];
|
|
1013
1076
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1014
|
-
/* @__PURE__ */ jsx(
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
})]
|
|
1051
|
-
}), /* @__PURE__ */ jsx(TextField, {
|
|
1052
|
-
compact: true,
|
|
1053
|
-
label: "Agent Description",
|
|
1054
|
-
value: mastra.agentDescription ?? "",
|
|
1055
|
-
placeholder: "A brief description of what this agent does",
|
|
1056
|
-
onCommit: props.setAgentDescription
|
|
1057
|
-
})]
|
|
1058
|
-
})]
|
|
1059
|
-
})
|
|
1077
|
+
/* @__PURE__ */ jsx(MainAgentPanel, {
|
|
1078
|
+
main,
|
|
1079
|
+
models: mastra.models,
|
|
1080
|
+
profiles: mastra.profiles,
|
|
1081
|
+
setMainAgentName: props.setMainAgentName,
|
|
1082
|
+
setMainAgentDescription: props.setMainAgentDescription,
|
|
1083
|
+
clearMainAgentDescription: props.clearMainAgentDescription,
|
|
1084
|
+
setMainAgentImage: props.setMainAgentImage,
|
|
1085
|
+
clearMainAgentImage: props.clearMainAgentImage,
|
|
1086
|
+
setAgentModel: props.setAgentModel,
|
|
1087
|
+
addAgentProfileRef: props.addAgentProfileRef,
|
|
1088
|
+
removeAgentProfileRef: props.removeAgentProfileRef,
|
|
1089
|
+
reorderAgentProfileRefs: props.reorderAgentProfileRefs,
|
|
1090
|
+
addAgentSkill: props.addAgentSkill,
|
|
1091
|
+
removeAgentSkill: props.removeAgentSkill,
|
|
1092
|
+
addAgentToolPattern: props.addAgentToolPattern,
|
|
1093
|
+
removeAgentToolPattern: props.removeAgentToolPattern
|
|
1094
|
+
}),
|
|
1095
|
+
/* @__PURE__ */ jsx("hr", {}),
|
|
1096
|
+
/* @__PURE__ */ jsx(SubAgentsSection, {
|
|
1097
|
+
subAgents: mastra.subAgents,
|
|
1098
|
+
models: mastra.models,
|
|
1099
|
+
profiles: mastra.profiles,
|
|
1100
|
+
existingAgentIds: allAgentIds,
|
|
1101
|
+
addSubAgent: props.addSubAgent,
|
|
1102
|
+
removeSubAgent: props.removeSubAgent,
|
|
1103
|
+
setSubAgentName: props.setSubAgentName,
|
|
1104
|
+
setSubAgentDescription: props.setSubAgentDescription,
|
|
1105
|
+
setAgentModel: props.setAgentModel,
|
|
1106
|
+
addAgentProfileRef: props.addAgentProfileRef,
|
|
1107
|
+
removeAgentProfileRef: props.removeAgentProfileRef,
|
|
1108
|
+
reorderAgentProfileRefs: props.reorderAgentProfileRefs,
|
|
1109
|
+
addAgentSkill: props.addAgentSkill,
|
|
1110
|
+
removeAgentSkill: props.removeAgentSkill,
|
|
1111
|
+
addAgentToolPattern: props.addAgentToolPattern,
|
|
1112
|
+
removeAgentToolPattern: props.removeAgentToolPattern
|
|
1060
1113
|
}),
|
|
1061
1114
|
/* @__PURE__ */ jsx("hr", {}),
|
|
1062
1115
|
/* @__PURE__ */ jsx(ModelsSection, {
|
|
1063
1116
|
models: mastra.models,
|
|
1117
|
+
main: mastra.mainAgent,
|
|
1118
|
+
subAgents: mastra.subAgents,
|
|
1064
1119
|
addModel: props.addModel,
|
|
1065
1120
|
removeModel: props.removeModel,
|
|
1066
1121
|
setDefaultModel: props.setDefaultModel
|
|
@@ -1068,6 +1123,8 @@ function AgentTab(props) {
|
|
|
1068
1123
|
/* @__PURE__ */ jsx("hr", {}),
|
|
1069
1124
|
/* @__PURE__ */ jsx(ProfilesSection, {
|
|
1070
1125
|
profiles: mastra.profiles,
|
|
1126
|
+
main: mastra.mainAgent,
|
|
1127
|
+
subAgents: mastra.subAgents,
|
|
1071
1128
|
addProfile: props.addProfile,
|
|
1072
1129
|
updateProfile: props.updateProfile,
|
|
1073
1130
|
removeProfile: props.removeProfile,
|
|
@@ -1092,6 +1149,511 @@ function AgentTab(props) {
|
|
|
1092
1149
|
})
|
|
1093
1150
|
] });
|
|
1094
1151
|
}
|
|
1152
|
+
function MainAgentPanel(props) {
|
|
1153
|
+
const { main } = props;
|
|
1154
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
1155
|
+
className: "my-6",
|
|
1156
|
+
children: [
|
|
1157
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1158
|
+
className: "flex items-center gap-2",
|
|
1159
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1160
|
+
className: "text-lg font-semibold",
|
|
1161
|
+
children: "Main Agent"
|
|
1162
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
1163
|
+
className: "rounded bg-blue-100 px-2 py-0.5 text-xs font-semibold text-blue-700",
|
|
1164
|
+
children: "Main"
|
|
1165
|
+
})]
|
|
1166
|
+
}),
|
|
1167
|
+
/* @__PURE__ */ jsxs("p", {
|
|
1168
|
+
className: "text-sm text-gray-600",
|
|
1169
|
+
children: [
|
|
1170
|
+
"The orchestrating agent. Subagents are exposed to it as tools named ",
|
|
1171
|
+
/* @__PURE__ */ jsx("code", { children: "agent-<subagent-id>" }),
|
|
1172
|
+
". Only the main agent can have an avatar."
|
|
1173
|
+
]
|
|
1174
|
+
}),
|
|
1175
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1176
|
+
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
1177
|
+
children: [
|
|
1178
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1179
|
+
style: {
|
|
1180
|
+
display: "flex",
|
|
1181
|
+
gap: "1.5rem"
|
|
1182
|
+
},
|
|
1183
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1184
|
+
style: {
|
|
1185
|
+
flexShrink: 0,
|
|
1186
|
+
width: "7rem"
|
|
1187
|
+
},
|
|
1188
|
+
children: /* @__PURE__ */ jsx(AgentImageField, {
|
|
1189
|
+
image: main.image ?? null,
|
|
1190
|
+
onSetImage: props.setMainAgentImage,
|
|
1191
|
+
onClearImage: props.clearMainAgentImage
|
|
1192
|
+
})
|
|
1193
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1194
|
+
style: {
|
|
1195
|
+
flex: 1,
|
|
1196
|
+
minWidth: 0
|
|
1197
|
+
},
|
|
1198
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1199
|
+
className: "grid grid-cols-[1fr_2fr] gap-4",
|
|
1200
|
+
children: [/* @__PURE__ */ jsx(TextField, {
|
|
1201
|
+
compact: true,
|
|
1202
|
+
readOnly: true,
|
|
1203
|
+
label: "Agent ID",
|
|
1204
|
+
value: main.id,
|
|
1205
|
+
onCommit: () => {}
|
|
1206
|
+
}), /* @__PURE__ */ jsx(TextField, {
|
|
1207
|
+
compact: true,
|
|
1208
|
+
label: "Agent Name",
|
|
1209
|
+
value: main.name,
|
|
1210
|
+
placeholder: "My Agent",
|
|
1211
|
+
onCommit: props.setMainAgentName
|
|
1212
|
+
})]
|
|
1213
|
+
}), /* @__PURE__ */ jsx(DescriptionField, {
|
|
1214
|
+
value: main.description,
|
|
1215
|
+
placeholder: "A brief description of what this agent does",
|
|
1216
|
+
onSet: props.setMainAgentDescription,
|
|
1217
|
+
onClear: props.clearMainAgentDescription
|
|
1218
|
+
})]
|
|
1219
|
+
})]
|
|
1220
|
+
}),
|
|
1221
|
+
/* @__PURE__ */ jsx("hr", { className: "my-4" }),
|
|
1222
|
+
/* @__PURE__ */ jsx(AgentBindings, {
|
|
1223
|
+
agentId: main.id,
|
|
1224
|
+
isMain: true,
|
|
1225
|
+
modelId: main.modelId,
|
|
1226
|
+
profileIds: main.profileIds,
|
|
1227
|
+
skills: main.skills,
|
|
1228
|
+
toolPatterns: main.toolPatterns,
|
|
1229
|
+
models: props.models,
|
|
1230
|
+
profiles: props.profiles,
|
|
1231
|
+
setAgentModel: props.setAgentModel,
|
|
1232
|
+
addAgentProfileRef: props.addAgentProfileRef,
|
|
1233
|
+
removeAgentProfileRef: props.removeAgentProfileRef,
|
|
1234
|
+
reorderAgentProfileRefs: props.reorderAgentProfileRefs,
|
|
1235
|
+
addAgentSkill: props.addAgentSkill,
|
|
1236
|
+
removeAgentSkill: props.removeAgentSkill,
|
|
1237
|
+
addAgentToolPattern: props.addAgentToolPattern,
|
|
1238
|
+
removeAgentToolPattern: props.removeAgentToolPattern
|
|
1239
|
+
})
|
|
1240
|
+
]
|
|
1241
|
+
})
|
|
1242
|
+
]
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
function DescriptionField(props) {
|
|
1246
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
1247
|
+
className: "my-1 block",
|
|
1248
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1249
|
+
className: "text-xs text-gray-600",
|
|
1250
|
+
children: "Description"
|
|
1251
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1252
|
+
className: "flex items-center gap-2",
|
|
1253
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
1254
|
+
type: "text",
|
|
1255
|
+
defaultValue: props.value ?? "",
|
|
1256
|
+
placeholder: props.placeholder,
|
|
1257
|
+
onBlur: (e) => {
|
|
1258
|
+
const next = e.target.value.trim();
|
|
1259
|
+
if (next && next !== (props.value ?? "")) props.onSet(next);
|
|
1260
|
+
else if (!next && props.value !== null) props.onClear();
|
|
1261
|
+
},
|
|
1262
|
+
onKeyDown: (e) => {
|
|
1263
|
+
if (e.key === "Enter") e.currentTarget.blur();
|
|
1264
|
+
},
|
|
1265
|
+
className: "w-full font-mono"
|
|
1266
|
+
})
|
|
1267
|
+
})]
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
function SubAgentsSection(props) {
|
|
1271
|
+
const [showAddForm, setShowAddForm] = useState(false);
|
|
1272
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
1273
|
+
className: "my-6",
|
|
1274
|
+
children: [
|
|
1275
|
+
/* @__PURE__ */ jsx("h3", {
|
|
1276
|
+
className: "text-lg font-semibold",
|
|
1277
|
+
children: "Sub-agents"
|
|
1278
|
+
}),
|
|
1279
|
+
/* @__PURE__ */ jsxs("p", {
|
|
1280
|
+
className: "text-sm text-gray-600",
|
|
1281
|
+
children: [
|
|
1282
|
+
"Specialised agents the main agent can delegate to. Each is exposed as a tool named ",
|
|
1283
|
+
/* @__PURE__ */ jsx("code", { children: "agent-<id>" }),
|
|
1284
|
+
"."
|
|
1285
|
+
]
|
|
1286
|
+
}),
|
|
1287
|
+
props.subAgents.map((sub) => /* @__PURE__ */ jsx(SubAgentCard, {
|
|
1288
|
+
sub,
|
|
1289
|
+
models: props.models,
|
|
1290
|
+
profiles: props.profiles,
|
|
1291
|
+
removeSubAgent: props.removeSubAgent,
|
|
1292
|
+
setSubAgentName: props.setSubAgentName,
|
|
1293
|
+
setSubAgentDescription: props.setSubAgentDescription,
|
|
1294
|
+
setAgentModel: props.setAgentModel,
|
|
1295
|
+
addAgentProfileRef: props.addAgentProfileRef,
|
|
1296
|
+
removeAgentProfileRef: props.removeAgentProfileRef,
|
|
1297
|
+
reorderAgentProfileRefs: props.reorderAgentProfileRefs,
|
|
1298
|
+
addAgentSkill: props.addAgentSkill,
|
|
1299
|
+
removeAgentSkill: props.removeAgentSkill,
|
|
1300
|
+
addAgentToolPattern: props.addAgentToolPattern,
|
|
1301
|
+
removeAgentToolPattern: props.removeAgentToolPattern
|
|
1302
|
+
}, sub.id)),
|
|
1303
|
+
showAddForm ? /* @__PURE__ */ jsx(AddSubAgentForm, {
|
|
1304
|
+
models: props.models,
|
|
1305
|
+
existingAgentIds: props.existingAgentIds,
|
|
1306
|
+
onAdd: (id, name, description, modelId) => {
|
|
1307
|
+
props.addSubAgent(id, name, description, modelId);
|
|
1308
|
+
setShowAddForm(false);
|
|
1309
|
+
},
|
|
1310
|
+
onCancel: () => setShowAddForm(false)
|
|
1311
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
1312
|
+
className: "mt-3 rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1313
|
+
disabled: props.models.length === 0,
|
|
1314
|
+
title: props.models.length === 0 ? "Add a model first" : "",
|
|
1315
|
+
onClick: () => setShowAddForm(true),
|
|
1316
|
+
children: "+ Add Sub-agent"
|
|
1317
|
+
})
|
|
1318
|
+
]
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
function AddSubAgentForm(props) {
|
|
1322
|
+
const [id, setId] = useState("");
|
|
1323
|
+
const [name, setName] = useState("");
|
|
1324
|
+
const [description, setDescription] = useState("");
|
|
1325
|
+
const [modelId, setModelId] = useState((props.models.find((m) => m.isDefault) ?? props.models[0])?.id ?? "");
|
|
1326
|
+
const canAdd = /^[a-z][a-z0-9-]*$/.test(id) && !props.existingAgentIds.includes(id) && name.trim() && description.trim() && modelId;
|
|
1327
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1328
|
+
className: "my-3 rounded border border-blue-200 bg-blue-50 p-4",
|
|
1329
|
+
children: [
|
|
1330
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1331
|
+
className: "grid grid-cols-2 gap-3",
|
|
1332
|
+
children: [/* @__PURE__ */ jsxs("label", {
|
|
1333
|
+
className: "block",
|
|
1334
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1335
|
+
className: "text-xs text-gray-600",
|
|
1336
|
+
children: "Sub-agent ID"
|
|
1337
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
1338
|
+
type: "text",
|
|
1339
|
+
value: id,
|
|
1340
|
+
placeholder: "summarizer",
|
|
1341
|
+
onChange: (e) => setId(e.target.value.trim()),
|
|
1342
|
+
className: "w-full rounded border p-2 font-mono text-sm"
|
|
1343
|
+
})]
|
|
1344
|
+
}), /* @__PURE__ */ jsxs("label", {
|
|
1345
|
+
className: "block",
|
|
1346
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1347
|
+
className: "text-xs text-gray-600",
|
|
1348
|
+
children: "Display name"
|
|
1349
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
1350
|
+
type: "text",
|
|
1351
|
+
value: name,
|
|
1352
|
+
placeholder: "Summarizer",
|
|
1353
|
+
onChange: (e) => setName(e.target.value),
|
|
1354
|
+
className: "w-full rounded border p-2 text-sm"
|
|
1355
|
+
})]
|
|
1356
|
+
})]
|
|
1357
|
+
}),
|
|
1358
|
+
/* @__PURE__ */ jsxs("label", {
|
|
1359
|
+
className: "my-2 block",
|
|
1360
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1361
|
+
className: "text-xs text-gray-600",
|
|
1362
|
+
children: "Description (the main agent uses this to decide when to delegate)"
|
|
1363
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
1364
|
+
type: "text",
|
|
1365
|
+
value: description,
|
|
1366
|
+
placeholder: "Summarizes long documents into bullet points",
|
|
1367
|
+
onChange: (e) => setDescription(e.target.value),
|
|
1368
|
+
className: "w-full rounded border p-2 text-sm"
|
|
1369
|
+
})]
|
|
1370
|
+
}),
|
|
1371
|
+
/* @__PURE__ */ jsxs("label", {
|
|
1372
|
+
className: "my-2 block",
|
|
1373
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1374
|
+
className: "text-xs text-gray-600",
|
|
1375
|
+
children: "Model"
|
|
1376
|
+
}), /* @__PURE__ */ jsx("select", {
|
|
1377
|
+
value: modelId,
|
|
1378
|
+
onChange: (e) => setModelId(e.target.value),
|
|
1379
|
+
className: "w-full rounded border p-2 font-mono text-sm",
|
|
1380
|
+
children: props.models.map((m) => /* @__PURE__ */ jsxs("option", {
|
|
1381
|
+
value: m.id,
|
|
1382
|
+
children: [m.id, m.isDefault ? " (default)" : ""]
|
|
1383
|
+
}, m.id))
|
|
1384
|
+
})]
|
|
1385
|
+
}),
|
|
1386
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1387
|
+
className: "mt-2 flex items-center gap-2",
|
|
1388
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
1389
|
+
className: "rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1390
|
+
disabled: !canAdd,
|
|
1391
|
+
onClick: () => props.onAdd(id, name.trim(), description.trim(), modelId),
|
|
1392
|
+
children: "Add"
|
|
1393
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
1394
|
+
className: "text-sm text-gray-500 hover:text-gray-700",
|
|
1395
|
+
onClick: props.onCancel,
|
|
1396
|
+
children: "Cancel"
|
|
1397
|
+
})]
|
|
1398
|
+
})
|
|
1399
|
+
]
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
function SubAgentCard(props) {
|
|
1403
|
+
const { sub } = props;
|
|
1404
|
+
const [expanded, setExpanded] = useState(false);
|
|
1405
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1406
|
+
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
1407
|
+
children: [
|
|
1408
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1409
|
+
className: "flex items-center justify-between",
|
|
1410
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1411
|
+
className: "flex items-center gap-3",
|
|
1412
|
+
children: [
|
|
1413
|
+
/* @__PURE__ */ jsx("button", {
|
|
1414
|
+
className: "text-sm text-gray-400 hover:text-gray-700",
|
|
1415
|
+
onClick: () => setExpanded(!expanded),
|
|
1416
|
+
title: expanded ? "Collapse" : "Expand",
|
|
1417
|
+
children: expanded ? "▾" : "▸"
|
|
1418
|
+
}),
|
|
1419
|
+
/* @__PURE__ */ jsx("span", {
|
|
1420
|
+
className: "rounded bg-gray-100 px-2 py-0.5 font-mono text-xs text-gray-500",
|
|
1421
|
+
children: sub.id
|
|
1422
|
+
}),
|
|
1423
|
+
/* @__PURE__ */ jsx("span", {
|
|
1424
|
+
className: "font-semibold",
|
|
1425
|
+
children: sub.name
|
|
1426
|
+
})
|
|
1427
|
+
]
|
|
1428
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
1429
|
+
className: "text-sm text-red-500 hover:text-red-700",
|
|
1430
|
+
onClick: () => props.removeSubAgent(sub.id),
|
|
1431
|
+
children: "Remove"
|
|
1432
|
+
})]
|
|
1433
|
+
}),
|
|
1434
|
+
/* @__PURE__ */ jsx("p", {
|
|
1435
|
+
className: "ml-7 text-sm text-gray-600",
|
|
1436
|
+
children: sub.description
|
|
1437
|
+
}),
|
|
1438
|
+
expanded && /* @__PURE__ */ jsxs("div", {
|
|
1439
|
+
className: "mt-4 space-y-3 border-t border-gray-100 pt-4",
|
|
1440
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1441
|
+
className: "grid grid-cols-2 gap-3",
|
|
1442
|
+
children: [/* @__PURE__ */ jsx(TextField, {
|
|
1443
|
+
compact: true,
|
|
1444
|
+
label: "Name",
|
|
1445
|
+
value: sub.name,
|
|
1446
|
+
onCommit: (v) => props.setSubAgentName(sub.id, v)
|
|
1447
|
+
}), /* @__PURE__ */ jsx(TextField, {
|
|
1448
|
+
compact: true,
|
|
1449
|
+
label: "Description",
|
|
1450
|
+
value: sub.description,
|
|
1451
|
+
onCommit: (v) => props.setSubAgentDescription(sub.id, v)
|
|
1452
|
+
})]
|
|
1453
|
+
}), /* @__PURE__ */ jsx(AgentBindings, {
|
|
1454
|
+
agentId: sub.id,
|
|
1455
|
+
isMain: false,
|
|
1456
|
+
modelId: sub.modelId,
|
|
1457
|
+
profileIds: sub.profileIds,
|
|
1458
|
+
skills: sub.skills,
|
|
1459
|
+
toolPatterns: sub.toolPatterns,
|
|
1460
|
+
models: props.models,
|
|
1461
|
+
profiles: props.profiles,
|
|
1462
|
+
setAgentModel: props.setAgentModel,
|
|
1463
|
+
addAgentProfileRef: props.addAgentProfileRef,
|
|
1464
|
+
removeAgentProfileRef: props.removeAgentProfileRef,
|
|
1465
|
+
reorderAgentProfileRefs: props.reorderAgentProfileRefs,
|
|
1466
|
+
addAgentSkill: props.addAgentSkill,
|
|
1467
|
+
removeAgentSkill: props.removeAgentSkill,
|
|
1468
|
+
addAgentToolPattern: props.addAgentToolPattern,
|
|
1469
|
+
removeAgentToolPattern: props.removeAgentToolPattern
|
|
1470
|
+
})]
|
|
1471
|
+
})
|
|
1472
|
+
]
|
|
1473
|
+
});
|
|
1474
|
+
}
|
|
1475
|
+
function AgentBindings(props) {
|
|
1476
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1477
|
+
className: "space-y-3",
|
|
1478
|
+
children: [
|
|
1479
|
+
/* @__PURE__ */ jsxs("label", {
|
|
1480
|
+
className: "block",
|
|
1481
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1482
|
+
className: "text-xs text-gray-600",
|
|
1483
|
+
children: "Model"
|
|
1484
|
+
}), /* @__PURE__ */ jsx("select", {
|
|
1485
|
+
value: props.modelId,
|
|
1486
|
+
onChange: (e) => props.setAgentModel(props.agentId, e.target.value),
|
|
1487
|
+
className: "mt-1 w-full rounded border p-2 font-mono text-sm",
|
|
1488
|
+
children: props.models.map((m) => /* @__PURE__ */ jsxs("option", {
|
|
1489
|
+
value: m.id,
|
|
1490
|
+
children: [m.id, m.isDefault ? " (default)" : ""]
|
|
1491
|
+
}, m.id))
|
|
1492
|
+
})]
|
|
1493
|
+
}),
|
|
1494
|
+
/* @__PURE__ */ jsx(ProfileRefsEditor, {
|
|
1495
|
+
agentId: props.agentId,
|
|
1496
|
+
profileIds: props.profileIds,
|
|
1497
|
+
allProfiles: props.profiles,
|
|
1498
|
+
onAdd: (profileId) => props.addAgentProfileRef(props.agentId, profileId),
|
|
1499
|
+
onRemove: (profileId) => props.removeAgentProfileRef(props.agentId, profileId),
|
|
1500
|
+
onReorder: (ids, insertBefore) => props.reorderAgentProfileRefs(props.agentId, ids, insertBefore)
|
|
1501
|
+
}),
|
|
1502
|
+
/* @__PURE__ */ jsx(ChipListEditor, {
|
|
1503
|
+
label: "Skills",
|
|
1504
|
+
hint: "Reference skills by name. tpl wins over ext if both exist.",
|
|
1505
|
+
values: props.skills,
|
|
1506
|
+
placeholder: "skill-name",
|
|
1507
|
+
validator: (v) => /^[a-z][a-z0-9-]*$/.test(v),
|
|
1508
|
+
onAdd: (v) => props.addAgentSkill(props.agentId, v),
|
|
1509
|
+
onRemove: (v) => props.removeAgentSkill(props.agentId, v)
|
|
1510
|
+
}),
|
|
1511
|
+
/* @__PURE__ */ jsx(ChipListEditor, {
|
|
1512
|
+
label: "Tool patterns",
|
|
1513
|
+
hint: props.isMain ? "Glob patterns over tool names (e.g. clint-project-*, *-mcp__*). Empty = all tools." : "Glob patterns over tool names. Empty = no tools.",
|
|
1514
|
+
values: props.toolPatterns,
|
|
1515
|
+
placeholder: "pattern*",
|
|
1516
|
+
validator: (v) => v.length > 0,
|
|
1517
|
+
onAdd: (v) => props.addAgentToolPattern(props.agentId, v),
|
|
1518
|
+
onRemove: (v) => props.removeAgentToolPattern(props.agentId, v)
|
|
1519
|
+
})
|
|
1520
|
+
]
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
function ProfileRefsEditor(props) {
|
|
1524
|
+
const available = props.allProfiles.filter((p) => !props.profileIds.includes(p.id));
|
|
1525
|
+
const moveUp = (index) => {
|
|
1526
|
+
if (index === 0) return;
|
|
1527
|
+
const id = props.profileIds[index];
|
|
1528
|
+
const beforeId = props.profileIds[index - 1];
|
|
1529
|
+
props.onReorder([id], beforeId);
|
|
1530
|
+
};
|
|
1531
|
+
const moveDown = (index) => {
|
|
1532
|
+
if (index >= props.profileIds.length - 1) return;
|
|
1533
|
+
const id = props.profileIds[index];
|
|
1534
|
+
const afterNext = index + 2 < props.profileIds.length ? props.profileIds[index + 2] : null;
|
|
1535
|
+
props.onReorder([id], afterNext);
|
|
1536
|
+
};
|
|
1537
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
1538
|
+
/* @__PURE__ */ jsx("span", {
|
|
1539
|
+
className: "text-xs text-gray-600",
|
|
1540
|
+
children: "Profiles (instructions, in order)"
|
|
1541
|
+
}),
|
|
1542
|
+
/* @__PURE__ */ jsxs("ul", {
|
|
1543
|
+
className: "my-1 space-y-1",
|
|
1544
|
+
children: [props.profileIds.map((profileId, i) => {
|
|
1545
|
+
const profile = props.allProfiles.find((p) => p.id === profileId);
|
|
1546
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
1547
|
+
className: "flex items-center gap-2 rounded bg-gray-50 px-2 py-1",
|
|
1548
|
+
children: [
|
|
1549
|
+
/* @__PURE__ */ jsx("button", {
|
|
1550
|
+
className: "text-gray-400 hover:text-gray-600 disabled:opacity-30",
|
|
1551
|
+
disabled: i === 0,
|
|
1552
|
+
onClick: () => moveUp(i),
|
|
1553
|
+
title: "Move up",
|
|
1554
|
+
children: "↑"
|
|
1555
|
+
}),
|
|
1556
|
+
/* @__PURE__ */ jsx("button", {
|
|
1557
|
+
className: "text-gray-400 hover:text-gray-600 disabled:opacity-30",
|
|
1558
|
+
disabled: i === props.profileIds.length - 1,
|
|
1559
|
+
onClick: () => moveDown(i),
|
|
1560
|
+
title: "Move down",
|
|
1561
|
+
children: "↓"
|
|
1562
|
+
}),
|
|
1563
|
+
/* @__PURE__ */ jsx("span", {
|
|
1564
|
+
className: "font-mono text-xs text-gray-500",
|
|
1565
|
+
children: profileId
|
|
1566
|
+
}),
|
|
1567
|
+
/* @__PURE__ */ jsx("span", {
|
|
1568
|
+
className: "flex-1 text-sm",
|
|
1569
|
+
children: profile?.title ?? /* @__PURE__ */ jsx("em", {
|
|
1570
|
+
className: "text-red-500",
|
|
1571
|
+
children: "(missing in library)"
|
|
1572
|
+
})
|
|
1573
|
+
}),
|
|
1574
|
+
/* @__PURE__ */ jsx("button", {
|
|
1575
|
+
className: "text-sm text-red-500 hover:text-red-700",
|
|
1576
|
+
onClick: () => props.onRemove(profileId),
|
|
1577
|
+
children: "Remove"
|
|
1578
|
+
})
|
|
1579
|
+
]
|
|
1580
|
+
}, profileId);
|
|
1581
|
+
}), props.profileIds.length === 0 && /* @__PURE__ */ jsx("li", {
|
|
1582
|
+
className: "px-2 py-1 text-sm italic text-gray-400",
|
|
1583
|
+
children: "No profiles assigned"
|
|
1584
|
+
})]
|
|
1585
|
+
}),
|
|
1586
|
+
available.length > 0 && /* @__PURE__ */ jsxs("select", {
|
|
1587
|
+
value: "",
|
|
1588
|
+
onChange: (e) => {
|
|
1589
|
+
if (e.target.value) props.onAdd(e.target.value);
|
|
1590
|
+
},
|
|
1591
|
+
className: "rounded border p-1 text-sm",
|
|
1592
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
1593
|
+
value: "",
|
|
1594
|
+
children: "+ Add profile…"
|
|
1595
|
+
}), available.map((p) => /* @__PURE__ */ jsxs("option", {
|
|
1596
|
+
value: p.id,
|
|
1597
|
+
children: [
|
|
1598
|
+
p.title,
|
|
1599
|
+
" (",
|
|
1600
|
+
p.id,
|
|
1601
|
+
")"
|
|
1602
|
+
]
|
|
1603
|
+
}, p.id))]
|
|
1604
|
+
})
|
|
1605
|
+
] });
|
|
1606
|
+
}
|
|
1607
|
+
function ChipListEditor(props) {
|
|
1608
|
+
const [input, setInput] = useState("");
|
|
1609
|
+
const valid = props.validator(input.trim());
|
|
1610
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
1611
|
+
/* @__PURE__ */ jsx("span", {
|
|
1612
|
+
className: "text-xs text-gray-600",
|
|
1613
|
+
children: props.label
|
|
1614
|
+
}),
|
|
1615
|
+
/* @__PURE__ */ jsx("p", {
|
|
1616
|
+
className: "text-xs text-gray-500",
|
|
1617
|
+
children: props.hint
|
|
1618
|
+
}),
|
|
1619
|
+
/* @__PURE__ */ jsx("div", {
|
|
1620
|
+
className: "my-1 flex flex-wrap items-center gap-1",
|
|
1621
|
+
children: props.values.map((v) => /* @__PURE__ */ jsxs("span", {
|
|
1622
|
+
className: "flex items-center gap-1 rounded bg-gray-100 px-2 py-1 font-mono text-xs",
|
|
1623
|
+
children: [v, /* @__PURE__ */ jsx("button", {
|
|
1624
|
+
className: "text-red-500 hover:text-red-700",
|
|
1625
|
+
onClick: () => props.onRemove(v),
|
|
1626
|
+
title: "Remove",
|
|
1627
|
+
children: "×"
|
|
1628
|
+
})]
|
|
1629
|
+
}, v))
|
|
1630
|
+
}),
|
|
1631
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1632
|
+
className: "flex items-center gap-2",
|
|
1633
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
1634
|
+
type: "text",
|
|
1635
|
+
placeholder: props.placeholder,
|
|
1636
|
+
value: input,
|
|
1637
|
+
onChange: (e) => setInput(e.target.value),
|
|
1638
|
+
onKeyDown: (e) => {
|
|
1639
|
+
if (e.key === "Enter" && valid) {
|
|
1640
|
+
props.onAdd(input.trim());
|
|
1641
|
+
setInput("");
|
|
1642
|
+
}
|
|
1643
|
+
},
|
|
1644
|
+
className: "flex-1 rounded border p-1 font-mono text-sm"
|
|
1645
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
1646
|
+
className: "rounded bg-blue-500 px-2 py-1 text-xs text-white hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1647
|
+
disabled: !valid,
|
|
1648
|
+
onClick: () => {
|
|
1649
|
+
props.onAdd(input.trim());
|
|
1650
|
+
setInput("");
|
|
1651
|
+
},
|
|
1652
|
+
children: "Add"
|
|
1653
|
+
})]
|
|
1654
|
+
})
|
|
1655
|
+
] });
|
|
1656
|
+
}
|
|
1095
1657
|
function AgentImageField(props) {
|
|
1096
1658
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
1097
1659
|
const dragDepthRef = useRef(0);
|
|
@@ -1192,6 +1754,12 @@ function AgentImageField(props) {
|
|
|
1192
1754
|
}
|
|
1193
1755
|
function ModelsSection(props) {
|
|
1194
1756
|
const [newModelId, setNewModelId] = useState("");
|
|
1757
|
+
const usersOf = (modelId) => {
|
|
1758
|
+
const u = [];
|
|
1759
|
+
if (props.main?.modelId === modelId) u.push(props.main.id);
|
|
1760
|
+
for (const s of props.subAgents) if (s.modelId === modelId) u.push(s.id);
|
|
1761
|
+
return u;
|
|
1762
|
+
};
|
|
1195
1763
|
const handleAdd = () => {
|
|
1196
1764
|
const id = newModelId.trim();
|
|
1197
1765
|
if (id) {
|
|
@@ -1208,7 +1776,7 @@ function ModelsSection(props) {
|
|
|
1208
1776
|
}),
|
|
1209
1777
|
/* @__PURE__ */ jsx("p", {
|
|
1210
1778
|
className: "text-sm text-gray-600",
|
|
1211
|
-
children: "Provider/model format (e.g. anthropic/claude-sonnet-4-5). Exactly one
|
|
1779
|
+
children: "Provider/model format (e.g. anthropic/claude-sonnet-4-5). Exactly one is the default."
|
|
1212
1780
|
}),
|
|
1213
1781
|
props.models.length > 0 && /* @__PURE__ */ jsxs("table", {
|
|
1214
1782
|
className: "mt-3 w-full text-sm",
|
|
@@ -1225,12 +1793,13 @@ function ModelsSection(props) {
|
|
|
1225
1793
|
}),
|
|
1226
1794
|
/* @__PURE__ */ jsx("th", {
|
|
1227
1795
|
className: "py-1",
|
|
1228
|
-
children: "
|
|
1796
|
+
children: "Used by"
|
|
1229
1797
|
}),
|
|
1230
1798
|
/* @__PURE__ */ jsx("th", { className: "py-1" })
|
|
1231
1799
|
]
|
|
1232
1800
|
}) }), /* @__PURE__ */ jsx("tbody", { children: props.models.map((m) => {
|
|
1233
|
-
const
|
|
1801
|
+
const users = usersOf(m.id);
|
|
1802
|
+
const inUse = users.length > 0;
|
|
1234
1803
|
return /* @__PURE__ */ jsxs("tr", {
|
|
1235
1804
|
className: "border-b border-gray-100",
|
|
1236
1805
|
children: [
|
|
@@ -1248,13 +1817,15 @@ function ModelsSection(props) {
|
|
|
1248
1817
|
children: m.id
|
|
1249
1818
|
}),
|
|
1250
1819
|
/* @__PURE__ */ jsx("td", {
|
|
1251
|
-
className: "py-2 text-gray-500",
|
|
1252
|
-
children:
|
|
1820
|
+
className: "py-2 text-xs text-gray-500",
|
|
1821
|
+
children: users.length === 0 ? /* @__PURE__ */ jsx("em", { children: "—" }) : users.join(", ")
|
|
1253
1822
|
}),
|
|
1254
1823
|
/* @__PURE__ */ jsx("td", {
|
|
1255
1824
|
className: "py-2 text-right",
|
|
1256
1825
|
children: /* @__PURE__ */ jsx("button", {
|
|
1257
|
-
className: "text-red-500 hover:text-red-700",
|
|
1826
|
+
className: "text-red-500 hover:text-red-700 disabled:cursor-not-allowed disabled:text-gray-300",
|
|
1827
|
+
disabled: inUse,
|
|
1828
|
+
title: inUse ? `In use by ${users.join(", ")}` : "",
|
|
1258
1829
|
onClick: () => props.removeModel(m.id),
|
|
1259
1830
|
children: "Remove"
|
|
1260
1831
|
})
|
|
@@ -1288,6 +1859,12 @@ function ProfilesSection(props) {
|
|
|
1288
1859
|
const [showAddForm, setShowAddForm] = useState(false);
|
|
1289
1860
|
const [newId, setNewId] = useState("");
|
|
1290
1861
|
const [newTitle, setNewTitle] = useState("");
|
|
1862
|
+
const usersOf = (profileId) => {
|
|
1863
|
+
const u = [];
|
|
1864
|
+
if (props.main?.profileIds.includes(profileId)) u.push(props.main.id);
|
|
1865
|
+
for (const s of props.subAgents) if (s.profileIds.includes(profileId)) u.push(s.id);
|
|
1866
|
+
return u;
|
|
1867
|
+
};
|
|
1291
1868
|
const handleAdd = () => {
|
|
1292
1869
|
const id = newId.trim();
|
|
1293
1870
|
const title = newTitle.trim();
|
|
@@ -1319,64 +1896,78 @@ function ProfilesSection(props) {
|
|
|
1319
1896
|
}),
|
|
1320
1897
|
/* @__PURE__ */ jsx("p", {
|
|
1321
1898
|
className: "text-sm text-gray-600",
|
|
1322
|
-
children: "Markdown sections that compose into
|
|
1899
|
+
children: "Markdown sections that compose into agents' instructions. Reference these from each agent's profile list."
|
|
1323
1900
|
}),
|
|
1324
|
-
props.profiles.map((profile, i) =>
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1901
|
+
props.profiles.map((profile, i) => {
|
|
1902
|
+
const users = usersOf(profile.id);
|
|
1903
|
+
const inUse = users.length > 0;
|
|
1904
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1905
|
+
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
1328
1906
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
1329
|
-
className: "flex items-center
|
|
1330
|
-
children: [/* @__PURE__ */
|
|
1331
|
-
className: "
|
|
1332
|
-
children:
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1907
|
+
className: "flex items-center justify-between",
|
|
1908
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1909
|
+
className: "flex items-center gap-2",
|
|
1910
|
+
children: [
|
|
1911
|
+
/* @__PURE__ */ jsx("span", {
|
|
1912
|
+
className: "rounded bg-gray-100 px-2 py-0.5 font-mono text-xs text-gray-500",
|
|
1913
|
+
children: profile.id
|
|
1914
|
+
}),
|
|
1915
|
+
/* @__PURE__ */ jsx("input", {
|
|
1916
|
+
type: "text",
|
|
1917
|
+
defaultValue: profile.title,
|
|
1918
|
+
onBlur: (e) => {
|
|
1919
|
+
const next = e.target.value.trim();
|
|
1920
|
+
if (next && next !== profile.title) props.updateProfile(profile.id, next);
|
|
1921
|
+
},
|
|
1922
|
+
onKeyDown: (e) => {
|
|
1923
|
+
if (e.key === "Enter") e.currentTarget.blur();
|
|
1924
|
+
},
|
|
1925
|
+
className: "border-b border-transparent font-semibold hover:border-gray-300 focus:border-blue-500"
|
|
1926
|
+
}),
|
|
1927
|
+
users.length > 0 && /* @__PURE__ */ jsxs("span", {
|
|
1928
|
+
className: "rounded bg-blue-50 px-2 py-0.5 text-xs text-blue-700",
|
|
1929
|
+
title: users.join(", "),
|
|
1930
|
+
children: ["used by: ", users.join(", ")]
|
|
1931
|
+
})
|
|
1932
|
+
]
|
|
1933
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1934
|
+
className: "flex items-center gap-1",
|
|
1935
|
+
children: [
|
|
1936
|
+
/* @__PURE__ */ jsx("button", {
|
|
1937
|
+
className: "px-1 text-gray-400 hover:text-gray-600 disabled:opacity-30",
|
|
1938
|
+
disabled: i === 0,
|
|
1939
|
+
onClick: () => moveUp(i),
|
|
1940
|
+
title: "Move up",
|
|
1941
|
+
children: "↑"
|
|
1942
|
+
}),
|
|
1943
|
+
/* @__PURE__ */ jsx("button", {
|
|
1944
|
+
className: "px-1 text-gray-400 hover:text-gray-600 disabled:opacity-30",
|
|
1945
|
+
disabled: i === props.profiles.length - 1,
|
|
1946
|
+
onClick: () => moveDown(i),
|
|
1947
|
+
title: "Move down",
|
|
1948
|
+
children: "↓"
|
|
1949
|
+
}),
|
|
1950
|
+
/* @__PURE__ */ jsx("button", {
|
|
1951
|
+
className: "ml-2 text-sm text-red-500 hover:text-red-700 disabled:cursor-not-allowed disabled:text-gray-300",
|
|
1952
|
+
disabled: inUse,
|
|
1953
|
+
title: inUse ? `In use by ${users.join(", ")}` : "",
|
|
1954
|
+
onClick: () => props.removeProfile(profile.id),
|
|
1955
|
+
children: "Remove"
|
|
1956
|
+
})
|
|
1957
|
+
]
|
|
1344
1958
|
})]
|
|
1345
|
-
}), /* @__PURE__ */
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
}),
|
|
1355
|
-
/* @__PURE__ */ jsx("button", {
|
|
1356
|
-
className: "px-1 text-gray-400 hover:text-gray-600 disabled:opacity-30",
|
|
1357
|
-
disabled: i === props.profiles.length - 1,
|
|
1358
|
-
onClick: () => moveDown(i),
|
|
1359
|
-
title: "Move down",
|
|
1360
|
-
children: "↓"
|
|
1361
|
-
}),
|
|
1362
|
-
/* @__PURE__ */ jsx("button", {
|
|
1363
|
-
className: "ml-2 text-sm text-red-500 hover:text-red-700",
|
|
1364
|
-
onClick: () => props.removeProfile(profile.id),
|
|
1365
|
-
children: "Remove"
|
|
1366
|
-
})
|
|
1367
|
-
]
|
|
1959
|
+
}), /* @__PURE__ */ jsx("textarea", {
|
|
1960
|
+
defaultValue: profile.content,
|
|
1961
|
+
onBlur: (e) => {
|
|
1962
|
+
const next = e.target.value;
|
|
1963
|
+
if (next !== profile.content) props.updateProfile(profile.id, void 0, next);
|
|
1964
|
+
},
|
|
1965
|
+
placeholder: "Markdown content for this profile section...",
|
|
1966
|
+
rows: 4,
|
|
1967
|
+
className: "mt-2 w-full rounded border border-gray-200 p-2 font-mono text-sm"
|
|
1368
1968
|
})]
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
|
-
onBlur: (e) => {
|
|
1372
|
-
const next = e.target.value;
|
|
1373
|
-
if (next !== profile.content) props.updateProfile(profile.id, void 0, next);
|
|
1374
|
-
},
|
|
1375
|
-
placeholder: "Markdown content for this profile section...",
|
|
1376
|
-
rows: 4,
|
|
1377
|
-
className: "mt-2 w-full rounded border border-gray-200 p-2 font-mono text-sm"
|
|
1378
|
-
})]
|
|
1379
|
-
}, profile.id)),
|
|
1969
|
+
}, profile.id);
|
|
1970
|
+
}),
|
|
1380
1971
|
showAddForm ? /* @__PURE__ */ jsx("div", {
|
|
1381
1972
|
className: "my-3 rounded border border-blue-200 bg-blue-50 p-4",
|
|
1382
1973
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -1594,44 +2185,52 @@ function PublishTab(props) {
|
|
|
1594
2185
|
}),
|
|
1595
2186
|
/* @__PURE__ */ jsx("hr", {}),
|
|
1596
2187
|
/* @__PURE__ */ jsxs("section", {
|
|
1597
|
-
className: "my-6
|
|
1598
|
-
children: [/* @__PURE__ */
|
|
1599
|
-
className: "text-
|
|
1600
|
-
children: "Document
|
|
1601
|
-
}), /* @__PURE__ */
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
2188
|
+
className: "my-6",
|
|
2189
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
2190
|
+
className: "text-lg font-semibold",
|
|
2191
|
+
children: "Document"
|
|
2192
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
2193
|
+
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
2194
|
+
children: [
|
|
2195
|
+
/* @__PURE__ */ jsxs("p", {
|
|
2196
|
+
className: "text-sm text-gray-600",
|
|
2197
|
+
children: ["Document ID: ", /* @__PURE__ */ jsx("span", {
|
|
2198
|
+
className: "font-mono",
|
|
2199
|
+
children: props.documentHeader.id
|
|
2200
|
+
})]
|
|
2201
|
+
}),
|
|
2202
|
+
/* @__PURE__ */ jsxs("p", {
|
|
2203
|
+
className: "text-sm text-gray-600",
|
|
2204
|
+
children: ["Type: ", /* @__PURE__ */ jsx("span", {
|
|
2205
|
+
className: "font-mono",
|
|
2206
|
+
children: props.documentHeader.documentType
|
|
2207
|
+
})]
|
|
2208
|
+
}),
|
|
2209
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2210
|
+
className: "mt-3 flex items-center gap-2",
|
|
2211
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2212
|
+
className: "text-sm text-gray-600",
|
|
2213
|
+
children: "Bump version to:"
|
|
2214
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
2215
|
+
type: "text",
|
|
2216
|
+
placeholder: "0.2.0",
|
|
2217
|
+
onKeyDown: (e) => {
|
|
2218
|
+
if (e.key === "Enter") {
|
|
2219
|
+
const v = e.currentTarget.value.trim();
|
|
2220
|
+
if (v) props.bumpVersion(v);
|
|
2221
|
+
e.currentTarget.value = "";
|
|
2222
|
+
}
|
|
2223
|
+
},
|
|
2224
|
+
className: "rounded border p-1 font-mono text-sm"
|
|
2225
|
+
})]
|
|
2226
|
+
})
|
|
2227
|
+
]
|
|
2228
|
+
})]
|
|
1614
2229
|
})
|
|
1615
2230
|
] });
|
|
1616
2231
|
}
|
|
1617
|
-
const KNOWN_RESOURCES = [
|
|
1618
|
-
"vetra-agent-s",
|
|
1619
|
-
"vetra-agent-m",
|
|
1620
|
-
"vetra-agent-l",
|
|
1621
|
-
"vetra-agent-xl",
|
|
1622
|
-
"vetra-agent-xxl"
|
|
1623
|
-
];
|
|
1624
2232
|
function DeploymentSection(props) {
|
|
1625
2233
|
const [newResource, setNewResource] = useState("");
|
|
1626
|
-
const { deployment } = props;
|
|
1627
|
-
const customResources = deployment.supportedResources.filter((r) => !KNOWN_RESOURCES.includes(r));
|
|
1628
|
-
const handleAddCustom = () => {
|
|
1629
|
-
const resource = newResource.trim();
|
|
1630
|
-
if (resource) {
|
|
1631
|
-
props.addSupportedResource(resource);
|
|
1632
|
-
setNewResource("");
|
|
1633
|
-
}
|
|
1634
|
-
};
|
|
1635
2234
|
return /* @__PURE__ */ jsxs("section", {
|
|
1636
2235
|
className: "my-6",
|
|
1637
2236
|
children: [
|
|
@@ -1640,17 +2239,17 @@ function DeploymentSection(props) {
|
|
|
1640
2239
|
children: "Deployment"
|
|
1641
2240
|
}),
|
|
1642
2241
|
/* @__PURE__ */ jsxs("div", {
|
|
1643
|
-
className: "my-3 rounded border border-gray-200 bg-white p-4
|
|
2242
|
+
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
1644
2243
|
children: [/* @__PURE__ */ jsx(Toggle, {
|
|
1645
|
-
label: "Proxy",
|
|
1646
|
-
checked: deployment.proxyEnabled,
|
|
1647
|
-
|
|
1648
|
-
|
|
2244
|
+
label: "Proxy enabled",
|
|
2245
|
+
checked: props.deployment.proxyEnabled,
|
|
2246
|
+
onChange: props.setProxyEnabled,
|
|
2247
|
+
hint: "Embedded reverse proxy"
|
|
1649
2248
|
}), /* @__PURE__ */ jsx(Toggle, {
|
|
1650
|
-
label: "Observability",
|
|
1651
|
-
checked: deployment.observabilityEnabled,
|
|
1652
|
-
|
|
1653
|
-
|
|
2249
|
+
label: "Observability enabled",
|
|
2250
|
+
checked: props.deployment.observabilityEnabled,
|
|
2251
|
+
onChange: props.setObservabilityEnabled,
|
|
2252
|
+
hint: "Sentry + OpenTelemetry"
|
|
1654
2253
|
})]
|
|
1655
2254
|
}),
|
|
1656
2255
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -1658,67 +2257,43 @@ function DeploymentSection(props) {
|
|
|
1658
2257
|
children: [
|
|
1659
2258
|
/* @__PURE__ */ jsx("h4", {
|
|
1660
2259
|
className: "text-base font-semibold",
|
|
1661
|
-
children: "Supported
|
|
1662
|
-
}),
|
|
1663
|
-
/* @__PURE__ */ jsx("p", {
|
|
1664
|
-
className: "text-sm text-gray-600",
|
|
1665
|
-
children: "Resource tiers this project supports."
|
|
2260
|
+
children: "Supported resources"
|
|
1666
2261
|
}),
|
|
1667
|
-
/* @__PURE__ */ jsx("
|
|
1668
|
-
className: "
|
|
1669
|
-
children:
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
className: "
|
|
1673
|
-
children:
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
1681
|
-
className: "font-mono text-sm",
|
|
1682
|
-
children: resource
|
|
1683
|
-
})]
|
|
1684
|
-
}, resource);
|
|
1685
|
-
})
|
|
1686
|
-
}),
|
|
1687
|
-
customResources.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
1688
|
-
className: "mt-3 border-t border-gray-100 pt-3",
|
|
1689
|
-
children: [/* @__PURE__ */ jsx("h5", {
|
|
1690
|
-
className: "text-sm font-medium text-gray-600",
|
|
1691
|
-
children: "Custom resources"
|
|
1692
|
-
}), /* @__PURE__ */ jsx("ul", {
|
|
1693
|
-
className: "mt-1 space-y-1",
|
|
1694
|
-
children: customResources.map((resource) => /* @__PURE__ */ jsxs("li", {
|
|
1695
|
-
className: "flex items-center gap-2 text-sm",
|
|
1696
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
1697
|
-
className: "font-mono",
|
|
1698
|
-
children: resource
|
|
1699
|
-
}), /* @__PURE__ */ jsx("button", {
|
|
1700
|
-
className: "text-xs text-red-400 hover:text-red-600",
|
|
1701
|
-
onClick: () => props.removeSupportedResource(resource),
|
|
1702
|
-
children: "x"
|
|
1703
|
-
})]
|
|
1704
|
-
}, resource))
|
|
1705
|
-
})]
|
|
2262
|
+
/* @__PURE__ */ jsx("ul", {
|
|
2263
|
+
className: "my-2 space-y-1",
|
|
2264
|
+
children: props.deployment.supportedResources.map((r) => /* @__PURE__ */ jsxs("li", {
|
|
2265
|
+
className: "flex items-center justify-between text-sm",
|
|
2266
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2267
|
+
className: "font-mono",
|
|
2268
|
+
children: r
|
|
2269
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
2270
|
+
className: "text-red-500 hover:text-red-700",
|
|
2271
|
+
onClick: () => props.removeSupportedResource(r),
|
|
2272
|
+
children: "Remove"
|
|
2273
|
+
})]
|
|
2274
|
+
}, r))
|
|
1706
2275
|
}),
|
|
1707
2276
|
/* @__PURE__ */ jsxs("div", {
|
|
1708
|
-
className: "mt-
|
|
2277
|
+
className: "mt-2 flex items-center gap-2",
|
|
1709
2278
|
children: [/* @__PURE__ */ jsx("input", {
|
|
1710
2279
|
type: "text",
|
|
1711
|
-
placeholder: "
|
|
2280
|
+
placeholder: "vetra-agent-...",
|
|
1712
2281
|
value: newResource,
|
|
1713
2282
|
onChange: (e) => setNewResource(e.target.value),
|
|
1714
2283
|
onKeyDown: (e) => {
|
|
1715
|
-
if (e.key === "Enter"
|
|
2284
|
+
if (e.key === "Enter" && newResource.trim()) {
|
|
2285
|
+
props.addSupportedResource(newResource.trim());
|
|
2286
|
+
setNewResource("");
|
|
2287
|
+
}
|
|
1716
2288
|
},
|
|
1717
|
-
className: "flex-1 rounded border p-
|
|
2289
|
+
className: "flex-1 rounded border p-1 font-mono text-sm"
|
|
1718
2290
|
}), /* @__PURE__ */ jsx("button", {
|
|
1719
|
-
className: "rounded bg-blue-500 px-
|
|
2291
|
+
className: "rounded bg-blue-500 px-2 py-1 text-xs text-white hover:bg-blue-600 disabled:opacity-50",
|
|
1720
2292
|
disabled: !newResource.trim(),
|
|
1721
|
-
onClick:
|
|
2293
|
+
onClick: () => {
|
|
2294
|
+
props.addSupportedResource(newResource.trim());
|
|
2295
|
+
setNewResource("");
|
|
2296
|
+
},
|
|
1722
2297
|
children: "Add"
|
|
1723
2298
|
})]
|
|
1724
2299
|
})
|
|
@@ -1728,17 +2303,13 @@ function DeploymentSection(props) {
|
|
|
1728
2303
|
});
|
|
1729
2304
|
}
|
|
1730
2305
|
function PackagesSection(props) {
|
|
1731
|
-
const [
|
|
2306
|
+
const [newPackage, setNewPackage] = useState("");
|
|
1732
2307
|
return /* @__PURE__ */ jsxs("section", {
|
|
1733
2308
|
className: "my-6",
|
|
1734
2309
|
children: [
|
|
1735
2310
|
/* @__PURE__ */ jsx("h3", {
|
|
1736
2311
|
className: "text-lg font-semibold",
|
|
1737
|
-
children: "
|
|
1738
|
-
}),
|
|
1739
|
-
/* @__PURE__ */ jsx("p", {
|
|
1740
|
-
className: "text-sm text-gray-600",
|
|
1741
|
-
children: "Reactor packages and their document types. Managed packages are framework-controlled."
|
|
2312
|
+
children: "Reactor Packages"
|
|
1742
2313
|
}),
|
|
1743
2314
|
props.packages.map((pkg) => /* @__PURE__ */ jsx(PackageCard, {
|
|
1744
2315
|
pkg,
|
|
@@ -1747,25 +2318,25 @@ function PackagesSection(props) {
|
|
|
1747
2318
|
removePackage: props.removePackage
|
|
1748
2319
|
}, pkg.id)),
|
|
1749
2320
|
/* @__PURE__ */ jsxs("div", {
|
|
1750
|
-
className: "
|
|
2321
|
+
className: "my-3 flex items-center gap-2",
|
|
1751
2322
|
children: [/* @__PURE__ */ jsx("input", {
|
|
1752
2323
|
type: "text",
|
|
1753
|
-
placeholder: "@
|
|
1754
|
-
value:
|
|
1755
|
-
onChange: (e) =>
|
|
2324
|
+
placeholder: "@scope/package-name",
|
|
2325
|
+
value: newPackage,
|
|
2326
|
+
onChange: (e) => setNewPackage(e.target.value),
|
|
1756
2327
|
onKeyDown: (e) => {
|
|
1757
|
-
if (e.key === "Enter" &&
|
|
1758
|
-
props.addPackage(
|
|
1759
|
-
|
|
2328
|
+
if (e.key === "Enter" && newPackage.trim()) {
|
|
2329
|
+
props.addPackage(newPackage.trim());
|
|
2330
|
+
setNewPackage("");
|
|
1760
2331
|
}
|
|
1761
2332
|
},
|
|
1762
2333
|
className: "flex-1 rounded border p-2 font-mono text-sm"
|
|
1763
2334
|
}), /* @__PURE__ */ jsx("button", {
|
|
1764
2335
|
className: "rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50",
|
|
1765
|
-
disabled: !
|
|
2336
|
+
disabled: !newPackage.trim(),
|
|
1766
2337
|
onClick: () => {
|
|
1767
|
-
props.addPackage(
|
|
1768
|
-
|
|
2338
|
+
props.addPackage(newPackage.trim());
|
|
2339
|
+
setNewPackage("");
|
|
1769
2340
|
},
|
|
1770
2341
|
children: "Add Package"
|
|
1771
2342
|
})]
|
|
@@ -1775,8 +2346,6 @@ function PackagesSection(props) {
|
|
|
1775
2346
|
}
|
|
1776
2347
|
function PackageCard(props) {
|
|
1777
2348
|
const [newDocType, setNewDocType] = useState("");
|
|
1778
|
-
const { pkg } = props;
|
|
1779
|
-
const hasWildcard = pkg.documentTypes.includes("*/*");
|
|
1780
2349
|
return /* @__PURE__ */ jsxs("div", {
|
|
1781
2350
|
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
1782
2351
|
children: [
|
|
@@ -1785,58 +2354,58 @@ function PackageCard(props) {
|
|
|
1785
2354
|
children: [/* @__PURE__ */ jsxs("div", { children: [
|
|
1786
2355
|
/* @__PURE__ */ jsx("span", {
|
|
1787
2356
|
className: "font-mono font-semibold",
|
|
1788
|
-
children: pkg.packageName
|
|
2357
|
+
children: props.pkg.packageName
|
|
1789
2358
|
}),
|
|
1790
|
-
pkg.managed && /* @__PURE__ */ jsx("span", {
|
|
2359
|
+
props.pkg.managed && /* @__PURE__ */ jsx("span", {
|
|
1791
2360
|
className: "ml-2 rounded bg-blue-100 px-2 py-0.5 text-xs text-blue-700",
|
|
1792
2361
|
children: "managed"
|
|
1793
2362
|
}),
|
|
1794
|
-
pkg.version && /* @__PURE__ */ jsxs("span", {
|
|
1795
|
-
className: "ml-2 text-
|
|
1796
|
-
children: ["v", pkg.version]
|
|
2363
|
+
props.pkg.version && /* @__PURE__ */ jsxs("span", {
|
|
2364
|
+
className: "ml-2 text-sm text-gray-500",
|
|
2365
|
+
children: ["v", props.pkg.version]
|
|
1797
2366
|
})
|
|
1798
|
-
] }), !pkg.managed && /* @__PURE__ */ jsx("button", {
|
|
2367
|
+
] }), !props.pkg.managed && /* @__PURE__ */ jsx("button", {
|
|
1799
2368
|
className: "text-sm text-red-500 hover:text-red-700",
|
|
1800
|
-
onClick: () => props.removePackage(pkg.id),
|
|
1801
|
-
children: "Remove"
|
|
2369
|
+
onClick: () => props.removePackage(props.pkg.id),
|
|
2370
|
+
children: "Remove Package"
|
|
1802
2371
|
})]
|
|
1803
2372
|
}),
|
|
1804
|
-
|
|
1805
|
-
className: "
|
|
1806
|
-
children: pkg.documentTypes.map((dt) => /* @__PURE__ */ jsxs("li", {
|
|
1807
|
-
className: "flex items-center
|
|
2373
|
+
/* @__PURE__ */ jsx("ul", {
|
|
2374
|
+
className: "my-2 space-y-1",
|
|
2375
|
+
children: props.pkg.documentTypes.map((dt) => /* @__PURE__ */ jsxs("li", {
|
|
2376
|
+
className: "flex items-center justify-between text-sm",
|
|
1808
2377
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1809
2378
|
className: "font-mono",
|
|
1810
|
-
children: dt
|
|
2379
|
+
children: dt
|
|
1811
2380
|
}), /* @__PURE__ */ jsx("button", {
|
|
1812
|
-
className: "text-
|
|
1813
|
-
onClick: () => props.removeDocType(pkg.id, dt),
|
|
1814
|
-
children: "
|
|
2381
|
+
className: "text-red-500 hover:text-red-700",
|
|
2382
|
+
onClick: () => props.removeDocType(props.pkg.id, dt),
|
|
2383
|
+
children: "×"
|
|
1815
2384
|
})]
|
|
1816
2385
|
}, dt))
|
|
1817
2386
|
}),
|
|
1818
|
-
|
|
2387
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1819
2388
|
className: "mt-2 flex items-center gap-2",
|
|
1820
2389
|
children: [/* @__PURE__ */ jsx("input", {
|
|
1821
2390
|
type: "text",
|
|
1822
|
-
placeholder: "org/
|
|
2391
|
+
placeholder: "org/doc-type or */*",
|
|
1823
2392
|
value: newDocType,
|
|
1824
2393
|
onChange: (e) => setNewDocType(e.target.value),
|
|
1825
2394
|
onKeyDown: (e) => {
|
|
1826
2395
|
if (e.key === "Enter" && newDocType.trim()) {
|
|
1827
|
-
props.addDocType(pkg.id, newDocType.trim());
|
|
2396
|
+
props.addDocType(props.pkg.id, newDocType.trim());
|
|
1828
2397
|
setNewDocType("");
|
|
1829
2398
|
}
|
|
1830
2399
|
},
|
|
1831
2400
|
className: "flex-1 rounded border p-1 font-mono text-sm"
|
|
1832
2401
|
}), /* @__PURE__ */ jsx("button", {
|
|
1833
|
-
className: "
|
|
2402
|
+
className: "rounded bg-blue-500 px-2 py-1 text-xs text-white hover:bg-blue-600 disabled:opacity-50",
|
|
1834
2403
|
disabled: !newDocType.trim(),
|
|
1835
2404
|
onClick: () => {
|
|
1836
|
-
props.addDocType(pkg.id, newDocType.trim());
|
|
2405
|
+
props.addDocType(props.pkg.id, newDocType.trim());
|
|
1837
2406
|
setNewDocType("");
|
|
1838
2407
|
},
|
|
1839
|
-
children: "
|
|
2408
|
+
children: "Add Doc Type"
|
|
1840
2409
|
})]
|
|
1841
2410
|
})
|
|
1842
2411
|
]
|
|
@@ -1844,16 +2413,11 @@ function PackageCard(props) {
|
|
|
1844
2413
|
}
|
|
1845
2414
|
function StatusBadge(props) {
|
|
1846
2415
|
return /* @__PURE__ */ jsx("span", {
|
|
1847
|
-
className: `rounded px-2 py-0.5 text-xs ${
|
|
1848
|
-
Pending: "bg-yellow-100 text-yellow-700",
|
|
1849
|
-
InProgress: "bg-blue-100 text-blue-700",
|
|
1850
|
-
Succeeded: "bg-green-100 text-green-700",
|
|
1851
|
-
Failed: "bg-red-100 text-red-700"
|
|
1852
|
-
}[props.status] ?? "bg-gray-100 text-gray-700"}`,
|
|
2416
|
+
className: `rounded px-2 py-0.5 text-xs ${props.status === "Succeeded" ? "bg-green-100 text-green-700" : props.status === "Failed" ? "bg-red-100 text-red-700" : props.status === "InProgress" ? "bg-amber-100 text-amber-700" : "bg-gray-100 text-gray-700"}`,
|
|
1853
2417
|
children: props.status
|
|
1854
2418
|
});
|
|
1855
2419
|
}
|
|
1856
2420
|
//#endregion
|
|
1857
2421
|
export { Editor as default };
|
|
1858
2422
|
|
|
1859
|
-
//# sourceMappingURL=editor-
|
|
2423
|
+
//# sourceMappingURL=editor-CAZmaheq.js.map
|