mirror of
https://gh.wpcy.net/https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2026-05-01 04:52:18 +08:00
29 lines
774 B
JavaScript
29 lines
774 B
JavaScript
/**
|
|
* Dummy Agent Entry Point
|
|
*
|
|
* Phase A: Manual API testing UI
|
|
* Phase B: Chat UI with Qwen 3 0.6B (to be added later)
|
|
*/
|
|
|
|
import { createRoot } from '@wordpress/element';
|
|
import ApiTestPanel from './components/ApiTestPanel';
|
|
import '../../css/dummy-agent.scss';
|
|
|
|
// Wait for DOM to be ready
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const container = document.getElementById('ppcp-dummy-agent-root');
|
|
|
|
if (container) {
|
|
// Get configuration from localized script
|
|
const config = window.ppcpDummyAgent || {
|
|
agenticUrl: '/wp-json/wc/v3/agentic',
|
|
productsUrl: '/wp-json/wc/v3/products',
|
|
currency: 'USD',
|
|
isSandbox: true
|
|
};
|
|
|
|
// Mount React app
|
|
const root = createRoot(container);
|
|
root.render(<ApiTestPanel config={config} />);
|
|
}
|
|
});
|