├── AI ├── agent │ ├── __init__.py │ ├── api.py │ ├── config.py │ ├── db.py │ ├── tools.py │ └── utils.py └── web │ ├── index.html │ └── js │ ├── marked.js │ ├── tailwind.js │ └── vue.js ├── README.md ├── ai.py ├── cli.py └── requirements.txt /AI/agent/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valueriver/AutoSite/0b7b5127da70c436b1234ed5cc65b20f2f1bde8f/AI/agent/__init__.py -------------------------------------------------------------------------------- /AI/agent/api.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | 4 | class ModelApi: 5 | def __init__(self, api_key, api_url): 6 | self.api_key = api_key 7 | self.api_url = api_url 8 | 9 | def oneapi(self, messages, model=None, tools=None, choices="auto", response_format=None): 10 | body = { 11 | "messages": messages, 12 | "temperature": 0, 13 | } 14 | 15 | if model: 16 | body["model"] = model 17 | else: 18 | body["model"] = 'gpt-4o' 19 | 20 | if tools: 21 | body["tools"] = tools 22 | body["tool_choice"] = choices 23 | 24 | if response_format: 25 | body["response_format"] = response_format 26 | 27 | headers = { 28 | "Content-Type": "application/json", 29 | "Authorization": f"Bearer {self.api_key}", 30 | } 31 | 32 | response = requests.post(self.api_url, headers=headers, data=json.dumps(body)) 33 | 34 | if response.status_code != 200: 35 | print(response.text) 36 | 37 | data = response.json() 38 | 39 | try: 40 | if data['choices'][0]['finish_reason'] == 'stop': 41 | return { 42 | 'type': 'message', 43 | 'message': data['choices'][0]['message']['content'] 44 | } 45 | else: 46 | return { 47 | 'type': 'tools', 48 | 'message': data['choices'][0]['message'], 49 | 'tools': data['choices'][0]['message'].get('tool_calls', []) 50 | } 51 | except Exception as error: 52 | return { 53 | 'type': 'error', 54 | 'message': str(error) 55 | } 56 | -------------------------------------------------------------------------------- /AI/agent/config.py: -------------------------------------------------------------------------------- 1 | prompt = """ 2 | [系统设定] 3 | 你是AutoSite,一个自动化的网站机器人,你的核心能力是通过理解需求、创建或修改代码并实现网站的部署。 4 | 你拥有一个本地的开发环境,并且通过工具能够获取目录信息,读取文件、写入文件、执行命令。 5 | 你当前位于是AutoSite目录中,该目录的默认结构为: 6 | 1.AI文件夹 - 你的核心代码目录。 7 | 2.cli.py - 用户执行python cli.py 可以通过命令行与你进行对话。 8 | 3.ai.py - 用户执行python ai.py 可以通过网页与你进行对话。 9 | 4.readme.md等其它文件。 10 | 上述文件都是不应该进行修改的,这会导致您的功能遭到损坏。 11 | 12 | [工作原理] 13 | 用户的网站是通过GitHub部署在vercel中,因此只要GitHub有提交,vercel就会触发自动部署,从而更新网站的功能和内容。 14 | 基于此,首先:用户需要在GitHub中创建一个网站项目,在这个项目里,用户必须创建一个index.html,这样才能顺利部署到vercel,html内容可以完全是空。 15 | 然后:用户需要在vercel上选择创建的这个项目并部署。 16 | 然后:用户创建的网站项目克隆在你所在的AutoSite目录内,这样你就可以操作这个项目目录中的内容,按照用户的需求开发网站的功能。 17 | 最后:当你开发完成后,你可以在用户的项目目录中自动执行提交GitHub的命令,从而实现网站的部署和更新。 18 | 19 | [用户教学] 20 | 许多用户可能并不明白如何实现配置,这时您需要按照工作原理向用户解释。 21 | 如果你发现用户还没有将网站项目克隆在AutoSite目录,那么你应该引导用户在GitHub上创建项目并克隆在你所在的AutoSite目录内。 22 | 当用户创建项目并克隆在本地后,你需要使用读取目录的工具进行检查并向用户确认。 23 | 24 | [工作流程] 25 | 1.理解用户的需求 26 | 2.获取当前工作目录中的结构和文件 27 | 3.根据用户需求创建新代码或修改已有的代码 28 | 4.通过 shell 执行git命令将代码提交到GitHub 29 | 30 | [编码规范] 31 | 前端部分: 32 | 网站采用html技术,生成的网页内容必须是html文件. 33 | css样式采用tailwindcss技术实现,通过引用一下代码实现: 34 | 35 | 36 | js脚本通过vue3技术实现,通过引用一下代码实现: 37 | 38 | 39 | 后端部分: 40 | vercel支持部署云函数,云函数必须放置在api目录下。 41 | 云函数的语言必须为nodejs。 42 | 云函数的环境为node20版本,因此不需要安装node-fetch。 43 | 当你需要安装第三方库的时候,您应该在api中执行npm install命令。 44 | 云函数可以考虑采用箭头函数的语法: 45 | export default async (req, res) => { 46 | //some code... 47 | }; 48 | vercel云函数的前端请求路由是/api/< 函数的js文件的文件名,例如如果是hello.js,那么这里就是hello > 49 | 50 | [注意事项] 51 | 用户在让你进行开发网站的时候,你应该扫描一下当前的目录的内容,确实用户是否将项目已经克隆到了本地。 52 | 你的回答风格简洁概括的,除非用户要求详细输出。 53 | 当你打开一个文件时,你不需要向用户重复文件的内容,只需要大概描述一下即可。 54 | 当你写入文件时,你不需要向用户重复你写入的内容,只需要大概介绍一下即可。 55 | 当你读取文件时,读取的编码采用的是UTF-8。 56 | 写代码的时候,不需要向用户介绍你要写的代码,直接写就可以。 57 | 58 | """ 59 | 60 | tools = [ 61 | { 62 | "type": "function", 63 | "function": { 64 | "name": "write_to_file", 65 | "description": "Write data to a local file", 66 | "parameters": { 67 | "type": "object", 68 | "properties": { 69 | "data": { 70 | "type": "string", 71 | "description": "The data to write to the file" 72 | }, 73 | "filename": { 74 | "type": "string", 75 | "description": "The name of the file to write to", 76 | }, 77 | "directory": { 78 | "type": "string", 79 | "description": "The directory where the file will be written. Defaults to the current directory", 80 | } 81 | }, 82 | "required": ["data", "filename","directory"] 83 | } 84 | } 85 | }, 86 | { 87 | "type": "function", 88 | "function": { 89 | "name": "read_from_file", 90 | "description": "Read data from a local file", 91 | "parameters": { 92 | "type": "object", 93 | "properties": { 94 | "filename": { 95 | "type": "string", 96 | "description": "The name of the file to read from", 97 | }, 98 | "directory": { 99 | "type": "string", 100 | "description": "The directory where the file is located. Defaults to the current directory", 101 | } 102 | }, 103 | "required": ["filename","directory"] 104 | } 105 | } 106 | }, 107 | { 108 | "type": "function", 109 | "function": { 110 | "name": "get_directory_structure", 111 | "description": "Get the directory structure of the specified directory, defaulting to the current directory", 112 | "parameters": { 113 | "type": "object", 114 | "properties": { 115 | "directory": { 116 | "type": "string", 117 | "description": "The directory to get the structure of. Defaults to the current directory", 118 | } 119 | }, 120 | "required": ["directory"] 121 | } 122 | } 123 | }, 124 | { 125 | "type": "function", 126 | "function": { 127 | "name": "run_shell_command", 128 | "description": "Run a PowerShell command in the specified directory, defaulting to the current directory", 129 | "parameters": { 130 | "type": "object", 131 | "properties": { 132 | "command": { 133 | "type": "string", 134 | "description": "The PowerShell command to execute" 135 | }, 136 | "directory": { 137 | "type": "string", 138 | "description": "The directory to run the command in. Defaults to the current directory", 139 | } 140 | }, 141 | "required": ["command","directory"] 142 | } 143 | } 144 | } 145 | ] 146 | -------------------------------------------------------------------------------- /AI/agent/db.py: -------------------------------------------------------------------------------- 1 | import sqlite3 2 | import json 3 | import os 4 | 5 | base_dir = os.path.join(os.getcwd(), 'AI', 'db') # 修改目录路径 6 | 7 | def init_db(): 8 | db_path = os.path.join(base_dir, 'chat.db') 9 | conn = sqlite3.connect(db_path) 10 | cursor = conn.cursor() 11 | 12 | cursor.execute(''' 13 | CREATE TABLE IF NOT EXISTS conversations ( 14 | id INTEGER PRIMARY KEY AUTOINCREMENT, 15 | conversation_id TEXT UNIQUE, 16 | created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP 17 | ) 18 | ''') 19 | 20 | cursor.execute(''' 21 | CREATE TABLE IF NOT EXISTS messages ( 22 | id INTEGER PRIMARY KEY AUTOINCREMENT, 23 | conversation_id TEXT, 24 | role TEXT, 25 | content TEXT, 26 | tool_calls TEXT, 27 | tool_call_id TEXT, 28 | timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 29 | FOREIGN KEY (conversation_id) REFERENCES conversations (conversation_id) 30 | ) 31 | ''') 32 | 33 | conn.commit() 34 | conn.close() 35 | 36 | def save_history(conversation_id, messages): 37 | db_path = os.path.join(base_dir, 'chat.db') 38 | conn = sqlite3.connect(db_path) 39 | cursor = conn.cursor() 40 | 41 | cursor.execute('INSERT OR IGNORE INTO conversations (conversation_id) VALUES (?)', (conversation_id,)) 42 | 43 | for message in messages: 44 | tool_calls = message.get('tool_calls', None) 45 | tool_call_id = message.get('tool_call_id', None) 46 | 47 | tool_calls_str = json.dumps(tool_calls) if tool_calls is not None else None 48 | tool_call_id_str = tool_call_id if tool_call_id is not None else None 49 | 50 | cursor.execute(''' 51 | INSERT INTO messages (conversation_id, role, content, tool_calls, tool_call_id) 52 | VALUES (?, ?, ?, ?, ?) 53 | ''', (conversation_id, message['role'], message['content'], tool_calls_str, tool_call_id_str)) 54 | 55 | conn.commit() 56 | conn.close() 57 | 58 | def load_history(conversation_id): 59 | db_path = os.path.join(base_dir, 'chat.db') 60 | conn = sqlite3.connect(db_path) 61 | cursor = conn.cursor() 62 | 63 | cursor.execute('SELECT role, content, tool_calls, tool_call_id FROM messages WHERE conversation_id = ? ORDER BY timestamp ASC', (conversation_id,)) 64 | 65 | messages = [] 66 | for row in cursor.fetchall(): 67 | message = {'role': row[0], 'content': row[1]} 68 | if row[2]: 69 | message['tool_calls'] = json.loads(row[2]) 70 | if row[3]: 71 | message['tool_call_id'] = row[3] 72 | messages.append(message) 73 | 74 | conn.close() 75 | return messages 76 | 77 | def get_conversation_list(): 78 | db_path = os.path.join(base_dir, 'chat.db') 79 | conn = sqlite3.connect(db_path) 80 | cursor = conn.cursor() 81 | 82 | cursor.execute('SELECT conversation_id FROM conversations ORDER BY created_at DESC') 83 | conversations = [{'conversationId': row[0]} for row in cursor.fetchall()] 84 | 85 | conn.close() 86 | return conversations -------------------------------------------------------------------------------- /AI/agent/tools.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | import subprocess 4 | import platform 5 | 6 | def get_directory_structure(directory=None): 7 | if directory is None: 8 | directory = os.getcwd() 9 | 10 | print(f"[📁读取目录]: {directory}") 11 | 12 | if not os.path.exists(directory): 13 | return json.dumps({ 14 | "status": "error", 15 | "message": f"The directory '{directory}' does not exist." 16 | }) 17 | files = [] 18 | folders = [] 19 | with os.scandir(directory) as entries: 20 | for entry in entries: 21 | if entry.is_file(): 22 | files.append(entry.name) 23 | elif entry.is_dir(): 24 | folders.append(entry.name) 25 | return json.dumps({ 26 | "status": "success", 27 | "structure": { 28 | "files": files, 29 | "folders": folders 30 | } 31 | }) 32 | 33 | def write_to_file(data, filename, directory=None): 34 | if directory is None: 35 | directory = os.getcwd() 36 | 37 | print(f"[⌨️创建文件]:{filename}") 38 | 39 | os.makedirs(directory, exist_ok=True) 40 | filepath = os.path.join(directory, filename) 41 | 42 | try: 43 | with open(filepath, 'w', encoding='utf-8') as file: 44 | file.write(data) 45 | return json.dumps({"status": "success", "message": f"Data written to {filepath}"}) 46 | except Exception as e: 47 | return json.dumps({"status": "error", "message": str(e)}) 48 | 49 | def read_from_file(filename, directory=None): 50 | if directory is None: 51 | directory = os.getcwd() 52 | 53 | print(f"[💾读取文件]:{filename}") 54 | 55 | filepath = os.path.join(directory, filename) 56 | 57 | try: 58 | with open(filepath, 'r', encoding='utf-8') as file: 59 | data = file.read() 60 | return json.dumps({"status": "success", "data": data}) 61 | except FileNotFoundError: 62 | return json.dumps({"status": "error", "message": f"{filepath} not found"}) 63 | 64 | def run_shell_command(command, directory=None): 65 | if directory is None: 66 | directory = os.getcwd() 67 | 68 | print(f"[📟执行命令]:{command}") 69 | 70 | warning = None 71 | 72 | # 根据操作系统选择适当的 shell 73 | if platform.system() == "Windows": 74 | shell = ["powershell", "-Command"] 75 | else: 76 | shell = ["sh", "-c"] 77 | 78 | try: 79 | result = subprocess.run(shell + [command], 80 | cwd=directory, capture_output=True, text=True, shell=False) 81 | return json.dumps({ 82 | "status": "success", 83 | "output": result.stdout, 84 | "error": result.stderr, 85 | "warning": warning 86 | }) 87 | except Exception as e: 88 | return json.dumps({ 89 | "status": "error", 90 | "message": str(e), 91 | "warning": warning 92 | }) 93 | 94 | available_functions = { 95 | "write_to_file": write_to_file, 96 | "read_from_file": read_from_file, 97 | "get_directory_structure": get_directory_structure, 98 | "run_shell_command": run_shell_command 99 | } 100 | 101 | def RunTools(tool_calls): 102 | tool_messages = [] 103 | for tool_call in tool_calls: 104 | function_name = tool_call['function']['name'] 105 | function_to_call = available_functions.get(function_name) 106 | if function_to_call: 107 | function_args = json.loads(tool_call['function']['arguments']) 108 | function_response = function_to_call(**function_args) 109 | tool_messages.append( 110 | { 111 | "tool_call_id": tool_call['id'], 112 | "role": "tool", 113 | "name": function_name, 114 | "content": function_response, 115 | } 116 | ) 117 | return tool_messages 118 | -------------------------------------------------------------------------------- /AI/agent/utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | 4 | def open_browser(url): 5 | if os.name == 'nt': # for Windows 6 | subprocess.Popen(['powershell', '-Command', f'Start-Process "{url}"']) 7 | else: 8 | subprocess.Popen(['xdg-open', url]) 9 | -------------------------------------------------------------------------------- /AI/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 |{{ chat.conversationId }}
29 |会话 ID: {{ conversationId }}
43 |👤 您
51 |{{ message.content }}
52 |🤖 AutoSite
57 |{{ message.content }}
58 | 59 |工具调用:
62 |函数名: {{ call.function.name }}
64 |参数: {{ call.function.arguments }}
65 |🔧 工具响应
72 |{{ message.content }}
73 | 74 |{{ JSON.stringify(parseJson(message.content), null, 2) }}78 |
' + (n ? r : c(r, !0)) + "
\n" : "" + (n ? r : c(r, !0)) + "
\n" } blockquote({ tokens: e }) { return `\n${this.parser.parse(e)}\n` } html({ text: e }) { return e } heading({ tokens: e, depth: t }) { return `
${this.parser.parseInline(e)}
\n` } table(e) { let t = "", n = ""; for (let t = 0; t < e.header.length; t++)n += this.tablecell(e.header[t]); t += this.tablerow({ text: n }); let s = ""; for (let t = 0; t < e.rows.length; t++) { const r = e.rows[t]; n = ""; for (let e = 0; e < r.length; e++)n += this.tablecell(r[e]); s += this.tablerow({ text: n }) } return s && (s = `${s}`), "${e}
` } br(e) { return "An error occurred:
" + c(n.message + "", !0) + ""; return t ? Promise.resolve(e) : e } if (t) return Promise.reject(n); throw n } } } const oe = new le; function ae(e, t) { return oe.parse(e, t) } ae.options = ae.setOptions = function (e) { return oe.setOptions(e), ae.defaults = oe.defaults, n(ae.defaults), ae }, ae.getDefaults = t, ae.defaults = e.defaults, ae.use = function (...e) { return oe.use(...e), ae.defaults = oe.defaults, n(ae.defaults), ae }, ae.walkTokens = function (e, t) { return oe.walkTokens(e, t) }, ae.parseInline = oe.parseInline, ae.Parser = re, ae.parser = re.parse, ae.Renderer = ne, ae.TextRenderer = se, ae.Lexer = te, ae.lexer = te.lex, ae.Tokenizer = b, ae.Hooks = ie, ae.parse = ae; const ce = ae.options, he = ae.setOptions, pe = ae.use, ue = ae.walkTokens, ke = ae.parseInline, ge = ae, fe = re.parse, de = te.lex; e.Hooks = ie, e.Lexer = te, e.Marked = le, e.Parser = re, e.Renderer = ne, e.TextRenderer = se, e.Tokenizer = b, e.getDefaults = t, e.lexer = de, e.marked = ae, e.options = ce, e.parse = ge, e.parseInline = ke, e.parser = fe, e.setOptions = he, e.use = pe, e.walkTokens = ue })); 7 | -------------------------------------------------------------------------------- /AI/web/js/vue.js: -------------------------------------------------------------------------------- 1 | /** 2 | * vue v3.4.27 3 | * (c) 2018-present Yuxi (Evan) You and Vue contributors 4 | * @license MIT 5 | **/ 6 | var Vue=function(e){"use strict"; 7 | /*! #__NO_SIDE_EFFECTS__ */function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const n={},s=[],o=()=>{},r=()=>!1,i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith("onUpdate:"),c=Object.assign,a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),p=Array.isArray,h=e=>"[object Map]"===x(e),f=e=>"[object Set]"===x(e),m=e=>"[object Date]"===x(e),g=e=>"function"==typeof e,y=e=>"string"==typeof e,v=e=>"symbol"==typeof e,b=e=>null!==e&&"object"==typeof e,_=e=>(b(e)||g(e))&&g(e.then)&&g(e.catch),S=Object.prototype.toString,x=e=>S.call(e),C=e=>x(e).slice(8,-1),k=e=>"[object Object]"===x(e),T=e=>y(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,w=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),A=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),E=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},N=/-(\w)/g,I=E((e=>e.replace(N,((e,t)=>t?t.toUpperCase():"")))),R=/\B([A-Z])/g,O=E((e=>e.replace(R,"-$1").toLowerCase())),L=E((e=>e.charAt(0).toUpperCase()+e.slice(1))),F=E((e=>e?`on${L(e)}`:"")),M=(e,t)=>!Object.is(e,t),P=(e,t)=>{for(let n=0;n
d?J(e,r,i,!0,!1,p):A(t,n,o,r,i,l,c,a,p)},H=(e,t,n,o,r,i,l,c,a)=>{let u=0;const d=t.length;let p=e.length-1,h=d-1;for(;u<=p&&u<=h;){const s=e[u],o=t[u]=a?rr(t[u]):or(t[u]);if(!Xo(s,o))break;v(s,o,n,null,r,i,l,c,a),u++}for(;u<=p&&u<=h;){const s=e[p],o=t[h]=a?rr(t[h]):or(t[h]);if(!Xo(s,o))break;v(s,o,n,null,r,i,l,c,a),p--,h--}if(u>p){if(u<=h){const e=h+1,s=e0;let f=!1,m=0,g=!1,y=!1,b=!1,_=!1,S=!1,x=!1;const C=[],k=e=>{u.length&&(d.push(Ql(ou(u),c)),u=[]),e&&d.push(e)},T=()=>{t.scopes.vFor>0&&u.push(Zl(Yl("ref_for",!0),Yl("true")))},E=({key:e,value:n})=>{if(yc(e)){const r=e.content,l=i(r);if(!l||s&&!o||"onclick"===r.toLowerCase()||"onUpdate:modelValue"===r||w(r)||(_=!0),l&&w(r)&&(x=!0),l&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&Sa(n,t)>0)return;"ref"===r?g=!0:"class"===r?y=!0:"style"===r?b=!0:"key"===r||C.includes(r)||C.push(r),!s||"class"!==r&&"style"!==r||C.includes(r)||C.push(r)}else S=!0};for(let i=0;it(e,n,void 0,r&&r[n])));else{const n=Object.keys(e);o=new Array(n.length);for(let s=0,i=n.length;sy(e)?e:null==e?"":p(e)||b(e)&&(e.toString===S||!g(e.toString))?JSON.stringify(e,se,2):String(e),e.toHandlerKey=F,e.toHandlers=function(e,t){const n={};for(const s in e)n[t&&/[A-Z]/.test(s)?`on:${s}`:F(s)]=e[s];return n},e.toRaw=Ct,e.toRef=function(e,t,n){return It(e)?e:g(e)?new Dt(e):b(e)&&arguments.length>1?Ut(e,t,n):Rt(e)},e.toRefs=function(e){const t=p(e)?new Array(e.length):{};for(const n in e)t[n]=Ut(e,n);return t},e.toValue=function(e){return g(e)?e():Ft(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){Nt(e,4)},e.unref=Ft,e.useAttrs=function(){return Os().attrs},e.useCssModule=function(e="$style"){return n},e.useCssVars=function(e){const t=pr();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>ci(e,n)))},s=()=>{const s=e(t.proxy);li(t.subTree,s),n(s)};ys((()=>{Mn(s);const e=new MutationObserver(s);e.observe(t.subTree.el.parentNode,{childList:!0}),Ss((()=>e.disconnect()))}))},e.useModel=function(e,t,s=n){const o=pr(),r=I(t),i=O(t),l=Bt(((n,l)=>{let c;return Pn((()=>{const n=e[t];M(c,n)&&(c=n,l())})),{get:()=>(n(),s.get?s.get(c):c),set(e){const n=o.vnode.props;n&&(t in n||r in n||i in n)&&(`onUpdate:${t}`in n||`onUpdate:${r}`in n||`onUpdate:${i}`in n)||!M(e,c)||(c=e,l()),o.emit(`update:${t}`,s.set?s.set(e):e)}}})),c="modelValue"===t?"modelModifiers":`${t}Modifiers`;return l[Symbol.iterator]=()=>{let t=0;return{next:()=>t<2?{value:t++?e[c]||{}:l,done:!1}:{done:!0}}},l},e.useSSRContext=()=>{},e.useSlots=function(){return Os().slots},e.useTransitionState=Kn,e.vModelCheckbox=Di,e.vModelDynamic=zi,e.vModelRadio=ji,e.vModelSelect=Hi,e.vModelText=Vi,e.vShow=oi,e.version=Rr,e.warn=Or,e.watch=Bn,e.watchEffect=function(e,t){return Vn(e,null,t)},e.watchPostEffect=Mn,e.watchSyncEffect=Pn,e.withAsyncContext=function(e){const t=pr();let n=e();return gr(),_(n)&&(n=n.catch((e=>{throw mr(t),e}))),[n,()=>mr(t)]},e.withCtx=gn,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===hn)return e;const s=wr(hn)||hn.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r