feat(cli-tools): update CLI tools and add new models

- Add Droid and OpenClaw tool cards to CLI tools
- Enhance ClaudeToolCard and CodexToolCard to display current base URLs
This commit is contained in:
decolua
2026-02-06 20:53:20 +07:00
parent f68ef4c933
commit a2122e3e48
41 changed files with 1123 additions and 9 deletions

View File

@@ -147,6 +147,12 @@ export async function getProviderNodeById(id) {
*/
export async function createProviderNode(data) {
const db = await getDb();
// Initialize providerNodes if undefined (backward compatibility)
if (!db.data.providerNodes) {
db.data.providerNodes = [];
}
const now = new Date().toISOString();
const node = {
@@ -171,6 +177,10 @@ export async function createProviderNode(data) {
*/
export async function updateProviderNode(id, data) {
const db = await getDb();
if (!db.data.providerNodes) {
db.data.providerNodes = [];
}
const index = db.data.providerNodes.findIndex((node) => node.id === id);
if (index === -1) return null;
@@ -191,6 +201,10 @@ export async function updateProviderNode(id, data) {
*/
export async function deleteProviderNode(id) {
const db = await getDb();
if (!db.data.providerNodes) {
db.data.providerNodes = [];
}
const index = db.data.providerNodes.findIndex((node) => node.id === id);
if (index === -1) return null;