You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: decai/README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,7 @@ decai -e host=http://localhost
59
59
decai -e port=11434
60
60
decai -e prompt=Rewrite this function and respond ONLY with code, NO explanations, NO markdown, Change 'goto' into if/else/for/while, Simplify as much as possible, use better variable names, take function arguments and strings from comments like 'string:'
61
61
decai -e ctxfile=
62
+
decai -e headers=
62
63
decai -e cmds=pdc
63
64
decai -e cache=false
64
65
decai -e lang=C
@@ -106,6 +107,14 @@ openapi
106
107
...
107
108
```
108
109
110
+
Extra headers can be injected globally with `decai -e headers=...` or from the
111
+
environment with `DECAI_HEADERS` / `R2AI_HEADERS`. Use one header per line, for
Copy file name to clipboardExpand all lines: decai/src/constants.ts
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ export const VERSION = "1.3.2";
2
2
exportconstCOMMAND="decai";
3
3
4
4
exportconstDEFAULT_PROMPT=
5
-
"Transform this pseudocode and respond ONLY with plain code (NO explanations, comments or markdown), Change 'goto' into if/else/for/while, Simplify as much as possible, use better variable names, take function arguments and strings from comments like 'string:', Reduce lines of code and fit everything in a single function, Remove all dead code";
5
+
"Rewrite this pseudocode into concise and clean code. Output only the provided function. Do not add wrappers, helper examples, test code, or main-like functions. Replace goto with structured control flow, simplify as much as possible, infer types and use better names for variables and parameters, some strings may be appearing as comments, preserve only what is implied by the input, and remove dead code.";
6
6
7
7
exportconstHELP_TEXT={
8
8
decai: `# Using Decai
@@ -27,6 +27,9 @@ These are the most recommended models for decompiling in local:
27
27
28
28
## Common Options
29
29
* 'decai -e baseurl=<url>' override default host and port for API endpoint (e.g., 'http://localhost:11434')
0 commit comments