Skip to content

Commit d93c319

Browse files
committed
chore: Introduce CTHelpers in ts-transformers serving imported symbols.
As a part of the "pretransform" step, we replace the CTS enable directive with a wildcard import for "commontools" module that is used when injecting new functionality via transformations. Remove unused imports from various patterns that are now injected by the transformers.
1 parent af92f81 commit d93c319

File tree

102 files changed

+704
-969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+704
-969
lines changed

packages/patterns/array-in-cell-ast-nocomponents.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import {
33
Cell,
44
Default,
5-
derive,
65
h,
76
handler,
87
NAME,
98
recipe,
10-
Stream,
119
UI,
1210
} from "commontools";
1311

packages/patterns/array-in-cell-with-remove-ast-nocomponents.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import {
33
Cell,
44
Default,
5-
derive,
65
h,
76
handler,
87
NAME,

packages/patterns/array-in-cell-with-remove-editable.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import {
33
Cell,
44
Default,
5-
derive,
65
h,
76
handler,
87
NAME,
98
recipe,
10-
Stream,
119
UI,
1210
} from "commontools";
1311

packages/patterns/charm-ref-in-cell.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import {
33
Cell,
44
cell,
5-
createCell,
65
Default,
76
derive,
87
h,

packages/patterns/chatbot-list-view.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
Cell,
44
cell,
55
Default,
6-
derive,
76
h,
87
handler,
98
ID,

packages/patterns/chatbot-note-composed.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,18 @@ import {
44
Cell,
55
cell,
66
Default,
7-
derive,
8-
fetchData,
9-
getRecipeEnvironment,
107
h,
118
handler,
12-
ID,
13-
ifElse,
14-
JSONSchema,
15-
lift,
16-
llm,
17-
llmDialog,
189
NAME,
1910
navigateTo,
2011
OpaqueRef,
2112
recipe,
22-
str,
23-
Stream,
24-
toSchema,
25-
UI,
2613
} from "commontools";
2714

2815
import Chat from "./chatbot.tsx";
2916
import Note from "./note.tsx";
3017
import { type BacklinksMap } from "./backlinks-index.tsx";
31-
import Tools, {
18+
import {
3219
addListItem,
3320
calculator,
3421
ListItem,

packages/patterns/chatbot-outliner.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,15 @@
22
import {
33
BuiltInLLMMessage,
44
Cell,
5-
cell,
65
Default,
7-
derive,
8-
fetchData,
9-
getRecipeEnvironment,
106
h,
117
handler,
12-
ID,
138
ifElse,
149
JSONSchema,
15-
lift,
16-
llm,
17-
llmDialog,
1810
NAME,
1911
navigateTo,
2012
OpaqueRef,
2113
recipe,
22-
str,
23-
Stream,
2414
UI,
2515
} from "commontools";
2616

packages/patterns/chatbot.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@ import {
99
generateObject,
1010
h,
1111
handler,
12-
ifElse,
13-
JSONSchema,
14-
lift,
15-
llm,
1612
llmDialog,
1713
NAME,
1814
recipe,
19-
str,
2015
Stream,
2116
UI,
2217
} from "commontools";

packages/patterns/cheeseboard.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
/// <cts-enable />
2-
import {
3-
Cell,
4-
cell,
5-
Default,
6-
derive,
7-
fetchData,
8-
h,
9-
handler,
10-
ifElse,
11-
lift,
12-
NAME,
13-
recipe,
14-
UI,
15-
} from "commontools";
2+
import { fetchData, h, lift, NAME, recipe, UI } from "commontools";
163

174
/**
185
* Fetch the Cheeseboard pizza schedule via Toolshed's web-read endpoint and

packages/patterns/common-tools.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
/// <cts-enable />
22
import {
3-
BuiltInLLMMessage,
43
BuiltInLLMTool,
54
Cell,
6-
cell,
7-
Default,
85
derive,
96
fetchData,
107
h,
118
handler,
129
ifElse,
13-
llmDialog,
14-
NAME,
1510
recipe,
16-
Stream,
17-
UI,
1811
} from "commontools";
1912

2013
///// COMMON TOOLS (get it?) ////

0 commit comments

Comments
 (0)