branch: externals/minuet
commit 3dcf653cd422320cf721f590ff85cd42ad99809c
Author: Milan Glacier <d...@milanglacier.com>
Commit: Milan Glacier <d...@milanglacier.com>

    feat!: change default few shot example.
    
    Key improvements: Better FIM context utilization.
    
    The AI must combine information from:
      - Function signature and loop structure (before cursor)
      - Return statement and usage example (after cursor)
      - To generate appropriate completion logic
---
 minuet.el | 65 ++++++++++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 44 insertions(+), 21 deletions(-)

diff --git a/minuet.el b/minuet.el
index 1a7195d6e1..d27ebf932d 100644
--- a/minuet.el
+++ b/minuet.el
@@ -233,40 +233,63 @@ context after cursor, followed by the context before 
cursor.
 
 (defvar minuet-default-fewshots
   `((:role "user"
-     :content "# language: python
+     :content "# language: javascript
 <contextAfterCursor>
+    return result;
+}
 
-fib(5)
+const processedData = transformData(rawData, {
+    uppercase: true,
+    removeSpaces: false
+});
 <contextBeforeCursor>
-def fibonacci(n):
-    <cursorPosition>")
+function transformData(data, options) {
+    const result = [];
+    for (let item of data) {
+        <cursorPosition>")
     (:role "assistant"
-     :content "    '''
-    Recursive Fibonacci implementation
-    '''
-    if n < 2:
-        return n
-    return fib(n - 1) + fib(n - 2)
+     :content "let processed = item;
+        if (options.uppercase) {
+            processed = processed.toUpperCase();
+        }
+        if (options.removeSpaces) {
+            processed = processed.replace(/\s+/g, '');
+        }
+        result.push(processed);
+    }
 <endCompletion>
-    '''
-    Iterative Fibonacci implementation
-    '''
-    a, b = 0, 1
-    for _ in range(n):
-        a, b = b, a + b
-    return a
+if (typeof item === 'string') {
+            let processed = item;
+            if (options.uppercase) {
+                processed = processed.toUpperCase();
+            }
+            if (options.removeSpaces) {
+                processed = processed.replace(/\s+/g, '');
+            }
+            result.push(processed);
+        } else {
+            result.push(item);
+        }
+    }
 <endCompletion>
 ")))
 
 (defvar minuet-default-fewshots-prefix-first
   `((:role "user"
-     :content "# language: python
+     :content "# language: javascript
 <contextBeforeCursor>
-def fibonacci(n):
-    <cursorPosition>
+function transformData(data, options) {
+    const result = [];
+    for (let item of data) {
+        <cursorPosition>
 <contextAfterCursor>
+    return result;
+}
 
-fib(5)")
+const processedData = transformData(rawData, {
+    uppercase: true,
+    removeSpaces: false
+});")
     ,(cadr minuet-default-fewshots)))
 
 (defvar minuet-claude-options

Reply via email to