@cliptude/cli 0.1.33 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -97,7 +97,8 @@ BOUND_TOOLS: dict[str, str] = {
97
97
 
98
98
  # Tools a widget calls itself (tools/call). ChatGPT wants openai/widgetAccessible on them.
99
99
  WIDGET_CALLED_TOOLS: frozenset[str] = frozenset({
100
- *REVIEW_TOOLS, "list_avatars", "design_voice_previews", "save_designed_voice", "clone_voice", "show_publish_kit",
100
+ *REVIEW_TOOLS, "list_avatars", "list_templates", "upload_vector_character", "design_voice_previews", "save_designed_voice",
101
+ "clone_voice", "show_publish_kit",
101
102
  })
102
103
 
103
104
  # ChatGPT's short status lines while a widget tool runs and after (openai/toolInvocation/*, at most 64 chars).
@@ -8,6 +8,7 @@
8
8
  /*@BASE_CSS@*/
9
9
  .card { cursor: default; }
10
10
  .card .thumb { aspect-ratio: 16 / 9; }
11
+ .card .thumb.character img { object-fit: contain; background: #fff; }
11
12
  .tile { width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 10px; color: #fff; font-weight: 700; font-size: 15px; }
12
13
  .card .body .chips { margin-top: 2px; }
13
14
  .card .actions { padding: 0 10px 10px; margin-top: auto; }
@@ -40,7 +41,12 @@
40
41
 
41
42
  function card(t) {
42
43
  var pic;
44
+ // Avatar Video and Vector Explainer cards show their presenter or character; other formats a coloured tile.
43
45
  if (t.format === "avatar_video" && t.avatar_preview_url) pic = UI.img(t.avatar_preview_url, "", UI.initials(t.avatar_name || t.name));
46
+ else if (t.format === "vector_explainer" && t.character_preview_url) {
47
+ pic = UI.img(t.character_preview_url, "", UI.initials(t.character_name || t.name));
48
+ pic.classList.add("character");
49
+ }
44
50
  else pic = h("span", { class: "thumb" }, [h("span", { class: "tile", style: { background: "linear-gradient(150deg, " + (TILE[t.format] || "#444, #111") + ")" } },
45
51
  [t.format_label || t.format || ""])]);
46
52
  var chips = [t.duration ? t.duration + " min" : "", t.aspect_ratio || "", LIVE[t.format] ? "" : "Retired format"]
@@ -50,7 +56,7 @@
50
56
  h("span", { class: "body" }, [
51
57
  h("span", { class: "name" }, [t.name || "Untitled"]),
52
58
  h("span", { class: "muted" }, [(t.format_label || t.format || "") + (t.voice_name ? " · " + t.voice_name : "") +
53
- (t.avatar_name ? " · " + t.avatar_name : "")]),
59
+ (t.avatar_name ? " · " + t.avatar_name : "") + (t.character_name ? " · " + t.character_name : "")]),
54
60
  chips.length ? h("span", { class: "chips" }, chips) : null
55
61
  ]),
56
62
  h("span", { class: "actions" }, [h("button", { type: "button", class: LIVE[t.format] ? "primary" : "",
@@ -65,15 +71,33 @@
65
71
  var hidden = rows.length - live.length;
66
72
  var shown = showAll ? rows : live;
67
73
  all.hidden = hidden === 0;
68
- all.textContent = showAll ? "Live formats only" : "Show all (" + hidden + " more)";
74
+ all.textContent = showAll ? "Hide retired formats" : "Show retired formats (" + hidden + ")";
69
75
  all.setAttribute("aria-pressed", String(showAll));
70
76
  var total = data.count || rows.length;
71
- document.getElementById("count").textContent = total > rows.length ? rows.length + " of " + total : rows.length + " saved";
77
+ document.getElementById("count").textContent = shown.length + " shown" + (total > rows.length ? " · " + total + " saved" : "");
72
78
  if (!rows.length) { UI.status(content, "No templates yet. Ask Claude to make one: it walks you through the voice, look and music."); return; }
73
79
  if (!shown.length) { UI.status(content, "None of your templates uses a format Cliptude makes today. Show all to see them, or ask Claude to make a new one."); return; }
74
80
  var grid = h("div", { class: "grid wide", role: "list" });
75
81
  shown.forEach(function (t) { grid.appendChild(card(t)); });
76
82
  UI.clear(content).appendChild(grid);
83
+ if (total > rows.length && Cliptude.canCallTools()) {
84
+ content.appendChild(h("div", { class: "toolbar" }, [h("button", { type: "button", onclick: loadMore }, ["Load more templates"])]));
85
+ }
86
+ }
87
+
88
+ function loadMore(event) {
89
+ var button = event.currentTarget;
90
+ button.disabled = true;
91
+ var rows = data.results || [];
92
+ Cliptude.callTool("list_templates", { offset: rows.length, limit: 50 }).then(function (more) {
93
+ var seen = {};
94
+ rows.forEach(function (t) { seen[t.id] = true; });
95
+ ((more && more.results) || []).forEach(function (t) { if (!seen[t.id]) rows.push(t); });
96
+ data.results = rows;
97
+ if (more && more.count) data.count = more.count;
98
+ render();
99
+ Cliptude.reportSize();
100
+ }).catch(function () { button.disabled = false; UI.toast("Could not load more templates."); });
77
101
  }
78
102
 
79
103
  all.addEventListener("click", function () { showAll = !showAll; render(); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cliptude/cli",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "description": "Cliptude CLI — generate videos from saved templates.",
5
5
  "homepage": "https://github.com/cliptude/cliptude#readme",
6
6
  "bin": {
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cliptude-mcp"
7
- version = "0.1.33"
7
+ version = "0.1.34"
8
8
  description = "Cliptude jobs CLI and MCP server (thin client of /api/v1)."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"