@datagrok/grokky 1.0.4
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/.eslintignore +2 -0
- package/.eslintrc.json +48 -0
- package/CHANGELOG.md +26 -0
- package/README.md +3 -0
- package/css/ai.css +200 -0
- package/detectors.js +9 -0
- package/dist/package-test.js +1738 -0
- package/dist/package-test.js.map +1 -0
- package/dist/package.js +92488 -0
- package/dist/package.js.map +1 -0
- package/dockerfiles/claude-runtime/.dockerignore +4 -0
- package/dockerfiles/claude-runtime/Dockerfile +27 -0
- package/dockerfiles/claude-runtime/container.json +5 -0
- package/dockerfiles/claude-runtime/package-lock.json +448 -0
- package/dockerfiles/claude-runtime/package.json +20 -0
- package/dockerfiles/claude-runtime/src/server.ts +273 -0
- package/dockerfiles/claude-runtime/src/types.ts +37 -0
- package/dockerfiles/claude-runtime/tsconfig.json +15 -0
- package/dockerfiles/mcp-server/Dockerfile +12 -0
- package/dockerfiles/mcp-server/container.json +1 -0
- package/dockerfiles/mcp-server/package-lock.json +1178 -0
- package/dockerfiles/mcp-server/package.json +15 -0
- package/dockerfiles/mcp-server/src/api-client.ts +100 -0
- package/dockerfiles/mcp-server/src/index.ts +155 -0
- package/dockerfiles/mcp-server/tsconfig.json +13 -0
- package/package.json +126 -0
- package/package.png +0 -0
- package/src/ai-panel.ts +174 -0
- package/src/claude-code/claude-panel.ts +34 -0
- package/src/claude-code/claude-runtime-client.ts +148 -0
- package/src/llm-utils/LLM-client.ts +251 -0
- package/src/llm-utils/combined-search.ts +162 -0
- package/src/llm-utils/creds.ts +30 -0
- package/src/llm-utils/db-index-tools.ts +642 -0
- package/src/llm-utils/deepwikiclient.ts +118 -0
- package/src/llm-utils/depr/AI-API-providers/openai-chat-completions-provider.ts +115 -0
- package/src/llm-utils/depr/AI-API-providers/openai-responses-provider.ts +108 -0
- package/src/llm-utils/depr/AI-API-providers/types.ts +106 -0
- package/src/llm-utils/depr/depr.ts +235 -0
- package/src/llm-utils/depr/embeddings.ts +58 -0
- package/src/llm-utils/depr/sql-utils.ts +377 -0
- package/src/llm-utils/indexes/biologics-index.ts +1098 -0
- package/src/llm-utils/indexes/chembl-index.ts +10074 -0
- package/src/llm-utils/indexes/dg-repository-index.ts +266 -0
- package/src/llm-utils/panel.ts +866 -0
- package/src/llm-utils/query-matching.ts +370 -0
- package/src/llm-utils/query-meta-utils.ts +106 -0
- package/src/llm-utils/script-tools.ts +784 -0
- package/src/llm-utils/sql-tools.ts +840 -0
- package/src/llm-utils/storage.ts +201 -0
- package/src/llm-utils/tableview-tools.ts +704 -0
- package/src/llm-utils/ui.ts +315 -0
- package/src/package-api.ts +83 -0
- package/src/package-test.ts +16 -0
- package/src/package.g.ts +122 -0
- package/src/package.ts +275 -0
- package/src/prompt-engine/chatgpt-assistant.ts +257 -0
- package/src/prompt-engine/interfaces.ts +170 -0
- package/src/prompt-engine/prompt-engine.ts +52 -0
- package/src/prompt-engine/rendering-tools.ts +103 -0
- package/src/prompts/is-help-request.ts +26 -0
- package/src/utils.ts +174 -0
- package/src/viewers-ai.ts +67 -0
- package/tsconfig.json +72 -0
- package/webpack.config.js +49 -0
package/.eslintignore
ADDED
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true,
|
|
4
|
+
"es2020": true
|
|
5
|
+
},
|
|
6
|
+
"extends": [
|
|
7
|
+
"google"
|
|
8
|
+
],
|
|
9
|
+
"parser": "@typescript-eslint/parser",
|
|
10
|
+
"parserOptions": {
|
|
11
|
+
"ecmaVersion": 2022,
|
|
12
|
+
"project": "./packages/Grokky/tsconfig.json",
|
|
13
|
+
"sourceType": "module"
|
|
14
|
+
},
|
|
15
|
+
"plugins": [
|
|
16
|
+
"@typescript-eslint"
|
|
17
|
+
],
|
|
18
|
+
"rules": {
|
|
19
|
+
"indent": ["error", 2, {"SwitchCase": 0}],
|
|
20
|
+
"max-len": ["error", 120],
|
|
21
|
+
"max-params": ["warn", 7],
|
|
22
|
+
"no-throw-literal": "error",
|
|
23
|
+
"no-unused-vars": "off",
|
|
24
|
+
"@typescript-eslint/no-unused-vars": ["warn", { "varsIgnorePattern": "^(_|ui$|grok$|DG$)", "argsIgnorePattern": "^_"}],
|
|
25
|
+
"require-jsdoc": "off",
|
|
26
|
+
"valid-jsdoc": "off",
|
|
27
|
+
"spaced-comment": "off",
|
|
28
|
+
"linebreak-style": "off",
|
|
29
|
+
"quote-props": "off",
|
|
30
|
+
"curly": [
|
|
31
|
+
"error",
|
|
32
|
+
"multi-or-nest"
|
|
33
|
+
],
|
|
34
|
+
"brace-style": [
|
|
35
|
+
"error",
|
|
36
|
+
"1tbs",
|
|
37
|
+
{
|
|
38
|
+
"allowSingleLine": true
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"block-spacing": [2, "always"],
|
|
42
|
+
"comma-dangle": "off",
|
|
43
|
+
"comma-spacing": "error",
|
|
44
|
+
"comma-style": "error",
|
|
45
|
+
"guard-for-in": "off",
|
|
46
|
+
"space-infix-ops": "error"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ChatGPT changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.4 (2026-02-01)
|
|
4
|
+
|
|
5
|
+
* GPT: Azure compatible client
|
|
6
|
+
* AI: Made a namespace, made a nested config, improved namings
|
|
7
|
+
* Got rid of "latest" versions
|
|
8
|
+
* GPT: Refactor to Vercel AI
|
|
9
|
+
|
|
10
|
+
## 1.0.1 (2025-12-18)
|
|
11
|
+
|
|
12
|
+
* ChatGPT: Move stuff to proxy
|
|
13
|
+
|
|
14
|
+
## 1.0.0 (2025-12-17)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* ChatGpt: Invoking function and chains of functions
|
|
19
|
+
* ChatGPT: Fuzzy matching
|
|
20
|
+
* AI: Powersearch Search AI features
|
|
21
|
+
* ChatGPT: Add structured output and reuse Gemini session to avoid recreating on each call
|
|
22
|
+
* ChatGPT: AI sql
|
|
23
|
+
|
|
24
|
+
### Bug fixes
|
|
25
|
+
|
|
26
|
+
* GROK-19198: Duplicating AI icons issue
|
package/README.md
ADDED
package/css/ai.css
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
.ai-panel-question {
|
|
2
|
+
font-style: italic;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.ai-panel-answer {}
|
|
6
|
+
|
|
7
|
+
.ai-execute-plan {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 10px;
|
|
11
|
+
line-height: 1.2;
|
|
12
|
+
background: var(--surface);
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
padding: 8px 12px;
|
|
15
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ai-execute-result {
|
|
19
|
+
margin-top: 10px;
|
|
20
|
+
background: var(--surface-variant);
|
|
21
|
+
padding: 8px 12px;
|
|
22
|
+
border-radius: 8px;
|
|
23
|
+
user-select: text !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ai-execute-plan .d4-accordion {
|
|
27
|
+
margin-left: -10px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.d4-ai-generation-panel {
|
|
31
|
+
height: 100%;
|
|
32
|
+
padding: 8px;
|
|
33
|
+
width: 100%;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: 8px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.d4-ai-generation-panel .d4-ai-panel-input-area {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
gap: 4px;
|
|
43
|
+
padding: 6px;
|
|
44
|
+
padding-bottom: 16px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.d4-ai-generation-panel .d4-ai-panel-input-area select {
|
|
48
|
+
height: 20px;
|
|
49
|
+
font-size: 10px;
|
|
50
|
+
max-width: 100px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.d4-ai-generation-panel .d4-ai-panel-input-controls {
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 4px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.d4-ai-generation-panel .d4-ai-panel-run-controls i {
|
|
59
|
+
margin-left: 8px;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.d4-ai-generation-panel textarea.d4-ai-input-textarea {
|
|
64
|
+
resize: none;
|
|
65
|
+
flex-grow: 1;
|
|
66
|
+
min-height: 80px;
|
|
67
|
+
max-height: 200px;
|
|
68
|
+
font-size: 14px;
|
|
69
|
+
border: 1px solid var(--grey-1);
|
|
70
|
+
outline: none;
|
|
71
|
+
border-radius: 8px;
|
|
72
|
+
box-shadow: 0px 0px 2px var(--steel-1);
|
|
73
|
+
background: var(--grey-1);
|
|
74
|
+
padding: 4px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.d4-ai-generation-panel .d4-ai-panel-output-area {
|
|
78
|
+
display: flex;
|
|
79
|
+
|
|
80
|
+
overflow: scroll;
|
|
81
|
+
width: 100%;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
margin-top: auto;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.d4-ai-messages-accordion-pane pre {
|
|
87
|
+
margin-left: 0px !important;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.d4-ai-generation-panel .d4-ai-user-prompt-container {
|
|
91
|
+
width: 100%;
|
|
92
|
+
display: flex;
|
|
93
|
+
justify-content: flex-end;
|
|
94
|
+
padding-left: 35px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.d4-ai-generation-panel .d4-ai-user-prompt-container .d4-ai-user-prompt-divtext {
|
|
98
|
+
width: 100%;
|
|
99
|
+
border-radius: 8px;
|
|
100
|
+
background-color: var(--steel-1);
|
|
101
|
+
text-align: right;
|
|
102
|
+
padding: 8px;
|
|
103
|
+
user-select: text !important;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.d4-ai-generation-panel .d4-ai-assistant-response-container {
|
|
107
|
+
width: 100%;
|
|
108
|
+
display: flex;
|
|
109
|
+
justify-content: flex-start;
|
|
110
|
+
padding-right: 20px;
|
|
111
|
+
background: aliceblue;
|
|
112
|
+
border-radius: 8px;
|
|
113
|
+
padding: 6px;
|
|
114
|
+
margin-bottom: 4px;
|
|
115
|
+
padding-bottom: 0px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.d4-ai-generation-panel .d4-ai-assistant-response-container pre {
|
|
119
|
+
background: aliceblue;
|
|
120
|
+
filter: drop-shadow(0px 0px 4px var(--steel-2));
|
|
121
|
+
padding: 6px;
|
|
122
|
+
border-radius: 8px;
|
|
123
|
+
overflow: scroll;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.d4-ai-generation-panel .d4-ai-assistant-response-container pre::-webkit-scrollbar {
|
|
127
|
+
width: 6px;
|
|
128
|
+
height: 6px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.d4-ai-generation-panel .d4-ai-assistant-response-container pre::-webkit-scrollbar-corner {
|
|
132
|
+
display: none;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.d4-ai-generation-panel .d4-ai-panel-header {
|
|
136
|
+
width: 100%;
|
|
137
|
+
padding-left: 8px;
|
|
138
|
+
padding-right: 8px;
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
justify-content: space-between;
|
|
142
|
+
border-radius: 8px;
|
|
143
|
+
box-shadow: 8px 5px 15px var(--grey-1);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.d4-ai-generation-panel .d4-ai-panel-header-right-buttons {
|
|
147
|
+
display: flex;
|
|
148
|
+
gap: 8px;
|
|
149
|
+
align-items: center;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.d4-ai-generation-panel .d4-ai-assistant-response-container pre::-webkit-scrollbar-thumb {
|
|
153
|
+
background-color: var(--steel-2);
|
|
154
|
+
border-radius: 3px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.d4-ai-generation-panel .d4-ai-panel-controls-container {
|
|
158
|
+
display: flex;
|
|
159
|
+
justify-content: space-between;
|
|
160
|
+
align-items: center;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.d4-ai-messages-accordion-pane {
|
|
164
|
+
width: 100%;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.d4-ai-messages-accordion-pane .d4-ai-assistant-response-container {
|
|
168
|
+
width: 100%;
|
|
169
|
+
overflow: auto;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.d4-ai-copy-code-button {
|
|
173
|
+
position: absolute;
|
|
174
|
+
top: 1px;
|
|
175
|
+
right: 1px;
|
|
176
|
+
color: var(--blue-1);
|
|
177
|
+
opacity: 0.6;
|
|
178
|
+
cursor: pointer;
|
|
179
|
+
width: 20px;
|
|
180
|
+
height: 20px;
|
|
181
|
+
border-radius: 4px;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
transition: background-color 0.3s, opacity 0.3s, color 0.3s;
|
|
185
|
+
display: none;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.d4-ai-copy-code-button:hover {
|
|
189
|
+
opacity: 1.0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.d4-markup:hover .d4-ai-copy-code-button {
|
|
193
|
+
display: flex;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.d4-ai-copy-code-button.d4-ai-copy-code-button-copied {
|
|
197
|
+
background-color: var(--green-2);
|
|
198
|
+
color: var(--steel-5);
|
|
199
|
+
opacity: 0.3;
|
|
200
|
+
}
|
package/detectors.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The class contains semantic type detectors.
|
|
3
|
+
* Detectors are functions tagged with `DG.FUNC_TYPES.SEM_TYPE_DETECTOR`.
|
|
4
|
+
* See also: https://datagrok.ai/help/develop/how-to/define-semantic-type-detectors
|
|
5
|
+
* The class name consists of <PackageName> and the `PackageDetectors` suffix.
|
|
6
|
+
* Follow this naming convention to ensure that your detectors are properly loaded.
|
|
7
|
+
*/
|
|
8
|
+
class GrokkyPackageDetectors extends DG.Package {
|
|
9
|
+
}
|