dirac-lang 0.1.14 → 0.1.16
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.
- package/config.test.yml +5 -0
- package/dist/{chunk-VOD5GGHB.js → chunk-CP4YCRBG.js} +233 -146
- package/dist/{chunk-SOHSXT3M.js → chunk-FEOBVBSI.js} +4 -2
- package/dist/chunk-HRHAMPOB.js +123 -0
- package/dist/cli.js +4 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -3
- package/dist/{interpreter-FT22JGOO.js → interpreter-GNO4J3HN.js} +2 -1
- package/dist/parser-T6W3WPLU.js +6 -0
- package/dist/{tag-validator-DYWFTEBE.js → tag-validator-CLYGULLQ.js} +10 -8
- package/dist/test-runner.js +6 -5
- package/examples/llm-command-more.di +6 -0
- package/package.json +1 -1
- package/src/runtime/interpreter.ts +10 -0
- package/src/tags/attr.ts +64 -0
- package/src/tags/available-subroutines.ts +19 -6
- package/src/tags/call.ts +4 -0
- package/src/tags/defvar.ts +53 -2
- package/src/tags/foreach.ts +170 -0
- package/src/tags/tag-check.ts +19 -6
- package/src/test-runner.ts +4 -4
- package/src/types/index.ts +1 -0
- package/src/utils/tag-validator.ts +12 -8
- package/tests/available-subroutines-foreach.test.di +32 -0
- package/tests/tag-check.test.di +27 -0
- package/config.yml +0 -9
- package/config.yml.bak +0 -8
- package/config.yml.ollama +0 -6
- package/config.yml.openai +0 -6
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- TEST: tag_check_autocorrect -->
|
|
2
|
+
<!-- EXPECT: The tag <background-set> was auto-corrected to <background> (similarity: 0.84)
|
|
3
|
+
Color changed to: red -->
|
|
4
|
+
|
|
5
|
+
<dirac>
|
|
6
|
+
<subroutine name="background"
|
|
7
|
+
description="Change the background color"
|
|
8
|
+
param-color="string:required:Background color:red|blue|green">
|
|
9
|
+
<parameters select="@color"/>
|
|
10
|
+
<output>Color changed to: <variable name="color" /></output>
|
|
11
|
+
</subroutine>
|
|
12
|
+
|
|
13
|
+
<subroutine name="foreground"
|
|
14
|
+
description="Change the foreground text color"
|
|
15
|
+
param-color="string:required:Text color:black|white|gray">
|
|
16
|
+
<parameters select="@color"/>
|
|
17
|
+
<output>Text color changed to: <variable name="color" /></output>
|
|
18
|
+
</subroutine>
|
|
19
|
+
|
|
20
|
+
<!-- Test: tag-check should auto-correct similar tag names and execute -->
|
|
21
|
+
<defvar name="result" trim="true">
|
|
22
|
+
<tag-check execute="true" autocorrect="true">
|
|
23
|
+
<background-set color="red" />
|
|
24
|
+
</tag-check>
|
|
25
|
+
</defvar>
|
|
26
|
+
<output><variable name="result" /></output>
|
|
27
|
+
</dirac>
|
package/config.yml
DELETED
package/config.yml.bak
DELETED
package/config.yml.ollama
DELETED