Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
309 changes: 291 additions & 18 deletions crates/sharing/src/lib.rs

Large diffs are not rendered by default.

17 changes: 16 additions & 1 deletion crates/web/frontend/src/composables/useApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,22 @@ export function useApi() {
const suffix = qs.toString() ? `?${qs.toString()}` : ''
return fetchJson(`/api/skills/detail/${encodeURIComponent(trigger)}${suffix}`)
},
importSkill: (url) => fetchJson('/api/skills/import', { method: 'POST', body: JSON.stringify({ url }) }),
importSkill: (url, opts = {}) =>
fetchJson('/api/skills/import', {
method: 'POST',
body: JSON.stringify({
url,
conflict_action: opts.conflict_action,
alias_trigger: opts.alias_trigger,
}),
}),
previewSkillImport: (url) =>
fetchJson('/api/skills/preview', { method: 'POST', body: JSON.stringify({ url }) }),
discoverSkills: (q, sources = [], limit = 12) =>
fetchJson('/api/skills/discover', {
method: 'POST',
body: JSON.stringify({ q, sources, limit }),
}),
deleteSkill: (trigger) => fetchJson(`/api/skills/${encodeURIComponent(trigger.replace(/^\//, ''))}`, { method: 'DELETE' }),
getRegistry: () => fetchJson('/api/skill-registry'),

Expand Down
8 changes: 7 additions & 1 deletion crates/web/frontend/src/views/SharingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ const allPersonasSelected = computed(
// API paths: tools/ml/infer.py → bundle key: ml/infer.py
// scripts/train.py → bundle key: scripts/train.py
function apiPathToBundleKey(path) {
return path.startsWith("tools/") ? path.slice("tools/".length) : path;
const normalized = String(path || "").replace(/^\.?\/*/, "");
const withoutAgentHome = normalized.startsWith(".agent007/")
? normalized.slice(".agent007/".length)
: normalized;
return withoutAgentHome.startsWith("tools/")
? withoutAgentHome.slice("tools/".length)
: withoutAgentHome;
}

const allTools = computed(() => {
Expand Down
284 changes: 276 additions & 8 deletions crates/web/frontend/src/views/SkillsView.vue

Large diffs are not rendered by default.

Loading
Loading