genaicode 0.9.3 → 0.9.5

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 (136) hide show
  1. package/dist/ai-service/anthropic.js +4 -1
  2. package/dist/ai-service/anthropic.js.map +1 -1
  3. package/dist/ai-service/common.js +1 -1
  4. package/dist/ai-service/common.js.map +1 -1
  5. package/dist/ai-service/openai.js +1 -1
  6. package/dist/ai-service/openai.js.map +1 -1
  7. package/dist/ai-service/service-configurations.js +1 -1
  8. package/dist/ai-service/service-configurations.js.map +1 -1
  9. package/dist/files/cache-file.d.ts +4 -1
  10. package/dist/files/cache-file.js.map +1 -1
  11. package/dist/files/file-id-utils.d.ts +7 -0
  12. package/dist/files/file-id-utils.js +25 -0
  13. package/dist/files/file-id-utils.js.map +1 -0
  14. package/dist/files/read-files.js +8 -8
  15. package/dist/files/read-files.js.map +1 -1
  16. package/dist/files/source-code-tree.js +3 -3
  17. package/dist/files/source-code-tree.js.map +1 -1
  18. package/dist/files/source-code-types.d.ts +21 -3
  19. package/dist/files/summary-cache.d.ts +3 -2
  20. package/dist/files/summary-cache.js +1 -1
  21. package/dist/files/summary-cache.js.map +1 -1
  22. package/dist/main/common/content-bus-types.d.ts +1 -1
  23. package/dist/main/common/content-bus.js +1 -1
  24. package/dist/main/common/content-bus.js.map +1 -1
  25. package/dist/main/config-schema.js +1 -1
  26. package/dist/main/config-schema.js.map +1 -1
  27. package/dist/main/ui/frontend/assets/{index-CSR1NiB_.js → index-Dizqxzws.js} +226 -187
  28. package/dist/main/ui/frontend/index.html +1 -1
  29. package/dist/prompt/ai-service-fallback.js +5 -1
  30. package/dist/prompt/ai-service-fallback.js.map +1 -1
  31. package/dist/prompt/function-calling.js +8 -1
  32. package/dist/prompt/function-calling.js.map +1 -1
  33. package/dist/prompt/function-defs/ask-question.d.ts +3 -0
  34. package/dist/prompt/function-defs/ask-question.js +43 -1
  35. package/dist/prompt/function-defs/ask-question.js.map +1 -1
  36. package/dist/prompt/function-defs/context-compression.d.ts +25 -5
  37. package/dist/prompt/function-defs/context-compression.js +23 -8
  38. package/dist/prompt/function-defs/context-compression.js.map +1 -1
  39. package/dist/prompt/function-defs/conversation-graph.d.ts +33 -0
  40. package/dist/prompt/function-defs/conversation-graph.js +110 -0
  41. package/dist/prompt/function-defs/conversation-graph.js.map +1 -0
  42. package/dist/prompt/function-defs/extract-file-fragments.d.ts +27 -0
  43. package/dist/prompt/function-defs/extract-file-fragments.js +36 -0
  44. package/dist/prompt/function-defs/extract-file-fragments.js.map +1 -0
  45. package/dist/prompt/steps/step-ask-question/ask-question-handler.d.ts +2 -0
  46. package/dist/prompt/steps/step-ask-question/ask-question-handler.js +12 -0
  47. package/dist/prompt/steps/step-ask-question/ask-question-handler.js.map +1 -0
  48. package/dist/prompt/steps/step-ask-question/handlers/code-generation.js +1 -0
  49. package/dist/prompt/steps/step-ask-question/handlers/code-generation.js.map +1 -1
  50. package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.d.ts +47 -0
  51. package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.js +114 -0
  52. package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.js.map +1 -0
  53. package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.d.ts +4 -0
  54. package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.js +169 -0
  55. package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.js.map +1 -0
  56. package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.d.ts +2 -0
  57. package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.js +40 -0
  58. package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.js.map +1 -0
  59. package/dist/prompt/steps/step-ask-question/handlers/handle-context-compression.js +2 -0
  60. package/dist/prompt/steps/step-ask-question/handlers/handle-context-compression.js.map +1 -1
  61. package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.d.ts +2 -0
  62. package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.js +34 -0
  63. package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.js.map +1 -0
  64. package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.d.ts +12 -0
  65. package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.js +243 -0
  66. package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.js.map +1 -0
  67. package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.d.ts +2 -2
  68. package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js +5 -3
  69. package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js.map +1 -1
  70. package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js +2 -0
  71. package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js.map +1 -1
  72. package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js +2 -0
  73. package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js.map +1 -1
  74. package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js +2 -0
  75. package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js.map +1 -1
  76. package/dist/prompt/steps/step-ask-question/handlers/handle-lint.d.ts +6 -0
  77. package/dist/prompt/steps/step-ask-question/handlers/handle-lint.js +105 -0
  78. package/dist/prompt/steps/step-ask-question/handlers/handle-lint.js.map +1 -0
  79. package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js +4 -5
  80. package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js.map +1 -1
  81. package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js +2 -0
  82. package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js.map +1 -1
  83. package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js +2 -0
  84. package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js.map +1 -1
  85. package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js +3 -3
  86. package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js.map +1 -1
  87. package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.d.ts +2 -0
  88. package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.js +88 -0
  89. package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.js.map +1 -0
  90. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.d.ts +8 -0
  91. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.js +136 -0
  92. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.js.map +1 -0
  93. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.d.ts +8 -0
  94. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.js +173 -0
  95. package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.js.map +1 -0
  96. package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.d.ts +2 -0
  97. package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.js +71 -0
  98. package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.js.map +1 -0
  99. package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.d.ts +0 -3
  100. package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js +2 -3
  101. package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js.map +1 -1
  102. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js +2 -0
  103. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js.map +1 -1
  104. package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.d.ts +2 -2
  105. package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js +6 -4
  106. package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js.map +1 -1
  107. package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js +7 -3
  108. package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js.map +1 -1
  109. package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.d.ts +3 -0
  110. package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js +5 -0
  111. package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js.map +1 -0
  112. package/dist/prompt/steps/step-ask-question/step-ask-question-types.d.ts +13 -2
  113. package/dist/prompt/steps/step-ask-question/step-ask-question.d.ts +21 -0
  114. package/dist/prompt/steps/step-ask-question/step-ask-question.js +30 -71
  115. package/dist/prompt/steps/step-ask-question/step-ask-question.js.map +1 -1
  116. package/dist/prompt/steps/step-codegen-planning.js +1 -3
  117. package/dist/prompt/steps/step-codegen-planning.js.map +1 -1
  118. package/dist/prompt/steps/step-context-compression.d.ts +1 -1
  119. package/dist/prompt/steps/step-context-compression.js +130 -34
  120. package/dist/prompt/steps/step-context-compression.js.map +1 -1
  121. package/dist/prompt/steps/step-context-optimization.js +7 -68
  122. package/dist/prompt/steps/step-context-optimization.js.map +1 -1
  123. package/dist/prompt/steps/step-generate-codegen-summary.js +1 -3
  124. package/dist/prompt/steps/step-generate-codegen-summary.js.map +1 -1
  125. package/dist/prompt/steps/step-history-update.js +1 -3
  126. package/dist/prompt/steps/step-history-update.js.map +1 -1
  127. package/dist/prompt/steps/step-process-file-updates.js +0 -3
  128. package/dist/prompt/steps/step-process-file-updates.js.map +1 -1
  129. package/dist/prompt/steps/step-summarization.d.ts +2 -1
  130. package/dist/prompt/steps/step-summarization.js +6 -5
  131. package/dist/prompt/steps/step-summarization.js.map +1 -1
  132. package/dist/prompt/steps/step-verify-patch.js +1 -3
  133. package/dist/prompt/steps/step-verify-patch.js.map +1 -1
  134. package/dist/prompt/systemprompt.js +5 -3
  135. package/dist/prompt/systemprompt.js.map +1 -1
  136. package/package.json +4 -4
@@ -7,7 +7,7 @@
7
7
  <meta name="keywords" content="GenAIcode, AI, code generation, programming" />
8
8
  <title>GenAIcode - AI-Powered Code Generation</title>
9
9
  <link rel="icon" href="/assets/favicon-DvroFOpS.png" type="image/png" />
10
- <script type="module" crossorigin src="/assets/index-CSR1NiB_.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-Dizqxzws.js"></script>
11
11
  <link rel="stylesheet" crossorigin href="/assets/index-S_ocA1xG.css">
12
12
  </head>
13
13
  <body data-security-token="__SECURITY_TOKEN__">
@@ -1,6 +1,7 @@
1
1
  import { putSystemMessage } from '../main/common/content-bus.js';
2
2
  import { askUserForConfirmation } from '../main/common/user-actions.js';
3
3
  import { abortController } from '../main/common/abort-controller.js';
4
+ import { validateAndRecoverSingleResult } from './steps/step-validate-recover.js';
4
5
  export async function handleAiServiceFallback(generateContentFns, options, ...args) {
5
6
  // eslint-disable-next-line no-constant-condition
6
7
  while (true) {
@@ -10,7 +11,10 @@ export async function handleAiServiceFallback(generateContentFns, options, ...ar
10
11
  }
11
12
  try {
12
13
  const result = await generateContentFns[options.aiService](...args);
13
- return result;
14
+ // Attempt to validate and recover the result if necessary
15
+ // If validation/recovery fails we'll handle it in the outer catch
16
+ const validatedResult = await validateAndRecoverSingleResult(args, result, generateContentFns[options.aiService]);
17
+ return validatedResult;
14
18
  }
15
19
  catch (error) {
16
20
  if (error instanceof Error) {
@@ -1 +1 @@
1
- {"version":3,"file":"ai-service-fallback.js","sourceRoot":"","sources":["../../src/prompt/ai-service-fallback.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,kBAAkE,EAClE,OAAuB,EACvB,GAAG,IAAyC;IAE5C,iDAAiD;IACjD,OAAO,IAAI,EAAE,CAAC;QACZ,IAAI,eAAe,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;YACpC,gBAAgB,CAAC,6BAA6B,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;YACnE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAA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,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;oBAClF,MAAM,WAAW,GAAG,MAAM,sBAAsB,CAC9C,kDAAkD,EAClD,IAAI,EACJ,OAAO,EACP,OAAO,EACP,MAAM,CACP,CAAC;oBACF,IAAI,WAAW,CAAC,SAAS,EAAE,CAAC;wBAC1B,SAAS;oBACX,CAAC;yBAAM,CAAC;wBACN,MAAM,KAAK,CAAC;oBACd,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,MAAM,KAAK,CAAC;gBACd,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,0CAA0C;gBAC1C,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -4,7 +4,7 @@ import { getImageAssets } from './function-defs/get-image-assets.js';
4
4
  import { getCodegenSummaryDef } from './function-defs/codegen-summary.js';
5
5
  import { explanation } from './function-defs/explanation.js';
6
6
  import { generateImage } from './function-defs/generate-image.js';
7
- import { getAskQuestionDef, requestPermissions, requestFilesContent, removeFilesFromContext, contextOptimization, searchCode, lint, pullAppContext, pushAppContext, } from './function-defs/ask-question.js';
7
+ import { getAskQuestionDef, requestPermissions, requestFilesContent, removeFilesFromContext, contextOptimization, searchCode, lint, pullAppContext, pushAppContext, requestFilesFragments, sendMessage, } from './function-defs/ask-question.js';
8
8
  import { optimizeContext } from './function-defs/optimize-context.js';
9
9
  import { setSummaries } from './function-defs/set-summaries.js';
10
10
  import { updateHistory } from './function-defs/update-history.js';
@@ -16,6 +16,8 @@ import { analysisResult } from './function-defs/analysis-result.js';
16
16
  import { genaicodeHelpDef } from './function-defs/genaicode-help.js';
17
17
  import { reasoningInference, reasoningInferenceResponse } from './function-defs/reasoning-inference.js';
18
18
  import { compressContext } from './function-defs/context-compression.js';
19
+ import { extractFileFragments } from './function-defs/extract-file-fragments.js';
20
+ import { conversationGraph, evaluateEdge } from './function-defs/conversation-graph.js';
19
21
  /**
20
22
  * Function definitions for function calling feature
21
23
  */
@@ -46,6 +48,11 @@ export function getFunctionDefs() {
46
48
  reasoningInference,
47
49
  compressContext,
48
50
  reasoningInferenceResponse,
51
+ extractFileFragments,
52
+ requestFilesFragments,
53
+ conversationGraph,
54
+ evaluateEdge,
55
+ sendMessage,
49
56
  ...getOperationDefs(),
50
57
  ].map((fd) => {
51
58
  if (!disableExplanations &&
@@ -1 +1 @@
1
- {"version":3,"file":"function-calling.js","sourceRoot":"","sources":["../../src/prompt/function-calling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,UAAU,EACV,IAAI,EACJ,cAAc,EACd,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAEzE;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO;QACL,aAAa;QACb,cAAc;QACd,oBAAoB,EAAE;QACtB,qBAAqB,EAAE;QACvB,WAAW;QACX,aAAa;QACb,iBAAiB,EAAE;QACnB,kBAAkB;QAClB,UAAU;QACV,IAAI;QACJ,mBAAmB;QACnB,sBAAsB;QACtB,mBAAmB;QACnB,eAAe;QACf,YAAY;QACZ,aAAa;QACb,WAAW;QACX,eAAe;QACf,cAAc;QACd,cAAc;QACd,cAAc;QACd,gBAAgB;QAChB,kBAAkB;QAClB,eAAe;QACf,0BAA0B;QAC1B,GAAG,gBAAgB,EAAE;KACtB,CAAC,GAAG,CAAC,CAAC,EAAe,EAAE,EAAE;QACxB,IACE,CAAC,mBAAmB;YACpB,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW;YACpC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAC/C,CAAC;YACD,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAChD,CAAC;aAAM,IAAI,mBAAmB,EAAE,CAAC;YAC/B,OAAO,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC;QAC9C,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"function-calling.js","sourceRoot":"","sources":["../../src/prompt/function-calling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACr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AAmB;QACnB,sBAAsB;QACtB,mBAAmB;QACnB,eAAe;QACf,YAAY;QACZ,aAAa;QACb,WAAW;QACX,eAAe;QACf,cAAc;QACd,cAAc;QACd,cAAc;QACd,gBAAgB;QAChB,kBAAkB;QAClB,eAAe;QACf,0BAA0B;QAC1B,oBAAoB;QACpB,qBAAqB;QACrB,iBAAiB;QACjB,YAAY;QACZ,WAAW;QACX,GAAG,gBAAgB,EAAE;KACtB,CAAC,GAAG,CAAC,CAAC,EAAe,EAAE,EAAE;QACxB,IACE,CAAC,mBAAmB;YACpB,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW;YACpC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAC/C,CAAC;YACD,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAChD,CAAC;aAAM,IAAI,mBAAmB,EAAE,CAAC;YAC/B,OAAO,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC;QAC9C,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { FunctionDef } from '../../ai-service/common-types.js';
2
+ export declare const actionTypeOptions: string[];
2
3
  /**
3
4
  * Function definition for askQuestion
4
5
  *
@@ -6,7 +7,9 @@ import { FunctionDef } from '../../ai-service/common-types.js';
6
7
  * Each actionType serves a specific purpose, ensuring clarity and proper task execution.
7
8
  */
8
9
  export declare const getAskQuestionDef: () => FunctionDef;
10
+ export declare const sendMessage: FunctionDef;
9
11
  export declare const requestFilesContent: FunctionDef;
12
+ export declare const requestFilesFragments: FunctionDef;
10
13
  export declare const removeFilesFromContext: FunctionDef;
11
14
  export declare const contextOptimization: FunctionDef;
12
15
  export declare const requestPermissions: FunctionDef;
@@ -20,10 +20,12 @@ Detailed Explanation of actionTypes:
20
20
  - searchCode: Use to search through source code files with flexible filtering. Supports searching in file contents and names, with pattern matching and case sensitivity options. Useful for finding specific code patterns or references across the codebase.
21
21
  - confirmCodeGeneration: Use to confirm with the user before starting code generation tasks.
22
22
  - endConversation: Use to stop the conversation.
23
+ - requestFilesFragments: Use to request fragments (specific parts) of files based on a given prompt. This is useful when you need only certain sections of files, not their entire content.
23
24
  ${rcConfig.featuresEnabled?.appContext
24
25
  ? `- pullAppContext: Use to retrieve application context values for use in the conversation. This allows accessing shared state between the application and GenAIcode.
25
26
  - pushAppContext: Use to update application context values based on conversation outcomes. This enables persisting conversation results back to the application.`
26
27
  : ''}
28
+ - conversationGraph: Use for complex conversations needing multiple steps and decisions.
27
29
  ${rcConfig.lintCommand ? '- lint: Use to check the code for errors and provide feedback on the quality of the code.' : ''}
28
30
  ${pluginDescriptions}
29
31
  - genaicodeHelp: Use to provide help to the user on how to use GenAIcode. The response will be grounded in the content of GenAIcode's documentation.
@@ -31,7 +33,7 @@ ${pluginDescriptions}
31
33
 
32
34
  This value must be derived from the value of \`decisionMakingProcess\` parameter, and must be one of the above values.`;
33
35
  }
34
- const actionTypeOptions = [
36
+ export const actionTypeOptions = [
35
37
  'sendMessage',
36
38
  'generateImage',
37
39
  'updateFile',
@@ -45,11 +47,13 @@ const actionTypeOptions = [
45
47
  'searchCode',
46
48
  'confirmCodeGeneration',
47
49
  'endConversation',
50
+ 'requestFilesFragments',
48
51
  ...(rcConfig.featuresEnabled?.appContext ? ['pullAppContext', 'pushAppContext'] : []),
49
52
  ...(rcConfig.lintCommand ? ['lint'] : []),
50
53
  ...Array.from(getRegisteredActionHandlers().keys()),
51
54
  'genaicodeHelp',
52
55
  'reasoningInference',
56
+ 'conversationGraph',
53
57
  ];
54
58
  /**
55
59
  * Function definition for askQuestion
@@ -116,6 +120,21 @@ ${actionTypeOptions.map((actionType) => ` - ${actionType}: <reasoning>`).jo
116
120
  required: ['decisionMakingProcess', 'actionType', 'message'],
117
121
  },
118
122
  });
123
+ // sendMessage
124
+ export const sendMessage = {
125
+ name: 'sendMessage',
126
+ description: 'Use this function to send a message to the user.',
127
+ parameters: {
128
+ type: 'object',
129
+ properties: {
130
+ message: {
131
+ type: 'string',
132
+ description: 'The message to display to the user.',
133
+ },
134
+ },
135
+ required: ['message'],
136
+ },
137
+ };
119
138
  // requestFilesContent
120
139
  export const requestFilesContent = {
121
140
  name: 'requestFilesContent',
@@ -135,6 +154,29 @@ export const requestFilesContent = {
135
154
  required: ['filePaths'],
136
155
  },
137
156
  };
157
+ // requestFilesFragments
158
+ export const requestFilesFragments = {
159
+ name: 'requestFilesFragments',
160
+ description: 'Use this function to request fragments of files based on a given prompt. The prompt will be used to extract relevant information from the files.',
161
+ parameters: {
162
+ type: 'object',
163
+ properties: {
164
+ filePaths: {
165
+ type: 'array',
166
+ items: {
167
+ type: 'string',
168
+ },
169
+ minLength: 1,
170
+ description: 'An array of absolute file paths for which you need to extract fragments.',
171
+ },
172
+ fragmentPrompt: {
173
+ type: 'string',
174
+ description: 'A prompt describing what information should be extracted from the files.',
175
+ },
176
+ },
177
+ required: ['filePaths', 'fragmentPrompt'],
178
+ },
179
+ };
138
180
  // removeFilesFromContext
139
181
  export const removeFilesFromContext = {
140
182
  name: 'removeFilesFromContext',
@@ -1 +1 @@
1
- {"version":3,"file":"ask-question.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/ask-question.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,sCAAsC,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAElH,SAAS,wBAAwB;IAC/B,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,sCAAsC,EAAE,CAAC,OAAO,EAAE,CAAC;SACtF,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,MAAM,UAAU,KAAK,WAAW,EAAE,CAAC;SACtE,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;;;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I,EAAE,gBAAgB;IACtB,WAAW,EAAE,wFAAwF;IACrG,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;aACvD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sEAAsE;aACpF;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kDAAkD;aAChE;SACF;QACD,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;KAC3B;CACF,CAAC"}
1
+ {"version":3,"file":"ask-question.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/ask-question.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,sCAAsC,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAElH,SAAS,wBAAwB;IAC/B,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,sCAAsC,EAAE,CAAC,OAAO,EAAE,CAAC;SACtF,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,MAAM,UAAU,KAAK,WAAW,EAAE,CAAC;SACtE,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;;;;;;;;;;;;;;;;;EAkBP,QAAQ,CAAC,eAAe,EAAE,UAAU;QAClC,CAAC,CAAC;iKAC2J;QAC7J,CAAC,CAAC,EACN;;EAEE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,2FAA2F,CAAC,CAAC,CAAC,EAAE;EACvH,kBAAkB;;;;uHAImG,CAAC;AACxH,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAa;IACzC,aAAa;IACb,eAAe;IACf,YAAY;IACZ,YAAY;IACZ,iBAAiB;IACjB,oBAAoB;IACpB,qBAAqB;IACrB,wBAA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AAC;AAEF,iBAAiB;AACjB,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,uFAAuF;IACpG,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2CAA2C;aACzD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oDAAoD;aAClE;SACF;QACD,QAAQ,EAAE,CAAC,KAAK,CAAC;KAClB;CACF,CAAC;AAEF,iBAAiB;AACjB,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,wFAAwF;IACrG,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;aACvD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sEAAsE;aACpF;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kDAAkD;aAChE;SACF;QACD,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;KAC3B;CACF,CAAC"}
@@ -5,6 +5,13 @@ import { FunctionCall, FunctionDef } from '../../ai-service/common-types.js';
5
5
  * This function performs intelligent context compression by analyzing both conversation
6
6
  * history and source code dependencies. It aims to reduce token usage while maintaining
7
7
  * essential information required for high-quality code generation.
8
+ *
9
+ * The compression process:
10
+ * 1. Analyzes conversation history to identify high, medium, and optional priority information
11
+ * 2. Deduplicates redundant information while preserving context
12
+ * 3. Identifies and includes critical file paths based on specific criteria
13
+ * 4. Maintains chronological progression of important decisions
14
+ * 5. Preserves technical details and implementation status
8
15
  */
9
16
  export declare const compressContext: FunctionDef;
10
17
  /**
@@ -13,13 +20,26 @@ export declare const compressContext: FunctionDef;
13
20
  * are compressed and managed.
14
21
  */
15
22
  export type ContextCompressionArgs = {
16
- /** A concise summary of the key points from the conversation history */
23
+ /**
24
+ * A concise summary of the key points from the conversation history.
25
+ * The summary should:
26
+ * - Preserve high-priority information (requirements, decisions, analysis results)
27
+ * - Include relevant medium-priority items (clarifications, preferences)
28
+ * - Maintain chronological order of important events
29
+ * - Keep technical accuracy and context
30
+ */
17
31
  conversationSummary: string;
18
- /** The identified primary intent or goal of the code generation task */
19
- codegenIntent: string;
20
32
  /**
21
- * Optional list of file paths that are essential for the code generation task.
22
- * These files will be retained in the context even after compression.
33
+ * List of file paths that are essential for the code generation task.
34
+ * The list should include:
35
+ * - Files directly targeted for modification
36
+ * - Files containing code being analyzed
37
+ * - Critical dependencies of modified files
38
+ * - Configuration files affecting the changes
39
+ * But exclude:
40
+ * - Files only mentioned in passing
41
+ * - Files from rejected approaches
42
+ * - Files outside the current task scope
23
43
  */
24
44
  filePaths?: string[];
25
45
  };
@@ -4,31 +4,46 @@
4
4
  * This function performs intelligent context compression by analyzing both conversation
5
5
  * history and source code dependencies. It aims to reduce token usage while maintaining
6
6
  * essential information required for high-quality code generation.
7
+ *
8
+ * The compression process:
9
+ * 1. Analyzes conversation history to identify high, medium, and optional priority information
10
+ * 2. Deduplicates redundant information while preserving context
11
+ * 3. Identifies and includes critical file paths based on specific criteria
12
+ * 4. Maintains chronological progression of important decisions
13
+ * 5. Preserves technical details and implementation status
7
14
  */
8
15
  export const compressContext = {
9
16
  name: 'compressContext',
10
17
  description: 'Use this function to compress the context by analyzing both conversation history and source code dependencies. ' +
11
- 'The function returns a compressed version of the conversation that maintains essential information while reducing tokens.',
18
+ 'The function returns a compressed version of the conversation that maintains essential information while reducing tokens. ' +
19
+ 'It prioritizes information (High/Medium/Optional), deduplicates content, and carefully manages file path inclusion.',
12
20
  parameters: {
13
21
  type: 'object',
14
22
  properties: {
15
23
  conversationSummary: {
16
24
  type: 'string',
17
- description: 'A concise summary of the key points from the conversation history.',
18
- },
19
- codegenIntent: {
20
- type: 'string',
21
- description: 'The identified primary intent or goal of the code generation task.',
25
+ description: 'A concise summary of the conversation history, preserving high-priority information ' +
26
+ '(core requirements, expensive operations results, key decisions), medium-priority items ' +
27
+ '(important clarifications, preferences), and optional details when relevant. ' +
28
+ 'The summary should maintain chronological order and technical accuracy.',
22
29
  },
23
30
  filePaths: {
24
31
  type: 'array',
25
32
  items: {
26
33
  type: 'string',
27
34
  },
28
- description: 'List of file paths that are essential for the code generation task.',
35
+ description: 'List of file paths that are essential for the code generation task. Include:\n' +
36
+ '- Files directly involved in code changes\n' +
37
+ '- Files containing analyzed or discussed code\n' +
38
+ '- Critical dependencies of modified files\n' +
39
+ '- Configuration files affecting changes\n' +
40
+ 'Exclude:\n' +
41
+ '- Files only mentioned in passing\n' +
42
+ '- Files from rejected approaches\n' +
43
+ '- Files outside current task scope',
29
44
  },
30
45
  },
31
- required: ['conversationSummary', 'codegenIntent', 'filePaths'],
46
+ required: ['conversationSummary', 'filePaths'],
32
47
  },
33
48
  };
34
49
  //# sourceMappingURL=context-compression.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-compression.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/context-compression.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,iHAAiH;QACjH,2HAA2H;IAC7H,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,mBAAmB,EAAE;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oEAAoE;aAClF;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oEAAoE;aAClF;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;gBACD,WAAW,EAAE,qEAAqE;aACnF;SACF;QACD,QAAQ,EAAE,CAAC,qBAAqB,EAAE,eAAe,EAAE,WAAW,CAAC;KAChE;CACF,CAAC"}
1
+ {"version":3,"file":"context-compression.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/context-compression.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,eAAe,GAAgB;IAC1C,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,iHAAiH;QACjH,4HAA4H;QAC5H,qHAAqH;IACvH,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,mBAAmB,EAAE;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,sFAAsF;oBACtF,0FAA0F;oBAC1F,+EAA+E;oBAC/E,yEAAyE;aAC5E;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;gBACD,WAAW,EACT,gFAAgF;oBAChF,6CAA6C;oBAC7C,iDAAiD;oBACjD,6CAA6C;oBAC7C,2CAA2C;oBAC3C,YAAY;oBACZ,qCAAqC;oBACrC,oCAAoC;oBACpC,oCAAoC;aACvC;SACF;QACD,QAAQ,EAAE,CAAC,qBAAqB,EAAE,WAAW,CAAC;KAC/C;CACF,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { FunctionCall, FunctionDef } from '../../ai-service/common-types.js';
2
+ import { ActionType } from '../steps/step-ask-question/step-ask-question-types.js';
3
+ export declare const conversationGraph: FunctionDef;
4
+ export type ConverationNodeId = string & {
5
+ __type: 'ConverationNodeId';
6
+ };
7
+ export type ConversationEdge = {
8
+ sourceNode: ConverationNodeId;
9
+ targetNode: ConverationNodeId;
10
+ instruction: string;
11
+ };
12
+ export type ConversationNode = {
13
+ id: ConverationNodeId;
14
+ actionType: ActionType;
15
+ instruction: string;
16
+ };
17
+ export type ConversationGraphArgs = {
18
+ entryNode: ConverationNodeId;
19
+ nodes: ConversationNode[];
20
+ edges: ConversationEdge[];
21
+ };
22
+ export type ConversationGraphCall = FunctionCall<ConversationGraphArgs>;
23
+ export declare const evaluateEdge: FunctionDef;
24
+ export type EvaluateEdgeArgs = {
25
+ /** Explanation of why this edge was selected or why no edge was selected */
26
+ reasoning: string;
27
+ /** The selected edge to take, or null if no edge should be taken */
28
+ selectedEdge: ConversationEdge | null;
29
+ /** Whether the conversation should be terminated */
30
+ shouldTerminate: boolean;
31
+ };
32
+ /** Type for function calls with edge evaluation arguments */
33
+ export type EvaluateEdgeCall = FunctionCall<EvaluateEdgeArgs>;
@@ -0,0 +1,110 @@
1
+ import { actionTypeOptions } from './ask-question.js';
2
+ // Function definitions for conversation graph
3
+ export const conversationGraph = {
4
+ name: 'conversationGraph',
5
+ description: 'Define and execute a series of conversation steps to achieve a specific goal. This allows for structured, multi-step conversations with clear transitions between steps.',
6
+ parameters: {
7
+ type: 'object',
8
+ properties: {
9
+ contextAnalysis: {
10
+ type: 'string',
11
+ description: 'A brief summary of the context analysis that led to this conversation graph.',
12
+ },
13
+ bigPicture: {
14
+ type: 'string',
15
+ description: 'A step by step guide to the conversation flow and the desired outcome.',
16
+ },
17
+ entryNode: {
18
+ type: 'string',
19
+ description: 'The ID of the node where the conversation should start. This node must be defined in the `nodes` array.',
20
+ },
21
+ nodes: {
22
+ type: 'array',
23
+ items: {
24
+ type: 'object',
25
+ properties: {
26
+ reasoning: {
27
+ type: 'string',
28
+ description: 'Explanation of what this node is trying to achieve.',
29
+ },
30
+ id: {
31
+ type: 'string',
32
+ description: 'A unique identifier for this conversation step. Use short, descriptive names',
33
+ },
34
+ actionType: {
35
+ type: 'string',
36
+ enum: actionTypeOptions,
37
+ description: 'The action to perform at this step.',
38
+ },
39
+ instruction: {
40
+ type: 'string',
41
+ description: 'Instructions for the LLM on what to achieve at this step. Focus on the desired outcome, not the specific action.',
42
+ },
43
+ },
44
+ required: ['reasoning', 'id', 'actionType', 'instruction'],
45
+ },
46
+ minLength: 1,
47
+ description: 'An array of conversation steps (nodes). Each node defines an action and how to achieve it. The order in the array does not dictate the flow; use `edges` to define transitions.',
48
+ },
49
+ edges: {
50
+ type: 'array',
51
+ items: {
52
+ type: 'object',
53
+ properties: {
54
+ sourceNode: {
55
+ type: 'string',
56
+ description: 'The ID of the node where this transition originates.',
57
+ },
58
+ targetNode: {
59
+ type: 'string',
60
+ description: 'The ID of the node where this transition goes.',
61
+ },
62
+ instruction: {
63
+ type: 'string',
64
+ description: 'Conditions for this transition. Be specific about when to move from the source to the target node.',
65
+ },
66
+ },
67
+ required: ['sourceNode', 'targetNode', 'instruction'],
68
+ },
69
+ minLength: 1,
70
+ description: 'An array of transitions (edges) that define the flow between conversation steps. Each edge specifies when to move from one node to another.',
71
+ },
72
+ },
73
+ required: ['contextAnalysis', 'bigPicture', 'entryNode', 'nodes', 'edges'],
74
+ },
75
+ };
76
+ // Function definitions for edge evaluation
77
+ export const evaluateEdge = {
78
+ name: 'evaluateEdge',
79
+ description: 'Evaluate a conversation edge to determine whether to take the edge, terminate the conversation, or continue evaluating other edges.',
80
+ parameters: {
81
+ type: 'object',
82
+ properties: {
83
+ reasoning: {
84
+ type: 'string',
85
+ description: 'Explanation of why this edge was selected or why no edge was selected',
86
+ },
87
+ selectedEdge: {
88
+ type: 'object',
89
+ description: 'The selected edge to take, or null if no edge should be taken',
90
+ properties: {
91
+ sourceNode: {
92
+ type: 'string',
93
+ description: 'The ID of the node where this transition originates.',
94
+ },
95
+ targetNode: {
96
+ type: 'string',
97
+ description: 'The ID of the node where this transition goes.',
98
+ },
99
+ },
100
+ required: ['sourceNode', 'targetNode'],
101
+ },
102
+ shouldTerminate: {
103
+ type: 'boolean',
104
+ description: 'Whether the conversation should be terminated',
105
+ },
106
+ },
107
+ required: ['reasoning', 'shouldTerminate'],
108
+ },
109
+ };
110
+ //# sourceMappingURL=conversation-graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-graph.js","sourceRoot":"","sources":["../../../src/prompt/function-defs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ACpE;wBACD,UAAU,EAAE;4BACV,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,gDAAgD;yBAC9D;wBACD,WAAW,EAAE;4BACX,IAAI,EAAE,QAAQ;4BACd,WAAW,EACT,oGAAoG;yBACvG;qBACF;oBACD,QAAQ,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC;iBACtD;gBACD,SAAS,EAAE,CAAC;gBACZ,WAAW,EACT,6IAA6I;aAChJ;SACF;QACD,QAAQ,EAAE,CAAC,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC;KAC3E;CACF,CAAC;AA0BF,2CAA2C;AAE3C,MAAM,CAAC,MAAM,YAAY,GAAgB;IACvC,IAAI,EAAE,cAAc;IACpB,WAAW,EACT,qIAAqI;IACvI,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uEAAuE;aACrF;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+DAA+D;gBAC5E,UAAU,EAAE;oBACV,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,sDAAsD;qBACpE;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,gDAAgD;qBAC9D;iBACF;gBACD,QAAQ,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;aACvC;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,+CAA+C;aAC7D;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC;KAC3C;CACF,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { FunctionDef } from '../../ai-service/common-types';
2
+ /**
3
+ * Response from extractFileFragments function
4
+ */
5
+ export declare const extractFileFragments: FunctionDef;
6
+ /**
7
+ * Structure representing a fragment extracted from a file
8
+ */
9
+ export type FileFragment = {
10
+ /** The extracted fragment content */
11
+ content: string;
12
+ /** Explanation of why this fragment was selected */
13
+ reason: string;
14
+ /** The path of the file this fragment was extracted from */
15
+ filePath: string;
16
+ };
17
+ /**
18
+ * Response from extractFileFragments function
19
+ */
20
+ export type ExtractFileFragmentsArgs = {
21
+ /** Array of file paths that were processed */
22
+ filePaths: string[];
23
+ /** Array of extracted fragments with their locations and explanations */
24
+ fragments: FileFragment[];
25
+ /** Explanation of how the fragments were selected and why they are relevant */
26
+ reasoning: string;
27
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Response from extractFileFragments function
3
+ */
4
+ export const extractFileFragments = {
5
+ name: 'extractFileFragments',
6
+ description: 'Response containing extracted fragments from one or more files.',
7
+ parameters: {
8
+ type: 'object',
9
+ properties: {
10
+ fragments: {
11
+ type: 'array',
12
+ items: {
13
+ type: 'object',
14
+ properties: {
15
+ reason: {
16
+ type: 'string',
17
+ description: 'Explanation of why this fragment was selected.',
18
+ },
19
+ content: {
20
+ type: 'string',
21
+ description: 'The extracted fragment content.',
22
+ },
23
+ filePath: {
24
+ type: 'string',
25
+ description: 'The path of the file this fragment was extracted from.',
26
+ },
27
+ },
28
+ required: ['reason', 'content', 'filePath'],
29
+ },
30
+ description: 'Array of extracted fragments with their locations and explanations.',
31
+ },
32
+ },
33
+ required: ['fragments'],
34
+ },
35
+ };
36
+ //# sourceMappingURL=extract-file-fragments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-file-fragments.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/extract-file-fragments.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,iEAAiE;IAC9E,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,MAAM,EAAE;4BACN,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,gDAAgD;yBAC9D;wBACD,OAAO,EAAE;4BACP,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,iCAAiC;yBAC/C;wBACD,QAAQ,EAAE;4BACR,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,wDAAwD;yBACtE;qBACF;oBACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC;iBAC5C;gBACD,WAAW,EAAE,qEAAqE;aACnF;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ActionHandler, ActionType } from './step-ask-question-types';
2
+ export declare function getActionHandler(actionType: ActionType): ActionHandler;
@@ -0,0 +1,12 @@
1
+ import { getRegisteredActionHandlers } from '../../../main/plugin-loader.js';
2
+ import { handlers } from './step-ask-question-handlers.js';
3
+ export function getActionHandler(actionType) {
4
+ // First, check if there's a plugin-provided handler for this action type
5
+ const pluginHandler = getRegisteredActionHandlers().get(actionType);
6
+ if (pluginHandler) {
7
+ return pluginHandler;
8
+ }
9
+ // If no plugin handler is found, use the built-in handlers
10
+ return handlers[actionType] ?? handlers['sendMessage'];
11
+ }
12
+ //# sourceMappingURL=ask-question-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ask-question-handler.js","sourceRoot":"","sources":["../../../../src/prompt/steps/step-ask-question/ask-question-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,MAAM,UAAU,gBAAgB,CAAC,UAAsB;IACrD,yEAAyE;IACzE,MAAM,aAAa,GAAG,2BAA2B,EAAE,CAAC,GAAG,CAAC,UAAgC,CAAC,CAAC;IAC1F,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,2DAA2D;IAC3D,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,aAAa,CAAE,CAAC;AAC1D,CAAC"}
@@ -110,6 +110,7 @@ export async function handleCodeGeneration({ generateContentFn, generateImageFn,
110
110
  }
111
111
  else {
112
112
  putUserMessage(confirmApply.answer || 'Reject code changes.');
113
+ putSystemMessage('Rejecting code changes...');
113
114
  prompt.push({
114
115
  type: 'assistant',
115
116
  text: 'Code changes are generated, now what?',
@@ -1 +1 @@
1
- {"version":3,"file":"code-generation.js","sourceRoot":"","sources":["../../../../../src/prompt/steps/step-ask-question/handlers/code-generation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC/G,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AACnH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAElF,MAAM,CAAC,MAAM,iCAAiC,GAC5C,gFAAgF,CAAC;AAEnF,MAAM,CAAC,MAAM,wBAAwB,GAAG,qCAAqC,CAAC;AAE9E,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,iBAAiB,EACjB,eAAe,EACf,YAA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AC,SAAS;4BAC7B,CAAC,CAAC,gCAAgC;4BAClC,CAAC,CAAC,wCAAwC;qBAC7C;iBACF;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"code-generation.js","sourceRoot":"","sources":["../../../../../src/prompt/steps/step-ask-question/handlers/code-generation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC/G,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AACnH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAElF,MAAM,CAAC,MAAM,iCAAiC,GAC5C,gFAAgF,CAAC;AAEnF,MAAM,CAAC,MAAM,wBAAwB,GAAG,qCAAqC,CAAC;AAE9E,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,MAAM,EACN,OAAO,GACY;IACnB,MAAM,cAAc,GAAG,MAAM,0BAA0B,CAAC,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5F,IAAI,cAAc,KAAK,UAAU,CAAC,KAAK,EAAE,CAAC;QACxC,OAAO;YACL,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,EAAE;SACV,CAAC;IACJ,CAAC;IAED,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