create-interview-cockpit 0.5.0 → 0.7.0

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.
Files changed (30) hide show
  1. package/package.json +1 -1
  2. package/template/client/package-lock.json +734 -1
  3. package/template/client/package.json +1 -0
  4. package/template/client/src/App.tsx +3 -0
  5. package/template/client/src/api.ts +384 -4
  6. package/template/client/src/components/AiSettingsModal.tsx +818 -425
  7. package/template/client/src/components/ChatMessage.tsx +34 -12
  8. package/template/client/src/components/ChatView.tsx +298 -121
  9. package/template/client/src/components/CodeContextPanel.tsx +530 -2
  10. package/template/client/src/components/CodeRunnerModal.tsx +1895 -120
  11. package/template/client/src/components/DocRefModal.tsx +55 -6
  12. package/template/client/src/components/FileAttachments.tsx +20 -4
  13. package/template/client/src/components/InfraLabModal.tsx +1706 -0
  14. package/template/client/src/components/LinkedConvosPicker.tsx +128 -0
  15. package/template/client/src/components/MarkdownRenderer.tsx +22 -8
  16. package/template/client/src/components/NotesModal.tsx +977 -0
  17. package/template/client/src/components/PlotEmbed.tsx +173 -0
  18. package/template/client/src/components/Sidebar.tsx +184 -0
  19. package/template/client/src/components/VizCraftEmbed.tsx +257 -13
  20. package/template/client/src/components/WorkspaceSwitcher.tsx +4 -0
  21. package/template/client/src/infraLab.ts +124 -0
  22. package/template/client/src/reactLab.ts +960 -0
  23. package/template/client/src/store.ts +250 -6
  24. package/template/client/src/types.ts +36 -3
  25. package/template/client/tsconfig.tsbuildinfo +1 -1
  26. package/template/cockpit.json +1 -1
  27. package/template/server/src/google-drive.ts +39 -3
  28. package/template/server/src/index.ts +954 -52
  29. package/template/server/src/infra-runner.ts +1104 -0
  30. package/template/server/src/storage.ts +22 -3
@@ -45,6 +45,8 @@ export interface Topic {
45
45
  id: string;
46
46
  name: string;
47
47
  contextFiles: ContextFile[];
48
+ /** Topic-wide system prompt prepended to every question's context in this topic. */
49
+ systemContext?: string;
48
50
  createdAt: string;
49
51
  }
50
52
 
@@ -56,8 +58,20 @@ export interface ContextFile {
56
58
  createdAt: string;
57
59
  /** Distinguishes how this file was added. 'upload' = user-uploaded doc,
58
60
  * 'user' = code saved from Code Runner, 'ai' = AI-generated code block,
59
- * 'sandbox' = paired server+client sandbox saved as JSON. */
60
- origin?: "user" | "ai" | "upload" | "sandbox";
61
+ * 'sandbox' = paired server+client sandbox saved as JSON,
62
+ * 'infra' = Terraform-style infra lab workspace saved as JSON,
63
+ * 'react' = React + TypeScript lab workspace,
64
+ * 'nextjs' = Next.js App Router lab workspace,
65
+ * 'module-federation' = Webpack Module Federation lab workspace. */
66
+ origin?:
67
+ | "user"
68
+ | "ai"
69
+ | "upload"
70
+ | "sandbox"
71
+ | "infra"
72
+ | "react"
73
+ | "nextjs"
74
+ | "module-federation";
61
75
  /** Language hint for code snippets (e.g. 'typescript', 'javascript'). */
62
76
  language?: string;
63
77
  /** Short display label for code snippets. */
@@ -107,7 +121,7 @@ export interface StoredCodeAnnotation {
107
121
  export interface Question {
108
122
  id: string;
109
123
  topicId: string;
110
- parentQuestionId?: string;
124
+ parentQuestionId?: string | null;
111
125
  title: string;
112
126
  systemContext: string;
113
127
  codeContextFiles: string[];
@@ -117,6 +131,8 @@ export interface Question {
117
131
  readingBookmark?: ReadingBookmark;
118
132
  /** Code-line annotations keyed by file path. */
119
133
  codeAnnotations?: { [filePath: string]: StoredCodeAnnotation[] };
134
+ /** IDs of sibling questions whose conversation history is injected as context. */
135
+ linkedConversationIds?: string[];
120
136
  createdAt: string;
121
137
  }
122
138
 
@@ -883,6 +899,8 @@ export interface AiSettings {
883
899
  responseProfiles: Record<string, ResponseProfile>;
884
900
  /** Full viz diagram spec reference — returned by the getVizGuide tool. */
885
901
  vizGuide: string;
902
+ /** Full plotting spec reference — returned by the getPlotGuide tool. */
903
+ plotGuide: string;
886
904
  /** All user-selectable prompt groups. Add new entries here to extend the UI. */
887
905
  promptGroups: Record<string, PromptGroup>;
888
906
  /** Gemini thinking budget in tokens. 0 = disabled. Only applies to Google models. */
@@ -900,6 +918,7 @@ const DEFAULT_AI_SETTINGS: AiSettings = {
900
918
  normal: { maxOutputTokens: 3000, maxSteps: 5 },
901
919
  },
902
920
  vizGuide: "No viz guide configured.",
921
+ plotGuide: "No plot guide configured.",
903
922
  promptGroups: {
904
923
  length: {
905
924
  label: "Response Length",