create-claude-code-visualizer 0.1.2 → 0.1.3

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.
package/index.js CHANGED
@@ -292,7 +292,31 @@ PROJECT_ROOT=${projectRoot}
292
292
  if (setupGws) {
293
293
  console.log("");
294
294
 
295
+ // Install the Google Workspace CLI
296
+ info("Installing Google Workspace CLI (@googleworkspace/cli)...");
297
+ run("npm install @googleworkspace/cli", { cwd: projectRoot });
298
+ log("Google Workspace CLI installed");
299
+
300
+ // Authenticate
301
+ console.log("");
302
+ const { gwsAuth } = await prompts({
303
+ type: "select",
304
+ name: "gwsAuth",
305
+ message: "Google Workspace authentication",
306
+ choices: [
307
+ { title: "Login now (opens browser for OAuth)", value: "login" },
308
+ { title: "Skip for now (run 'npx gws auth login' later)", value: "skip" },
309
+ ],
310
+ });
311
+
312
+ if (gwsAuth === "login") {
313
+ run("npx gws auth login", { cwd: projectRoot });
314
+ } else {
315
+ info("Skipping auth. Run later: cd " + projectDir + " && npx gws auth login");
316
+ }
317
+
295
318
  // Install GWS skills from bundled templates
319
+ console.log("");
296
320
  info("Installing Google Workspace skills...");
297
321
  const gwsSkillsSrc = path.join(srcClaude, "skills");
298
322
  const gwsSkillsDst = path.join(dstClaude, "skills");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-code-visualizer",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Run and manage Claude Code agents through a web UI",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -1,32 +1,12 @@
1
1
  import { NextRequest, NextResponse } from "next/server";
2
2
  import { supabase } from "@/lib/supabase";
3
-
4
- const GEMINI_URL = "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-lite-preview:generateContent";
3
+ import { callHaiku } from "@/lib/ai";
5
4
 
6
5
  const SYSTEM_PROMPT =
7
6
  "You name chat conversations. Given the user's first message, generate a very short chat title (2-5 words max). Start with a relevant emoji. Return ONLY the title, nothing else. Examples:\nšŸ› Fix login bug\nšŸ“Š Sales dashboard layout\nšŸš€ Deploy to production\nāœļø Write blog post\nšŸ“§ Email template help";
8
7
 
9
8
  async function generateTitle(message: string): Promise<string> {
10
- const apiKey = process.env.GEMINI_API_KEY;
11
- if (!apiKey) throw new Error("GEMINI_API_KEY not set");
12
-
13
- const res = await fetch(`${GEMINI_URL}?key=${apiKey}`, {
14
- method: "POST",
15
- headers: { "Content-Type": "application/json" },
16
- body: JSON.stringify({
17
- system_instruction: { parts: [{ text: SYSTEM_PROMPT }] },
18
- contents: [{ parts: [{ text: message }] }],
19
- generationConfig: { maxOutputTokens: 30, temperature: 0.7 },
20
- }),
21
- });
22
-
23
- if (!res.ok) {
24
- const body = await res.text();
25
- throw new Error(`Gemini API error ${res.status}: ${body}`);
26
- }
27
-
28
- const data = await res.json();
29
- const text = data.candidates?.[0]?.content?.parts?.[0]?.text || "";
9
+ const text = await callHaiku(SYSTEM_PROMPT, [{ role: "user", content: message }], 30);
30
10
  return text.trim().replace(/^["']|["']$/g, "");
31
11
  }
32
12