genaicode 0.8.1 → 0.8.2

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 (39) hide show
  1. package/dist/ai-service/chat-gpt.js +1 -1
  2. package/dist/eval/data/current-prompt.d.ts +93 -0
  3. package/dist/eval/data/current-prompt.js +239 -29
  4. package/dist/eval/data/current-prompt.js.map +1 -1
  5. package/dist/eval/prompt-debug.test.js +20 -3
  6. package/dist/eval/prompt-debug.test.js.map +1 -1
  7. package/dist/main/codegen.d.ts +3 -1
  8. package/dist/main/codegen.js +12 -6
  9. package/dist/main/codegen.js.map +1 -1
  10. package/dist/main/ui/backend/api.js +32 -0
  11. package/dist/main/ui/backend/api.js.map +1 -1
  12. package/dist/main/ui/backend/service.d.ts +3 -0
  13. package/dist/main/ui/backend/service.js +34 -1
  14. package/dist/main/ui/backend/service.js.map +1 -1
  15. package/dist/main/ui/frontend/assets/index-qlaz_iM9.js +1014 -0
  16. package/dist/main/ui/frontend/index.html +1 -1
  17. package/dist/operations/create-file/create-file-def.js +3 -1
  18. package/dist/operations/create-file/create-file-def.js.map +1 -1
  19. package/dist/prompt/function-defs/codegen-summary.js +6 -6
  20. package/dist/prompt/function-defs/codegen-summary.js.map +1 -1
  21. package/dist/prompt/static-prompts.d.ts +1 -1
  22. package/dist/prompt/static-prompts.js +1 -1
  23. package/dist/prompt/static-prompts.js.map +1 -1
  24. package/dist/prompt/steps/step-ask-question/handlers/code-generation.js +11 -2
  25. package/dist/prompt/steps/step-ask-question/handlers/code-generation.js.map +1 -1
  26. package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js +24 -8
  27. package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js.map +1 -1
  28. package/dist/prompt/steps/step-ask-question/step-ask-question-types.d.ts +1 -0
  29. package/dist/prompt/steps/step-ask-question/step-ask-question.js +2 -1
  30. package/dist/prompt/steps/step-ask-question/step-ask-question.js.map +1 -1
  31. package/dist/prompt/steps/step-codegen-planning.js +8 -2
  32. package/dist/prompt/steps/step-codegen-planning.js.map +1 -1
  33. package/dist/prompt/steps/step-ensure-context.d.ts +1 -1
  34. package/dist/prompt/steps/step-ensure-context.js +29 -15
  35. package/dist/prompt/steps/step-ensure-context.js.map +1 -1
  36. package/dist/prompt/steps/step-ensure-context.test.js +94 -10
  37. package/dist/prompt/steps/step-ensure-context.test.js.map +1 -1
  38. package/package.json +2 -2
  39. package/dist/main/ui/frontend/assets/index-QOcNx5ac.js +0 -812
@@ -8,7 +8,7 @@ import { modelOverrides } from '../main/config.js';
8
8
  */
9
9
  export async function generateContent(prompt, functionDefs, requiredFunctionName, temperature, cheap = false) {
10
10
  const openai = new OpenAI();
11
- const defaultModel = cheap ? 'gpt-4o-mini' : 'gpt-4o-2024-08-06';
11
+ const defaultModel = cheap ? 'gpt-4o-mini' : 'gpt-4o-2024-11-20';
12
12
  const model = cheap
13
13
  ? (modelOverrides.chatGpt?.cheap ?? defaultModel)
14
14
  : (modelOverrides.chatGpt?.default ?? defaultModel);
@@ -53,4 +53,97 @@ export const DEBUG_CURRENT_PROMPT: ({
53
53
  systemPrompt?: undefined;
54
54
  text?: undefined;
55
55
  functionCalls?: undefined;
56
+ } | {
57
+ type: string;
58
+ functionResponses: {
59
+ name: string;
60
+ content: string;
61
+ }[];
62
+ systemPrompt?: undefined;
63
+ text?: undefined;
64
+ functionCalls?: undefined;
65
+ cache?: undefined;
66
+ } | {
67
+ type: string;
68
+ functionCalls: {
69
+ id: string;
70
+ name: string;
71
+ args: {
72
+ problemAnalysis: string;
73
+ codeChanges: string;
74
+ affectedFiles: {
75
+ reason: string;
76
+ filePath: string;
77
+ dependencies: string[];
78
+ }[];
79
+ };
80
+ }[];
81
+ systemPrompt?: undefined;
82
+ text?: undefined;
83
+ functionResponses?: undefined;
84
+ cache?: undefined;
85
+ } | {
86
+ type: string;
87
+ functionResponses: {
88
+ name: string;
89
+ call_id: string;
90
+ }[];
91
+ cache: boolean;
92
+ systemPrompt?: undefined;
93
+ text?: undefined;
94
+ functionCalls?: undefined;
95
+ } | {
96
+ type: string;
97
+ functionCalls: {
98
+ id: string;
99
+ name: string;
100
+ args: {
101
+ explanation: string;
102
+ fileUpdates: {
103
+ filePath: string;
104
+ prompt: string;
105
+ updateToolName: string;
106
+ }[];
107
+ contextPaths: string[];
108
+ };
109
+ }[];
110
+ systemPrompt?: undefined;
111
+ text?: undefined;
112
+ functionResponses?: undefined;
113
+ cache?: undefined;
114
+ } | {
115
+ type: string;
116
+ functionResponses: {
117
+ name: string;
118
+ call_id: string;
119
+ }[];
120
+ cache: boolean;
121
+ text: string;
122
+ systemPrompt?: undefined;
123
+ functionCalls?: undefined;
124
+ } | {
125
+ type: string;
126
+ functionCalls: {
127
+ id: string;
128
+ name: string;
129
+ args: {
130
+ filePath: string;
131
+ explanation: string;
132
+ newContent: string;
133
+ };
134
+ }[];
135
+ systemPrompt?: undefined;
136
+ text?: undefined;
137
+ functionResponses?: undefined;
138
+ cache?: undefined;
139
+ } | {
140
+ type: string;
141
+ text: string;
142
+ functionResponses: {
143
+ name: string;
144
+ call_id: string;
145
+ }[];
146
+ systemPrompt?: undefined;
147
+ functionCalls?: undefined;
148
+ cache?: undefined;
56
149
  })[];