@andrewyang/ai-workflow-editor 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/.nuxt/app.config.mjs +18 -0
  2. package/.nuxt/components.d.ts +910 -0
  3. package/.nuxt/dev/index.mjs +4103 -0
  4. package/.nuxt/dev/index.mjs.map +1 -0
  5. package/.nuxt/dist/server/client.manifest.mjs +4 -0
  6. package/.nuxt/dist/server/client.precomputed.mjs +1 -0
  7. package/.nuxt/dist/server/server.mjs +1 -0
  8. package/.nuxt/i18n-route-resources.mjs +3 -0
  9. package/.nuxt/imports.d.ts +43 -0
  10. package/.nuxt/manifest/latest.json +1 -0
  11. package/.nuxt/manifest/meta/dev.json +1 -0
  12. package/.nuxt/nitro.json +17 -0
  13. package/.nuxt/nuxt.d.ts +24 -0
  14. package/.nuxt/nuxt.json +9 -0
  15. package/.nuxt/schema/nuxt.schema.d.ts +17 -0
  16. package/.nuxt/schema/nuxt.schema.json +3 -0
  17. package/.nuxt/tsconfig.json +234 -0
  18. package/.nuxt/tsconfig.server.json +185 -0
  19. package/.nuxt/types/app-defaults.d.ts +7 -0
  20. package/.nuxt/types/app.config.d.ts +31 -0
  21. package/.nuxt/types/build.d.ts +29 -0
  22. package/.nuxt/types/builder-env.d.ts +1 -0
  23. package/.nuxt/types/components.d.ts +915 -0
  24. package/.nuxt/types/i18n-plugin.d.ts +123 -0
  25. package/.nuxt/types/imports.d.ts +993 -0
  26. package/.nuxt/types/middleware.d.ts +17 -0
  27. package/.nuxt/types/nitro-config.d.ts +14 -0
  28. package/.nuxt/types/nitro-imports.d.ts +170 -0
  29. package/.nuxt/types/nitro-layouts.d.ts +17 -0
  30. package/.nuxt/types/nitro-nuxt.d.ts +39 -0
  31. package/.nuxt/types/nitro-routes.d.ts +17 -0
  32. package/.nuxt/types/nitro.d.ts +3 -0
  33. package/.nuxt/types/plugins.d.ts +43 -0
  34. package/.nuxt/types/schema.d.ts +213 -0
  35. package/.nuxt/types/vue-shim.d.ts +0 -0
  36. package/.trae/rules/rule.md +38 -0
  37. package/.vscode/settings.json +5 -0
  38. package/nuxt.config.ts +38 -0
  39. package/package.json +42 -0
  40. package/pnpm-lock.yaml +24 -0
  41. package/src/app.vue +46 -0
  42. package/src/components/AiWorkflowEditor.vue +142 -0
  43. package/src/components/ai/AiChatPanel.vue +135 -0
  44. package/src/components/ai/AiGenerator.vue +62 -0
  45. package/src/components/editor/Canvas.vue +175 -0
  46. package/src/components/editor/FormatPanel.vue +327 -0
  47. package/src/components/editor/NodePanel.vue +240 -0
  48. package/src/components/editor/PropertyPanel.vue +348 -0
  49. package/src/components/editor/Toolbar.vue +49 -0
  50. package/src/components/editor/nodes/AiNode.vue +77 -0
  51. package/src/components/editor/nodes/NormalNode.vue +75 -0
  52. package/src/components/editor/nodes/SysmlBlockNode.vue +72 -0
  53. package/src/components/editor/nodes/SysmlRequirementNode.vue +72 -0
  54. package/src/components/editor/nodes/SysmlUseCaseNode.vue +62 -0
  55. package/src/composables/useAi.ts +82 -0
  56. package/src/i18n.config.ts +5 -0
  57. package/src/locales/en.json +106 -0
  58. package/src/locales/zh.json +106 -0
  59. package/src/plugins/aiWorkflowEditor.ts +6 -0
  60. package/src/types/ai.ts +7 -0
  61. package/src/types/workflow.ts +25 -0
  62. package/src/utils/llmAdapter.ts +46 -0
  63. package/tsconfig.json +3 -0
  64. package/uno.config.ts +15 -0
  65. package//345/211/215/347/253/257/345/256/232/345/210/266/345/274/200/345/217/221/357/274/232ai-workflow-editor/345/274/200/345/217/221/350/256/241/345/210/222.md +655 -0
@@ -0,0 +1,17 @@
1
+ declare module 'nitropack' {
2
+ interface NitroRouteConfig {
3
+ appMiddleware?: string | string[] | Record<string, boolean>
4
+ }
5
+ interface NitroRouteRules {
6
+ appMiddleware?: string | string[] | Record<string, boolean>
7
+ }
8
+ }
9
+ declare module 'nitropack/types' {
10
+ interface NitroRouteConfig {
11
+ appMiddleware?: string | string[] | Record<string, boolean>
12
+ }
13
+ interface NitroRouteRules {
14
+ appMiddleware?: string | string[] | Record<string, boolean>
15
+ }
16
+ }
17
+ export {}
@@ -0,0 +1,14 @@
1
+ // Generated by nitro
2
+
3
+ // App Config
4
+ import type { Defu } from 'defu'
5
+
6
+
7
+
8
+ type UserAppConfig = Defu<{}, []>
9
+
10
+ declare module "nitropack/types" {
11
+ interface AppConfig extends UserAppConfig {}
12
+
13
+ }
14
+ export {}
@@ -0,0 +1,170 @@
1
+ declare global {
2
+ const H3Error: typeof import('../../node_modules/h3').H3Error
3
+ const H3Event: typeof import('../../node_modules/h3').H3Event
4
+ const __buildAssetsURL: typeof import('../../node_modules/@nuxt/nitro-server/dist/runtime/utils/paths').buildAssetsURL
5
+ const __publicAssetsURL: typeof import('../../node_modules/@nuxt/nitro-server/dist/runtime/utils/paths').publicAssetsURL
6
+ const appendCorsHeaders: typeof import('../../node_modules/h3').appendCorsHeaders
7
+ const appendCorsPreflightHeaders: typeof import('../../node_modules/h3').appendCorsPreflightHeaders
8
+ const appendHeader: typeof import('../../node_modules/h3').appendHeader
9
+ const appendHeaders: typeof import('../../node_modules/h3').appendHeaders
10
+ const appendResponseHeader: typeof import('../../node_modules/h3').appendResponseHeader
11
+ const appendResponseHeaders: typeof import('../../node_modules/h3').appendResponseHeaders
12
+ const assertMethod: typeof import('../../node_modules/h3').assertMethod
13
+ const cachedEventHandler: typeof import('../../node_modules/nitropack/dist/runtime/internal/cache').cachedEventHandler
14
+ const cachedFunction: typeof import('../../node_modules/nitropack/dist/runtime/internal/cache').cachedFunction
15
+ const callNodeListener: typeof import('../../node_modules/h3').callNodeListener
16
+ const clearResponseHeaders: typeof import('../../node_modules/h3').clearResponseHeaders
17
+ const clearSession: typeof import('../../node_modules/h3').clearSession
18
+ const createApp: typeof import('../../node_modules/h3').createApp
19
+ const createAppEventHandler: typeof import('../../node_modules/h3').createAppEventHandler
20
+ const createError: typeof import('../../node_modules/h3').createError
21
+ const createEvent: typeof import('../../node_modules/h3').createEvent
22
+ const createEventStream: typeof import('../../node_modules/h3').createEventStream
23
+ const createRouter: typeof import('../../node_modules/h3').createRouter
24
+ const defaultContentType: typeof import('../../node_modules/h3').defaultContentType
25
+ const defineAppConfig: typeof import('../../node_modules/@nuxt/nitro-server/dist/runtime/utils/config').defineAppConfig
26
+ const defineCachedEventHandler: typeof import('../../node_modules/nitropack/dist/runtime/internal/cache').defineCachedEventHandler
27
+ const defineCachedFunction: typeof import('../../node_modules/nitropack/dist/runtime/internal/cache').defineCachedFunction
28
+ const defineEventHandler: typeof import('../../node_modules/h3').defineEventHandler
29
+ const defineI18nConfig: typeof import('../../node_modules/@nuxtjs/i18n/dist/runtime/composables/shared').defineI18nConfig
30
+ const defineI18nLocale: typeof import('../../node_modules/@nuxtjs/i18n/dist/runtime/composables/shared').defineI18nLocale
31
+ const defineI18nLocaleDetector: typeof import('../../node_modules/@nuxtjs/i18n/dist/runtime/composables/server').defineI18nLocaleDetector
32
+ const defineLazyEventHandler: typeof import('../../node_modules/h3').defineLazyEventHandler
33
+ const defineNitroErrorHandler: typeof import('../../node_modules/nitropack/dist/runtime/internal/error/utils').defineNitroErrorHandler
34
+ const defineNitroPlugin: typeof import('../../node_modules/nitropack/dist/runtime/internal/plugin').defineNitroPlugin
35
+ const defineNodeListener: typeof import('../../node_modules/h3').defineNodeListener
36
+ const defineNodeMiddleware: typeof import('../../node_modules/h3').defineNodeMiddleware
37
+ const defineRenderHandler: typeof import('../../node_modules/nitropack/dist/runtime/internal/renderer').defineRenderHandler
38
+ const defineRequestMiddleware: typeof import('../../node_modules/h3').defineRequestMiddleware
39
+ const defineResponseMiddleware: typeof import('../../node_modules/h3').defineResponseMiddleware
40
+ const defineRouteMeta: typeof import('../../node_modules/nitropack/dist/runtime/internal/meta').defineRouteMeta
41
+ const defineTask: typeof import('../../node_modules/nitropack/dist/runtime/internal/task').defineTask
42
+ const defineWebSocket: typeof import('../../node_modules/h3').defineWebSocket
43
+ const defineWebSocketHandler: typeof import('../../node_modules/h3').defineWebSocketHandler
44
+ const deleteCookie: typeof import('../../node_modules/h3').deleteCookie
45
+ const dynamicEventHandler: typeof import('../../node_modules/h3').dynamicEventHandler
46
+ const eventHandler: typeof import('../../node_modules/h3').eventHandler
47
+ const fetchWithEvent: typeof import('../../node_modules/h3').fetchWithEvent
48
+ const fromNodeMiddleware: typeof import('../../node_modules/h3').fromNodeMiddleware
49
+ const fromPlainHandler: typeof import('../../node_modules/h3').fromPlainHandler
50
+ const fromWebHandler: typeof import('../../node_modules/h3').fromWebHandler
51
+ const getCookie: typeof import('../../node_modules/h3').getCookie
52
+ const getCookieLocale: typeof import('../../node_modules/@intlify/utils/dist/h3').getCookieLocale
53
+ const getHeader: typeof import('../../node_modules/h3').getHeader
54
+ const getHeaderLanguage: typeof import('../../node_modules/@intlify/utils/dist/h3').getHeaderLanguage
55
+ const getHeaderLanguages: typeof import('../../node_modules/@intlify/utils/dist/h3').getHeaderLanguages
56
+ const getHeaderLocale: typeof import('../../node_modules/@intlify/utils/dist/h3').getHeaderLocale
57
+ const getHeaderLocales: typeof import('../../node_modules/@intlify/utils/dist/h3').getHeaderLocales
58
+ const getHeaders: typeof import('../../node_modules/h3').getHeaders
59
+ const getMethod: typeof import('../../node_modules/h3').getMethod
60
+ const getPathLocale: typeof import('../../node_modules/@intlify/utils/dist/h3').getPathLocale
61
+ const getProxyRequestHeaders: typeof import('../../node_modules/h3').getProxyRequestHeaders
62
+ const getQuery: typeof import('../../node_modules/h3').getQuery
63
+ const getQueryLocale: typeof import('../../node_modules/@intlify/utils/dist/h3').getQueryLocale
64
+ const getRequestFingerprint: typeof import('../../node_modules/h3').getRequestFingerprint
65
+ const getRequestHeader: typeof import('../../node_modules/h3').getRequestHeader
66
+ const getRequestHeaders: typeof import('../../node_modules/h3').getRequestHeaders
67
+ const getRequestHost: typeof import('../../node_modules/h3').getRequestHost
68
+ const getRequestIP: typeof import('../../node_modules/h3').getRequestIP
69
+ const getRequestPath: typeof import('../../node_modules/h3').getRequestPath
70
+ const getRequestProtocol: typeof import('../../node_modules/h3').getRequestProtocol
71
+ const getRequestURL: typeof import('../../node_modules/h3').getRequestURL
72
+ const getRequestWebStream: typeof import('../../node_modules/h3').getRequestWebStream
73
+ const getResponseHeader: typeof import('../../node_modules/h3').getResponseHeader
74
+ const getResponseHeaders: typeof import('../../node_modules/h3').getResponseHeaders
75
+ const getResponseStatus: typeof import('../../node_modules/h3').getResponseStatus
76
+ const getResponseStatusText: typeof import('../../node_modules/h3').getResponseStatusText
77
+ const getRouteRules: typeof import('../../node_modules/nitropack/dist/runtime/internal/route-rules').getRouteRules
78
+ const getRouterParam: typeof import('../../node_modules/h3').getRouterParam
79
+ const getRouterParams: typeof import('../../node_modules/h3').getRouterParams
80
+ const getSession: typeof import('../../node_modules/h3').getSession
81
+ const getValidatedQuery: typeof import('../../node_modules/h3').getValidatedQuery
82
+ const getValidatedRouterParams: typeof import('../../node_modules/h3').getValidatedRouterParams
83
+ const handleCacheHeaders: typeof import('../../node_modules/h3').handleCacheHeaders
84
+ const handleCors: typeof import('../../node_modules/h3').handleCors
85
+ const isCorsOriginAllowed: typeof import('../../node_modules/h3').isCorsOriginAllowed
86
+ const isError: typeof import('../../node_modules/h3').isError
87
+ const isEvent: typeof import('../../node_modules/h3').isEvent
88
+ const isEventHandler: typeof import('../../node_modules/h3').isEventHandler
89
+ const isMethod: typeof import('../../node_modules/h3').isMethod
90
+ const isPreflightRequest: typeof import('../../node_modules/h3').isPreflightRequest
91
+ const isStream: typeof import('../../node_modules/h3').isStream
92
+ const isWebResponse: typeof import('../../node_modules/h3').isWebResponse
93
+ const lazyEventHandler: typeof import('../../node_modules/h3').lazyEventHandler
94
+ const nitroPlugin: typeof import('../../node_modules/nitropack/dist/runtime/internal/plugin').nitroPlugin
95
+ const parseCookies: typeof import('../../node_modules/h3').parseCookies
96
+ const promisifyNodeListener: typeof import('../../node_modules/h3').promisifyNodeListener
97
+ const proxyRequest: typeof import('../../node_modules/h3').proxyRequest
98
+ const readBody: typeof import('../../node_modules/h3').readBody
99
+ const readFormData: typeof import('../../node_modules/h3').readFormData
100
+ const readMultipartFormData: typeof import('../../node_modules/h3').readMultipartFormData
101
+ const readRawBody: typeof import('../../node_modules/h3').readRawBody
102
+ const readValidatedBody: typeof import('../../node_modules/h3').readValidatedBody
103
+ const removeResponseHeader: typeof import('../../node_modules/h3').removeResponseHeader
104
+ const runTask: typeof import('../../node_modules/nitropack/dist/runtime/internal/task').runTask
105
+ const sanitizeStatusCode: typeof import('../../node_modules/h3').sanitizeStatusCode
106
+ const sanitizeStatusMessage: typeof import('../../node_modules/h3').sanitizeStatusMessage
107
+ const sealSession: typeof import('../../node_modules/h3').sealSession
108
+ const send: typeof import('../../node_modules/h3').send
109
+ const sendError: typeof import('../../node_modules/h3').sendError
110
+ const sendIterable: typeof import('../../node_modules/h3').sendIterable
111
+ const sendNoContent: typeof import('../../node_modules/h3').sendNoContent
112
+ const sendProxy: typeof import('../../node_modules/h3').sendProxy
113
+ const sendRedirect: typeof import('../../node_modules/h3').sendRedirect
114
+ const sendStream: typeof import('../../node_modules/h3').sendStream
115
+ const sendWebResponse: typeof import('../../node_modules/h3').sendWebResponse
116
+ const serveStatic: typeof import('../../node_modules/h3').serveStatic
117
+ const setCookie: typeof import('../../node_modules/h3').setCookie
118
+ const setCookieLocale: typeof import('../../node_modules/@intlify/utils/dist/h3').setCookieLocale
119
+ const setHeader: typeof import('../../node_modules/h3').setHeader
120
+ const setHeaders: typeof import('../../node_modules/h3').setHeaders
121
+ const setResponseHeader: typeof import('../../node_modules/h3').setResponseHeader
122
+ const setResponseHeaders: typeof import('../../node_modules/h3').setResponseHeaders
123
+ const setResponseStatus: typeof import('../../node_modules/h3').setResponseStatus
124
+ const splitCookiesString: typeof import('../../node_modules/h3').splitCookiesString
125
+ const toEventHandler: typeof import('../../node_modules/h3').toEventHandler
126
+ const toNodeListener: typeof import('../../node_modules/h3').toNodeListener
127
+ const toPlainHandler: typeof import('../../node_modules/h3').toPlainHandler
128
+ const toWebHandler: typeof import('../../node_modules/h3').toWebHandler
129
+ const toWebRequest: typeof import('../../node_modules/h3').toWebRequest
130
+ const tryCookieLocale: typeof import('../../node_modules/@intlify/utils/dist/h3').tryCookieLocale
131
+ const tryHeaderLocale: typeof import('../../node_modules/@intlify/utils/dist/h3').tryHeaderLocale
132
+ const tryHeaderLocales: typeof import('../../node_modules/@intlify/utils/dist/h3').tryHeaderLocales
133
+ const tryPathLocale: typeof import('../../node_modules/@intlify/utils/dist/h3').tryPathLocale
134
+ const tryQueryLocale: typeof import('../../node_modules/@intlify/utils/dist/h3').tryQueryLocale
135
+ const unsealSession: typeof import('../../node_modules/h3').unsealSession
136
+ const updateSession: typeof import('../../node_modules/h3').updateSession
137
+ const useAppConfig: typeof import('../../node_modules/nitropack/dist/runtime/internal/config').useAppConfig
138
+ const useBase: typeof import('../../node_modules/h3').useBase
139
+ const useEvent: typeof import('../../node_modules/nitropack/dist/runtime/internal/context').useEvent
140
+ const useNitroApp: typeof import('../../node_modules/nitropack/dist/runtime/internal/app').useNitroApp
141
+ const useRuntimeConfig: typeof import('../../node_modules/nitropack/dist/runtime/internal/config').useRuntimeConfig
142
+ const useSession: typeof import('../../node_modules/h3').useSession
143
+ const useStorage: typeof import('../../node_modules/nitropack/dist/runtime/internal/storage').useStorage
144
+ const useTranslation: typeof import('../../node_modules/@intlify/h3').useTranslation
145
+ const writeEarlyHints: typeof import('../../node_modules/h3').writeEarlyHints
146
+ }
147
+ // for type re-export
148
+ declare global {
149
+ // @ts-ignore
150
+ export type { EventHandler, EventHandlerRequest, EventHandlerResponse, EventHandlerObject, H3EventContext } from '../../node_modules/h3'
151
+ import('../../node_modules/h3')
152
+ }
153
+ export { H3Event, H3Error, appendCorsHeaders, appendCorsPreflightHeaders, appendHeader, appendHeaders, appendResponseHeader, appendResponseHeaders, assertMethod, callNodeListener, clearResponseHeaders, clearSession, createApp, createAppEventHandler, createError, createEvent, createEventStream, createRouter, defaultContentType, defineEventHandler, defineLazyEventHandler, defineNodeListener, defineNodeMiddleware, defineRequestMiddleware, defineResponseMiddleware, defineWebSocket, defineWebSocketHandler, deleteCookie, dynamicEventHandler, eventHandler, fetchWithEvent, fromNodeMiddleware, fromPlainHandler, fromWebHandler, getCookie, getHeader, getHeaders, getMethod, getProxyRequestHeaders, getQuery, getRequestFingerprint, getRequestHeader, getRequestHeaders, getRequestHost, getRequestIP, getRequestPath, getRequestProtocol, getRequestURL, getRequestWebStream, getResponseHeader, getResponseHeaders, getResponseStatus, getResponseStatusText, getRouterParam, getRouterParams, getSession, getValidatedQuery, getValidatedRouterParams, handleCacheHeaders, handleCors, isCorsOriginAllowed, isError, isEvent, isEventHandler, isMethod, isPreflightRequest, isStream, isWebResponse, lazyEventHandler, parseCookies, promisifyNodeListener, proxyRequest, readBody, readFormData, readMultipartFormData, readRawBody, readValidatedBody, removeResponseHeader, sanitizeStatusCode, sanitizeStatusMessage, sealSession, send, sendError, sendIterable, sendNoContent, sendProxy, sendRedirect, sendStream, sendWebResponse, serveStatic, setCookie, setHeader, setHeaders, setResponseHeader, setResponseHeaders, setResponseStatus, splitCookiesString, toEventHandler, toNodeListener, toPlainHandler, toWebHandler, toWebRequest, unsealSession, updateSession, useBase, useSession, writeEarlyHints } from 'h3';
154
+ export { useNitroApp } from 'nitropack/runtime/internal/app';
155
+ export { useRuntimeConfig, useAppConfig } from 'nitropack/runtime/internal/config';
156
+ export { defineNitroPlugin, nitroPlugin } from 'nitropack/runtime/internal/plugin';
157
+ export { defineCachedFunction, defineCachedEventHandler, cachedFunction, cachedEventHandler } from 'nitropack/runtime/internal/cache';
158
+ export { useStorage } from 'nitropack/runtime/internal/storage';
159
+ export { defineRenderHandler } from 'nitropack/runtime/internal/renderer';
160
+ export { defineRouteMeta } from 'nitropack/runtime/internal/meta';
161
+ export { getRouteRules } from 'nitropack/runtime/internal/route-rules';
162
+ export { useEvent } from 'nitropack/runtime/internal/context';
163
+ export { defineTask, runTask } from 'nitropack/runtime/internal/task';
164
+ export { defineNitroErrorHandler } from 'nitropack/runtime/internal/error/utils';
165
+ export { buildAssetsURL as __buildAssetsURL, publicAssetsURL as __publicAssetsURL } from 'D:/work/ai-workflow-editor/node_modules/@nuxt/nitro-server/dist/runtime/utils/paths';
166
+ export { defineAppConfig } from 'D:/work/ai-workflow-editor/node_modules/@nuxt/nitro-server/dist/runtime/utils/config';
167
+ export { defineI18nLocale, defineI18nConfig } from 'D:/work/ai-workflow-editor/node_modules/@nuxtjs/i18n/dist/runtime/composables/shared';
168
+ export { defineI18nLocaleDetector } from 'D:/work/ai-workflow-editor/node_modules/@nuxtjs/i18n/dist/runtime/composables/server';
169
+ export { useTranslation } from '@intlify/h3';
170
+ export { getCookieLocale, getHeaderLanguage, getHeaderLanguages, getHeaderLocale, getHeaderLocales, getPathLocale, getQueryLocale, setCookieLocale, tryCookieLocale, tryHeaderLocale, tryHeaderLocales, tryPathLocale, tryQueryLocale } from '@intlify/utils/h3';
@@ -0,0 +1,17 @@
1
+ export type LayoutKey = string
2
+ declare module 'nitropack' {
3
+ interface NitroRouteConfig {
4
+ appLayout?: LayoutKey | false
5
+ }
6
+ interface NitroRouteRules {
7
+ appLayout?: LayoutKey | false
8
+ }
9
+ }
10
+ declare module 'nitropack/types' {
11
+ interface NitroRouteConfig {
12
+ appLayout?: LayoutKey | false
13
+ }
14
+ interface NitroRouteRules {
15
+ appLayout?: LayoutKey | false
16
+ }
17
+ }
@@ -0,0 +1,39 @@
1
+
2
+ /// <reference path="nitro-layouts.d.ts" />
3
+ /// <reference path="app.config.d.ts" />
4
+ /// <reference path="runtime-config.d.ts" />
5
+ /// <reference path="../../node_modules/@nuxt/nitro-server/dist/index.d.mts" />
6
+ /// <reference path="middleware.d.ts" />
7
+ /// <reference path="./schema.d.ts" />
8
+
9
+ import type { RuntimeConfig } from 'nuxt/schema'
10
+ import type { H3Event } from 'h3'
11
+ import type { LogObject } from 'consola'
12
+ import type { NuxtIslandContext, NuxtIslandResponse, NuxtRenderHTMLContext } from 'nuxt/app'
13
+
14
+ declare module 'nitropack' {
15
+ interface NitroRuntimeConfigApp {
16
+ buildAssetsDir: string
17
+ cdnURL: string
18
+ }
19
+ interface NitroRuntimeConfig extends RuntimeConfig {}
20
+ interface NitroRouteConfig {
21
+ ssr?: boolean
22
+ noScripts?: boolean
23
+ /** @deprecated Use `noScripts` instead */
24
+ experimentalNoScripts?: boolean
25
+ }
26
+ interface NitroRouteRules {
27
+ ssr?: boolean
28
+ noScripts?: boolean
29
+ /** @deprecated Use `noScripts` instead */
30
+ experimentalNoScripts?: boolean
31
+ appMiddleware?: Record<string, boolean>
32
+ appLayout?: string | false
33
+ }
34
+ interface NitroRuntimeHooks {
35
+ 'dev:ssr-logs': (ctx: { logs: LogObject[], path: string }) => void | Promise<void>
36
+ 'render:html': (htmlContext: NuxtRenderHTMLContext, context: { event: H3Event }) => void | Promise<void>
37
+ 'render:island': (islandResponse: NuxtIslandResponse, context: { event: H3Event, islandContext: NuxtIslandContext }) => void | Promise<void>
38
+ }
39
+ }
@@ -0,0 +1,17 @@
1
+ // Generated by nitro
2
+ import type { Serialize, Simplify } from "nitropack/types";
3
+ declare module "nitropack/types" {
4
+ type Awaited<T> = T extends PromiseLike<infer U> ? Awaited<U> : T
5
+ interface InternalApi {
6
+ '/__nuxt_error': {
7
+ 'default': Simplify<Serialize<Awaited<ReturnType<typeof import('../../node_modules/@nuxt/nitro-server/dist/runtime/handlers/renderer').default>>>>
8
+ }
9
+ '/__nuxt_island/**': {
10
+ 'default': Simplify<Serialize<Awaited<ReturnType<typeof import('../../src/server/#internal/nuxt/island-renderer').default>>>>
11
+ }
12
+ '/_i18n/:hash/:locale/messages.json': {
13
+ 'default': Simplify<Serialize<Awaited<ReturnType<typeof import('../../node_modules/@nuxtjs/i18n/dist/runtime/server/routes/messages').default>>>>
14
+ }
15
+ }
16
+ }
17
+ export {}
@@ -0,0 +1,3 @@
1
+ /// <reference path="./nitro-routes.d.ts" />
2
+ /// <reference path="./nitro-config.d.ts" />
3
+ /// <reference path="./nitro-imports.d.ts" />
@@ -0,0 +1,43 @@
1
+ // Generated by Nuxt'
2
+ import type { Plugin } from '#app'
3
+
4
+ type Decorate<T extends Record<string, any>> = { [K in keyof T as K extends string ? `$${K}` : never]: T[K] }
5
+
6
+ type InjectionType<A extends Plugin> = A extends {default: Plugin<infer T>} ? Decorate<T> : unknown
7
+
8
+ type NuxtAppInjections =
9
+ InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/revive-payload.client.js")> &
10
+ InjectionType<typeof import("../../node_modules/nuxt/dist/head/runtime/plugins/unhead.js")> &
11
+ InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/router.js")> &
12
+ InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/browser-devtools-timing.client.js")> &
13
+ InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/payload.client.js")> &
14
+ InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/dev-server-logs.js")> &
15
+ InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/navigation-repaint.client.js")> &
16
+ InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/check-outdated-build.client.js")> &
17
+ InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/revive-payload.server.js")> &
18
+ InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/chunk-reload.client.js")> &
19
+ InjectionType<typeof import("../../node_modules/nuxt/node_modules/@nuxt/devtools/dist/runtime/plugins/devtools.server.js")> &
20
+ InjectionType<typeof import("../../node_modules/nuxt/node_modules/@nuxt/devtools/dist/runtime/plugins/devtools.client.js")> &
21
+ InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/switch-locale-path-ssr.js")> &
22
+ InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/route-locale-detect.js")> &
23
+ InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/preload.js")> &
24
+ InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/dev.js")> &
25
+ InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/i18n.js")> &
26
+ InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/warn.dev.server.js")> &
27
+ InjectionType<typeof import("../../node_modules/nuxt/dist/app/plugins/check-if-layout-used.js")> &
28
+ InjectionType<typeof import("../../src/plugins/aiWorkflowEditor")> &
29
+ InjectionType<typeof import("../../node_modules/@nuxtjs/i18n/dist/runtime/plugins/ssg-detect.js")>
30
+
31
+ declare module '#app' {
32
+ interface NuxtApp extends NuxtAppInjections { }
33
+
34
+ interface NuxtAppLiterals {
35
+ pluginName: 'vue-devtools-client' | 'nuxt:revive-payload:client' | 'nuxt:head' | 'nuxt:router' | 'nuxt:browser-devtools-timing' | 'nuxt:payload' | 'nuxt:revive-payload:server' | 'nuxt:chunk-reload' | 'nuxt:global-components' | 'i18n:plugin:switch-locale-path-ssr' | 'i18n:plugin:route-locale-detect' | 'i18n:plugin:preload' | 'i18n:dev' | 'i18n:plugin' | 'nuxt:checkIfLayoutUsed' | 'i18n:plugin:ssg-detect'
36
+ }
37
+ }
38
+
39
+ declare module 'vue' {
40
+ interface ComponentCustomProperties extends NuxtAppInjections { }
41
+ }
42
+
43
+ export { }
@@ -0,0 +1,213 @@
1
+ import { RuntimeConfig as UserRuntimeConfig, PublicRuntimeConfig as UserPublicRuntimeConfig } from 'nuxt/schema'
2
+ import { NuxtModule, ModuleDependencyMeta } from '@nuxt/schema'
3
+ interface SharedRuntimeConfig {
4
+ app: {
5
+ buildId: string,
6
+
7
+ baseURL: string,
8
+
9
+ buildAssetsDir: string,
10
+
11
+ cdnURL: string,
12
+ },
13
+
14
+ nitro: {
15
+ envPrefix: string,
16
+ },
17
+ }
18
+ interface SharedPublicRuntimeConfig {
19
+ i18n: {
20
+ baseUrl: string,
21
+
22
+ defaultLocale: string,
23
+
24
+ rootRedirect: any,
25
+
26
+ redirectStatusCode: number,
27
+
28
+ skipSettingLocaleOnNavigate: boolean,
29
+
30
+ locales: Array<{
31
+
32
+ }>,
33
+
34
+ detectBrowserLanguage: {
35
+ alwaysRedirect: boolean,
36
+
37
+ cookieCrossOrigin: boolean,
38
+
39
+ cookieDomain: any,
40
+
41
+ cookieKey: string,
42
+
43
+ cookieSecure: boolean,
44
+
45
+ fallbackLocale: string,
46
+
47
+ redirectOn: string,
48
+
49
+ useCookie: boolean,
50
+ },
51
+
52
+ experimental: {
53
+ localeDetector: string,
54
+
55
+ typedPages: boolean,
56
+
57
+ typedOptionsAndMessages: boolean,
58
+
59
+ alternateLinkCanonicalQueries: boolean,
60
+
61
+ devCache: boolean,
62
+
63
+ cacheLifetime: any,
64
+
65
+ stripMessagesPayload: boolean,
66
+
67
+ preload: boolean,
68
+
69
+ strictSeo: boolean,
70
+
71
+ nitroContextDetection: boolean,
72
+
73
+ httpCacheDuration: number,
74
+ },
75
+
76
+ domainLocales: {
77
+ zh: {
78
+ domain: string,
79
+ },
80
+
81
+ en: {
82
+ domain: string,
83
+ },
84
+ },
85
+ },
86
+ }
87
+ declare module '@nuxt/schema' {
88
+ interface ModuleDependencies {
89
+ ["unocss"]?: ModuleDependencyMeta<typeof import("@unocss/nuxt").default extends NuxtModule<infer O> ? O | false : Record<string, unknown>> | false
90
+ ["element-plus"]?: ModuleDependencyMeta<typeof import("@element-plus/nuxt").default extends NuxtModule<infer O> ? O | false : Record<string, unknown>> | false
91
+ ["@nuxtjs/i18n"]?: ModuleDependencyMeta<typeof import("@nuxtjs/i18n").default extends NuxtModule<infer O> ? O | false : Record<string, unknown>> | false
92
+ ["@nuxt/devtools"]?: ModuleDependencyMeta<typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? O | false : Record<string, unknown>> | false
93
+ ["@nuxt/telemetry"]?: ModuleDependencyMeta<typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? O | false : Record<string, unknown>> | false
94
+ }
95
+ interface NuxtOptions {
96
+ /**
97
+ * Configuration for `@unocss/nuxt`
98
+ */
99
+ ["unocss"]: typeof import("@unocss/nuxt").default extends NuxtModule<infer O, unknown, boolean> ? O | false : Record<string, any> | false
100
+ /**
101
+ * Configuration for `@element-plus/nuxt`
102
+ */
103
+ ["elementPlus"]: typeof import("@element-plus/nuxt").default extends NuxtModule<infer O, unknown, boolean> ? O | false : Record<string, any> | false
104
+ /**
105
+ * Configuration for `@nuxtjs/i18n`
106
+ */
107
+ ["i18n"]: typeof import("@nuxtjs/i18n").default extends NuxtModule<infer O, unknown, boolean> ? O | false : Record<string, any> | false
108
+ /**
109
+ * Configuration for `@nuxt/devtools`
110
+ */
111
+ ["devtools"]: typeof import("@nuxt/devtools").default extends NuxtModule<infer O, unknown, boolean> ? O | false : Record<string, any> | false
112
+ /**
113
+ * Configuration for `@nuxt/telemetry`
114
+ */
115
+ ["telemetry"]: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O, unknown, boolean> ? O | false : Record<string, any> | false
116
+ }
117
+ interface NuxtConfig {
118
+ /**
119
+ * Configuration for `@unocss/nuxt`
120
+ */
121
+ ["unocss"]?: typeof import("@unocss/nuxt").default extends NuxtModule<infer O, unknown, boolean> ? Partial<O> | false : Record<string, any> | false
122
+ /**
123
+ * Configuration for `@element-plus/nuxt`
124
+ */
125
+ ["elementPlus"]?: typeof import("@element-plus/nuxt").default extends NuxtModule<infer O, unknown, boolean> ? Partial<O> | false : Record<string, any> | false
126
+ /**
127
+ * Configuration for `@nuxtjs/i18n`
128
+ */
129
+ ["i18n"]?: typeof import("@nuxtjs/i18n").default extends NuxtModule<infer O, unknown, boolean> ? Partial<O> | false : Record<string, any> | false
130
+ /**
131
+ * Configuration for `@nuxt/devtools`
132
+ */
133
+ ["devtools"]?: typeof import("@nuxt/devtools").default extends NuxtModule<infer O, unknown, boolean> ? Partial<O> | false : Record<string, any> | false
134
+ /**
135
+ * Configuration for `@nuxt/telemetry`
136
+ */
137
+ ["telemetry"]?: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O, unknown, boolean> ? Partial<O> | false : Record<string, any> | false
138
+ modules?: (undefined | null | false | NuxtModule<any> | string | [NuxtModule | string, Record<string, any>] | ["@unocss/nuxt", Exclude<NuxtConfig["unocss"], boolean>] | ["@element-plus/nuxt", Exclude<NuxtConfig["elementPlus"], boolean>] | ["@nuxtjs/i18n", Exclude<NuxtConfig["i18n"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
139
+ }
140
+ interface RuntimeConfig extends UserRuntimeConfig {}
141
+ interface PublicRuntimeConfig extends UserPublicRuntimeConfig {}
142
+ }
143
+ declare module 'nuxt/schema' {
144
+ interface ModuleDependencies {
145
+ ["unocss"]?: ModuleDependencyMeta<typeof import("@unocss/nuxt").default extends NuxtModule<infer O> ? O | false : Record<string, unknown>> | false
146
+ ["element-plus"]?: ModuleDependencyMeta<typeof import("@element-plus/nuxt").default extends NuxtModule<infer O> ? O | false : Record<string, unknown>> | false
147
+ ["@nuxtjs/i18n"]?: ModuleDependencyMeta<typeof import("@nuxtjs/i18n").default extends NuxtModule<infer O> ? O | false : Record<string, unknown>> | false
148
+ ["@nuxt/devtools"]?: ModuleDependencyMeta<typeof import("@nuxt/devtools").default extends NuxtModule<infer O> ? O | false : Record<string, unknown>> | false
149
+ ["@nuxt/telemetry"]?: ModuleDependencyMeta<typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? O | false : Record<string, unknown>> | false
150
+ }
151
+ interface NuxtOptions {
152
+ /**
153
+ * Configuration for `@unocss/nuxt`
154
+ * @see https://www.npmjs.com/package/@unocss/nuxt
155
+ */
156
+ ["unocss"]: typeof import("@unocss/nuxt").default extends NuxtModule<infer O, unknown, boolean> ? O | false : Record<string, any> | false
157
+ /**
158
+ * Configuration for `@element-plus/nuxt`
159
+ * @see https://www.npmjs.com/package/@element-plus/nuxt
160
+ */
161
+ ["elementPlus"]: typeof import("@element-plus/nuxt").default extends NuxtModule<infer O, unknown, boolean> ? O | false : Record<string, any> | false
162
+ /**
163
+ * Configuration for `@nuxtjs/i18n`
164
+ * @see https://www.npmjs.com/package/@nuxtjs/i18n
165
+ */
166
+ ["i18n"]: typeof import("@nuxtjs/i18n").default extends NuxtModule<infer O, unknown, boolean> ? O | false : Record<string, any> | false
167
+ /**
168
+ * Configuration for `@nuxt/devtools`
169
+ * @see https://www.npmjs.com/package/@nuxt/devtools
170
+ */
171
+ ["devtools"]: typeof import("@nuxt/devtools").default extends NuxtModule<infer O, unknown, boolean> ? O | false : Record<string, any> | false
172
+ /**
173
+ * Configuration for `@nuxt/telemetry`
174
+ * @see https://www.npmjs.com/package/@nuxt/telemetry
175
+ */
176
+ ["telemetry"]: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O, unknown, boolean> ? O | false : Record<string, any> | false
177
+ }
178
+ interface NuxtConfig {
179
+ /**
180
+ * Configuration for `@unocss/nuxt`
181
+ * @see https://www.npmjs.com/package/@unocss/nuxt
182
+ */
183
+ ["unocss"]?: typeof import("@unocss/nuxt").default extends NuxtModule<infer O, unknown, boolean> ? Partial<O> | false : Record<string, any> | false
184
+ /**
185
+ * Configuration for `@element-plus/nuxt`
186
+ * @see https://www.npmjs.com/package/@element-plus/nuxt
187
+ */
188
+ ["elementPlus"]?: typeof import("@element-plus/nuxt").default extends NuxtModule<infer O, unknown, boolean> ? Partial<O> | false : Record<string, any> | false
189
+ /**
190
+ * Configuration for `@nuxtjs/i18n`
191
+ * @see https://www.npmjs.com/package/@nuxtjs/i18n
192
+ */
193
+ ["i18n"]?: typeof import("@nuxtjs/i18n").default extends NuxtModule<infer O, unknown, boolean> ? Partial<O> | false : Record<string, any> | false
194
+ /**
195
+ * Configuration for `@nuxt/devtools`
196
+ * @see https://www.npmjs.com/package/@nuxt/devtools
197
+ */
198
+ ["devtools"]?: typeof import("@nuxt/devtools").default extends NuxtModule<infer O, unknown, boolean> ? Partial<O> | false : Record<string, any> | false
199
+ /**
200
+ * Configuration for `@nuxt/telemetry`
201
+ * @see https://www.npmjs.com/package/@nuxt/telemetry
202
+ */
203
+ ["telemetry"]?: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O, unknown, boolean> ? Partial<O> | false : Record<string, any> | false
204
+ modules?: (undefined | null | false | NuxtModule<any> | string | [NuxtModule | string, Record<string, any>] | ["@unocss/nuxt", Exclude<NuxtConfig["unocss"], boolean>] | ["@element-plus/nuxt", Exclude<NuxtConfig["elementPlus"], boolean>] | ["@nuxtjs/i18n", Exclude<NuxtConfig["i18n"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
205
+ }
206
+ interface RuntimeConfig extends SharedRuntimeConfig {}
207
+ interface PublicRuntimeConfig extends SharedPublicRuntimeConfig {}
208
+ }
209
+ declare module 'vue' {
210
+ interface ComponentCustomProperties {
211
+ $config: UserRuntimeConfig
212
+ }
213
+ }
File without changes
@@ -0,0 +1,38 @@
1
+ # 编码规范
2
+
3
+ ## 通用规范
4
+ - 避免不必要的对象复制或克隆
5
+ - 避免多层嵌套,提前返回
6
+ - 使用适当的并发控制机制
7
+
8
+ ## 代码可读性
9
+ ### 命名约定
10
+ - 使用有意义的、描述性的名称
11
+ - 遵循项目或语言的命名规范
12
+ 避免缩写和单字母变量(除非是约定俗成的,如循环中的 `i`)
13
+
14
+ ### 代码组织
15
+ - 相关代码放在一起
16
+ - 一个函数只做一件事
17
+ - 保持适当的抽象层次
18
+
19
+ ### 注释与文档
20
+ - 注释应该解释为什么,而不是做什么
21
+ - 为公共 API 提供清晰的文档
22
+ - 更新注释以反映代码变化
23
+
24
+ ## 性能优化
25
+ ### 内存优化
26
+ - 避免不必要的对象创建
27
+ - 及时释放不再需要的资源
28
+ - 注意内存泄漏问题
29
+
30
+ ### 计算优化
31
+ - 避免重复计算
32
+ - 使用适当的数据结构和算法
33
+ - 延迟计算直到必要时
34
+
35
+ ### 并行优化
36
+ - 识别可并行化的任务
37
+ - 避免不必要的同步
38
+ - 注意线程安全问题
@@ -0,0 +1,5 @@
1
+ {
2
+ "i18n-ally.localesPaths": [
3
+ "src/locales"
4
+ ]
5
+ }
package/nuxt.config.ts ADDED
@@ -0,0 +1,38 @@
1
+ // https://nuxt.com/docs/api/configuration/nuxt-config
2
+ export default defineNuxtConfig({
3
+ compatibilityDate: '2026-02-11',
4
+ devtools: { enabled: true },
5
+ srcDir: 'src/',
6
+ modules: [
7
+ '@unocss/nuxt',
8
+ '@element-plus/nuxt',
9
+ '@nuxtjs/i18n'
10
+ ],
11
+ i18n: {
12
+ vueI18n: './i18n.config.ts',
13
+ locales: [
14
+ {
15
+ code: 'zh',
16
+ name: '中文',
17
+ file: 'zh.json'
18
+ },
19
+ {
20
+ code: 'en',
21
+ name: 'English',
22
+ file: 'en.json'
23
+ }
24
+ ],
25
+ defaultLocale: 'zh',
26
+ lazy: true,
27
+ langDir: '../src/locales',
28
+ strategy: 'no_prefix'
29
+ },
30
+ typescript: {
31
+ strict: true
32
+ },
33
+ // 开发服务器配置
34
+ devServer: {
35
+ host: '0.0.0.0', // 监听所有地址,使其可以被外部访问
36
+ port: 3000 // 开发服务器端口
37
+ }
38
+ })