feat(ext): expose ext meta data to main world
This commit is contained in:
@@ -23,6 +23,10 @@ export default defineUnlistedScript(() => {
|
||||
return _lastId
|
||||
}
|
||||
|
||||
w.PAGE_AGENT_EXT_INSTALLED = true
|
||||
w.PAGE_AGENT_EXT_VERSION = __EXT_VERSION__
|
||||
w.PAGE_AGENT_EXT_CORE_VERSION = __CORE_VERSION__
|
||||
|
||||
w.execute = async (task: string, llmConfig: LLMConfig, hooks?: ExecuteHooks) => {
|
||||
if (typeof task !== 'string') throw new Error('Task must be a string')
|
||||
if (task.trim().length === 0) throw new Error('Task cannot be empty')
|
||||
|
||||
@@ -7,9 +7,6 @@ import { DEMO_API_KEY, DEMO_BASE_URL, DEMO_MODEL } from '@/agent/constants'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Input } from '@/components/ui/input'
|
||||
|
||||
declare const __EXT_VERSION__: string
|
||||
declare const __CORE_VERSION__: string
|
||||
|
||||
interface ConfigPanelProps {
|
||||
config: LLMConfig | null
|
||||
onSave: (config: LLMConfig) => Promise<void>
|
||||
|
||||
Reference in New Issue
Block a user