@theproductguy/create-mission-control 1.0.25 → 1.0.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theproductguy/create-mission-control",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "Scaffolding tool for Agent OS applications",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,4 +41,4 @@
41
41
  "typescript": "^5.3.3",
42
42
  "vite": "^5.0.10"
43
43
  }
44
- }
44
+ }
@@ -46,9 +46,14 @@ function App() {
46
46
  localStorage.setItem('ide_scheme', scheme);
47
47
  };
48
48
 
49
- const copyToClipboard = (text: string) => {
50
- navigator.clipboard.writeText(text);
51
- toast({ title: "Prompt Copied!", type: "success" });
49
+ const copyToClipboard = async (text: string) => {
50
+ try {
51
+ await navigator.clipboard.writeText(text);
52
+ toast({ title: "Prompt Copied!", type: "success" });
53
+ } catch (err) {
54
+ console.error('Failed to copy:', err);
55
+ toast({ title: "Failed to copy", description: "Please copy manually", type: "error" });
56
+ }
52
57
  };
53
58
 
54
59
  if (loading) return <div className="min-h-screen bg-background text-foreground flex items-center justify-center">Loading Control Center...</div>;
@@ -30,9 +30,15 @@ export const Guidance = ({ phase, title, description, prompt, actionLabel, onAct
30
30
  <div className="flex items-center gap-3 shrink-0">
31
31
  {prompt && (
32
32
  <button
33
- onClick={() => {
34
- navigator.clipboard.writeText(prompt);
35
- toast({ title: "Prompt Copied!", type: 'success' });
33
+ onClick={async () => {
34
+ if (!prompt) return;
35
+ try {
36
+ await navigator.clipboard.writeText(prompt);
37
+ toast({ title: "Prompt Copied!", type: 'success' });
38
+ } catch (err) {
39
+ console.error('Failed to copy', err);
40
+ toast({ title: "Failed to copy", description: "Please copy manually", type: 'error' });
41
+ }
36
42
  }}
37
43
  className="flex items-center gap-2 px-4 py-2.5 bg-secondary hover:bg-secondary/80 text-secondary-foreground font-medium rounded-lg border border-border transition-all shadow-sm hover:shadow"
38
44
  >
@@ -19,11 +19,16 @@ export const CreateSpecModal = ({ runtimeConfig, onClose, onSuccess, openFile }:
19
19
  if (runtimeConfig?.api) {
20
20
  await axios.post(`${runtimeConfig.api}/api/scaffold/spec`, { name });
21
21
  const prompt = `Antigravity, let's shape the spec for '${name}'. Read commands/shape-spec/shape-spec.md.`;
22
- navigator.clipboard.writeText(prompt);
22
+ try {
23
+ await navigator.clipboard.writeText(prompt);
24
+ toast({ title: "Spec created & Prompt copied!", type: 'success' });
25
+ } catch (err) {
26
+ console.error('Failed to copy', err);
27
+ toast({ title: "Spec created", description: "Standard prompt failed to copy", type: 'warning' });
28
+ }
23
29
  setNewSpecName("");
24
30
  onSuccess();
25
31
  openFile(`specs/${name}/spec.md`, `${name} Spec`);
26
- toast({ title: "Spec created & Prompt copied!", type: 'success' });
27
32
  onClose();
28
33
  }
29
34
  }