@datagrok/grokky 1.0.4 → 1.1.0

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.
Files changed (203) hide show
  1. package/.claude/skills/deploy-grokky/SKILL.md +193 -0
  2. package/.grokignore +2 -0
  3. package/.turbo/turbo-build.log +24 -0
  4. package/.vscode/settings.json +16 -0
  5. package/CHANGELOG.md +151 -8
  6. package/CLAUDE.md +284 -0
  7. package/CREDITS.md +173 -0
  8. package/LICENSE.md +16 -0
  9. package/README.md +24 -0
  10. package/bdd/bdd.config.json +1 -0
  11. package/bdd/bindings/elements.ts +9 -0
  12. package/bdd/bindings/steps.ts +787 -0
  13. package/bdd/features/ai-panel/platform-work.feature +63 -0
  14. package/bdd/features/ai-panel/session.feature +69 -0
  15. package/bdd/features/ai-panel/table-work.feature +99 -0
  16. package/bdd/generated/ai-panel/platform-work.test.ts +103 -0
  17. package/bdd/generated/ai-panel/session.test.ts +100 -0
  18. package/bdd/generated/ai-panel/table-work.test.ts +150 -0
  19. package/bdd/package.json +1 -0
  20. package/bdd/tsconfig.json +13 -0
  21. package/css/ai.css +637 -49
  22. package/dist/package-test.js +4 -1707
  23. package/dist/package-test.js.map +1 -1
  24. package/dist/package.js +742 -92317
  25. package/dist/package.js.map +1 -1
  26. package/dockerfiles/claude-runtime/.dockerignore +1 -0
  27. package/{.eslintrc.json → dockerfiles/claude-runtime/.eslintrc.json} +7 -16
  28. package/dockerfiles/claude-runtime/Dockerfile +73 -13
  29. package/dockerfiles/claude-runtime/agent/grokky_agent/__init__.py +0 -0
  30. package/dockerfiles/claude-runtime/agent/grokky_agent/__main__.py +80 -0
  31. package/dockerfiles/claude-runtime/agent/grokky_agent/browser_tools.py +180 -0
  32. package/dockerfiles/claude-runtime/agent/grokky_agent/config.py +26 -0
  33. package/dockerfiles/claude-runtime/agent/grokky_agent/formats.py +155 -0
  34. package/dockerfiles/claude-runtime/agent/grokky_agent/guard.py +87 -0
  35. package/dockerfiles/claude-runtime/agent/grokky_agent/hermes.py +212 -0
  36. package/dockerfiles/claude-runtime/agent/grokky_agent/hermes.yaml +45 -0
  37. package/dockerfiles/claude-runtime/agent/grokky_agent/hermes_plugin/__init__.py +8 -0
  38. package/dockerfiles/claude-runtime/agent/grokky_agent/hermes_plugin/plugin.yaml +3 -0
  39. package/dockerfiles/claude-runtime/agent/grokky_agent/protocol.py +174 -0
  40. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/__init__.py +21 -0
  41. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/anthropic.py +21 -0
  42. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/azure.py +46 -0
  43. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/base.py +127 -0
  44. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/bedrock.py +46 -0
  45. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/custom.py +40 -0
  46. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/databricks.py +54 -0
  47. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/openai_platform.py +41 -0
  48. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/openrouter.py +46 -0
  49. package/dockerfiles/claude-runtime/agent/grokky_agent/session.py +471 -0
  50. package/dockerfiles/claude-runtime/agent/grokky_agent/skills.py +44 -0
  51. package/dockerfiles/claude-runtime/agent/grokky_agent/structured.py +40 -0
  52. package/dockerfiles/claude-runtime/container.json +2 -2
  53. package/dockerfiles/claude-runtime/entrypoint.sh +20 -0
  54. package/dockerfiles/claude-runtime/package-lock.json +1721 -306
  55. package/dockerfiles/claude-runtime/package.json +20 -5
  56. package/dockerfiles/claude-runtime/plugin/.claude-plugin/plugin.json +5 -0
  57. package/dockerfiles/claude-runtime/plugin/skills/datagrok-calc-column/SKILL.md +92 -0
  58. package/dockerfiles/claude-runtime/plugin/skills/datagrok-chem-data/SKILL.md +250 -0
  59. package/dockerfiles/claude-runtime/plugin/skills/datagrok-chem-toolkit/SKILL.md +395 -0
  60. package/dockerfiles/claude-runtime/plugin/skills/datagrok-df-and-columns/SKILL.md +454 -0
  61. package/dockerfiles/claude-runtime/plugin/skills/datagrok-entities/SKILL.md +38 -0
  62. package/dockerfiles/claude-runtime/plugin/skills/datagrok-exec/SKILL.md +209 -0
  63. package/dockerfiles/claude-runtime/plugin/skills/datagrok-filtering/SKILL.md +185 -0
  64. package/dockerfiles/claude-runtime/plugin/skills/datagrok-grid-customization/SKILL.md +270 -0
  65. package/dockerfiles/claude-runtime/plugin/skills/datagrok-projects/SKILL.md +100 -0
  66. package/dockerfiles/claude-runtime/plugin/skills/datagrok-selection/SKILL.md +344 -0
  67. package/dockerfiles/claude-runtime/plugin/skills/datagrok-undo/SKILL.md +78 -0
  68. package/dockerfiles/claude-runtime/plugin/skills/datagrok-viewers/SKILL.md +303 -0
  69. package/dockerfiles/claude-runtime/pyproject.toml +18 -0
  70. package/dockerfiles/claude-runtime/src/agent/pool.ts +411 -0
  71. package/dockerfiles/claude-runtime/src/agent/turn.ts +153 -0
  72. package/dockerfiles/claude-runtime/src/constants.ts +20 -0
  73. package/dockerfiles/claude-runtime/src/credentials.ts +45 -0
  74. package/dockerfiles/claude-runtime/src/grounding.ts +104 -0
  75. package/dockerfiles/claude-runtime/src/help-index.ts +118 -0
  76. package/dockerfiles/claude-runtime/src/privileges.ts +8 -0
  77. package/dockerfiles/claude-runtime/src/prompts.ts +211 -0
  78. package/dockerfiles/claude-runtime/src/server.ts +134 -234
  79. package/dockerfiles/claude-runtime/src/session.ts +328 -0
  80. package/dockerfiles/claude-runtime/src/shared-api-client.ts +112 -0
  81. package/dockerfiles/claude-runtime/src/stream-filter.ts +80 -0
  82. package/dockerfiles/claude-runtime/src/sync/home-files.ts +80 -0
  83. package/dockerfiles/claude-runtime/src/sync/orchestrator.ts +214 -0
  84. package/dockerfiles/claude-runtime/src/sync/packages.ts +145 -0
  85. package/dockerfiles/claude-runtime/src/sync/shared-connections.ts +87 -0
  86. package/dockerfiles/claude-runtime/src/sync/workspace.ts +68 -0
  87. package/dockerfiles/claude-runtime/src/tasks.ts +124 -0
  88. package/dockerfiles/claude-runtime/src/tool-summary.ts +66 -0
  89. package/dockerfiles/claude-runtime/src/types.ts +142 -23
  90. package/dockerfiles/claude-runtime/src/user/installed-packages.ts +17 -0
  91. package/dockerfiles/claude-runtime/src/user/staged-workspace.ts +80 -0
  92. package/dockerfiles/claude-runtime/src/user/user-dir.ts +108 -0
  93. package/dockerfiles/claude-runtime/src/verify.ts +136 -0
  94. package/dockerfiles/claude-runtime/src/watchdog.ts +115 -0
  95. package/dockerfiles/claude-runtime/test/credentials.test.js +43 -0
  96. package/dockerfiles/claude-runtime/test/grounding.test.js +191 -0
  97. package/dockerfiles/claude-runtime/test/help-index.test.js +115 -0
  98. package/dockerfiles/claude-runtime/test/plugin-skills.test.js +57 -0
  99. package/dockerfiles/claude-runtime/test/prompts.test.js +62 -0
  100. package/dockerfiles/claude-runtime/test/reaper.test.js +60 -0
  101. package/dockerfiles/claude-runtime/test/stream-filter.test.js +132 -0
  102. package/dockerfiles/claude-runtime/test/tasks.test.js +74 -0
  103. package/dockerfiles/claude-runtime/test/user-dir.test.js +71 -0
  104. package/dockerfiles/claude-runtime/test/verify.test.js +187 -0
  105. package/dockerfiles/claude-runtime/test/watchdog.test.js +43 -0
  106. package/dockerfiles/mcp-server/.eslintrc.json +39 -0
  107. package/dockerfiles/mcp-server/Dockerfile +10 -2
  108. package/dockerfiles/mcp-server/package-lock.json +1743 -98
  109. package/dockerfiles/mcp-server/package.json +27 -5
  110. package/dockerfiles/mcp-server/src/api-client.ts +123 -66
  111. package/dockerfiles/mcp-server/src/format.ts +51 -0
  112. package/dockerfiles/mcp-server/src/index.ts +44 -113
  113. package/dockerfiles/mcp-server/src/ops.ts +325 -0
  114. package/dockerfiles/mcp-server/src/shared-api-client.ts +81 -0
  115. package/dockerfiles/mcp-server/test/format.test.js +62 -0
  116. package/dockerfiles/mcp-server/test/ops.test.js +84 -0
  117. package/dockerfiles/mcp-server/test/shared-api-client.test.js +35 -0
  118. package/dockerfiles/queue/Dockerfile +2 -0
  119. package/dockerfiles/queue/container.json +7 -0
  120. package/docs/AUDIT-2026-08-03.md +1064 -0
  121. package/docs/BENCHMARK.md +292 -0
  122. package/docs/CLAUDE_CODE_FLOW.md +746 -0
  123. package/docs/EXAMPLES.md +82 -0
  124. package/docs/FEATURES.md +71 -0
  125. package/docs/IMPLEMENTATION.md +128 -0
  126. package/docs/LATENCY.md +170 -0
  127. package/docs/VISION.md +36 -0
  128. package/files/benchmark/suite.yaml +404 -0
  129. package/files/scripts/process-cro-results.md +14 -0
  130. package/files/suggestions.yaml +344 -0
  131. package/package.json +39 -97
  132. package/src/ai/ai-window.ts +157 -0
  133. package/src/ai/benchmark/benchmark.ts +737 -0
  134. package/src/ai/db-view-functions.ts +56 -0
  135. package/src/ai/engine.ts +98 -0
  136. package/src/ai/gemma-engine.ts +81 -0
  137. package/src/ai/panel.ts +1385 -0
  138. package/src/ai/prompt-suggestions.ts +209 -0
  139. package/src/ai/search/combined-search.ts +244 -0
  140. package/src/{llm-utils → ai/search}/query-matching.ts +46 -167
  141. package/src/{llm-utils → ai}/storage.ts +0 -1
  142. package/src/ai/table-tools.ts +145 -0
  143. package/src/ai/ui.ts +720 -0
  144. package/src/ai/usage-limiter.ts +105 -0
  145. package/src/ai/view-tools.ts +352 -0
  146. package/src/claude/ai-feature.ts +16 -0
  147. package/src/claude/exec-blocks.ts +176 -0
  148. package/src/claude/queue-task.ts +84 -0
  149. package/src/claude/runtime-client.ts +310 -0
  150. package/src/claude/turn-log.ts +114 -0
  151. package/src/claude/undoable.ts +105 -0
  152. package/src/{llm-utils → db}/db-index-tools.ts +24 -32
  153. package/src/db/sql-tools.ts +336 -0
  154. package/src/depr/LLM-client.ts +251 -0
  155. package/src/depr/ai-panel.ts +174 -0
  156. package/src/depr/chatgpt-assistant.ts +257 -0
  157. package/src/depr/creds.ts +30 -0
  158. package/src/depr/deepwikiclient.ts +118 -0
  159. package/src/depr/indexes/dg-repository-index.ts +266 -0
  160. package/src/depr/interfaces.ts +170 -0
  161. package/src/depr/is-help-request.ts +39 -0
  162. package/src/depr/prompt-engine.ts +52 -0
  163. package/src/depr/rendering-tools.ts +103 -0
  164. package/src/depr/script-tools.ts +785 -0
  165. package/src/depr/tableview-tools.ts +746 -0
  166. package/src/depr/viewers-ai.ts +67 -0
  167. package/src/package-api.ts +87 -28
  168. package/src/package-test.ts +1 -0
  169. package/src/package.g.ts +98 -48
  170. package/src/package.ts +211 -157
  171. package/src/polyfills.ts +12 -0
  172. package/src/utils.ts +128 -0
  173. package/tsconfig.json +8 -70
  174. package/webpack.config.js +3 -49
  175. package/.eslintignore +0 -2
  176. package/src/ai-panel.ts +0 -174
  177. package/src/claude-code/claude-panel.ts +0 -34
  178. package/src/claude-code/claude-runtime-client.ts +0 -148
  179. package/src/llm-utils/LLM-client.ts +0 -251
  180. package/src/llm-utils/combined-search.ts +0 -162
  181. package/src/llm-utils/creds.ts +0 -30
  182. package/src/llm-utils/deepwikiclient.ts +0 -118
  183. package/src/llm-utils/indexes/dg-repository-index.ts +0 -266
  184. package/src/llm-utils/panel.ts +0 -866
  185. package/src/llm-utils/script-tools.ts +0 -784
  186. package/src/llm-utils/sql-tools.ts +0 -840
  187. package/src/llm-utils/tableview-tools.ts +0 -704
  188. package/src/llm-utils/ui.ts +0 -315
  189. package/src/prompt-engine/chatgpt-assistant.ts +0 -257
  190. package/src/prompt-engine/interfaces.ts +0 -170
  191. package/src/prompt-engine/prompt-engine.ts +0 -52
  192. package/src/prompt-engine/rendering-tools.ts +0 -103
  193. package/src/prompts/is-help-request.ts +0 -26
  194. package/src/viewers-ai.ts +0 -67
  195. /package/src/{llm-utils → db}/indexes/biologics-index.ts +0 -0
  196. /package/src/{llm-utils → db}/indexes/chembl-index.ts +0 -0
  197. /package/src/{llm-utils → db}/query-meta-utils.ts +0 -0
  198. /package/src/{llm-utils/depr → depr}/AI-API-providers/openai-chat-completions-provider.ts +0 -0
  199. /package/src/{llm-utils/depr → depr}/AI-API-providers/openai-responses-provider.ts +0 -0
  200. /package/src/{llm-utils/depr → depr}/AI-API-providers/types.ts +0 -0
  201. /package/src/{llm-utils/depr → depr}/depr.ts +0 -0
  202. /package/src/{llm-utils/depr → depr}/embeddings.ts +0 -0
  203. /package/src/{llm-utils/depr → depr}/sql-utils.ts +0 -0
package/css/ai.css CHANGED
@@ -2,12 +2,28 @@
2
2
  font-style: italic;
3
3
  }
4
4
 
5
+ .grokky-entity-chip {
6
+ display: inline-flex;
7
+ align-items: center;
8
+ margin: 2px 6px 2px 0;
9
+ padding: 3px 8px;
10
+ border: 1px solid var(--steel-2);
11
+ border-radius: 14px;
12
+ background: var(--grey-1);
13
+ font-size: 12px;
14
+ line-height: 18px;
15
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
16
+ }
17
+
18
+ .grokky-entity-chip > * + * {
19
+ margin-left: 6px;
20
+ }
21
+
5
22
  .ai-panel-answer {}
6
23
 
7
24
  .ai-execute-plan {
8
25
  display: flex;
9
26
  flex-direction: column;
10
- gap: 10px;
11
27
  line-height: 1.2;
12
28
  background: var(--surface);
13
29
  border-radius: 8px;
@@ -15,11 +31,16 @@
15
31
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
16
32
  }
17
33
 
34
+ .ai-execute-plan > * + * {
35
+ margin-top: 10px;
36
+ }
37
+
18
38
  .ai-execute-result {
19
39
  margin-top: 10px;
20
40
  background: var(--surface-variant);
21
41
  padding: 8px 12px;
22
42
  border-radius: 8px;
43
+ -webkit-user-select: text !important;
23
44
  user-select: text !important;
24
45
  }
25
46
 
@@ -28,20 +49,45 @@
28
49
  }
29
50
 
30
51
  .d4-ai-generation-panel {
52
+ --grokky-tint: color-mix(in srgb, var(--blue-1) 14%, var(--white));
31
53
  height: 100%;
32
54
  padding: 8px;
33
55
  width: 100%;
34
56
  display: flex;
35
57
  flex-direction: column;
36
- gap: 8px;
58
+ }
59
+
60
+ .d4-ai-generation-panel > * + * {
61
+ margin-top: 8px;
62
+ }
63
+
64
+ /* The chat keeps a reading width however wide the panel is. */
65
+ .d4-ai-generation-panel:not(.d4-ai-raw-mode) .d4-ai-panel-output-area > *,
66
+ .d4-ai-generation-panel:not(.d4-ai-raw-mode) > .grokky-status-bar,
67
+ .d4-ai-generation-panel:not(.d4-ai-raw-mode) > .d4-ai-panel-input-area {
68
+ width: 100%;
69
+ max-width: 760px;
70
+ align-self: center;
37
71
  }
38
72
 
39
73
  .d4-ai-generation-panel .d4-ai-panel-input-area {
40
74
  display: flex;
41
75
  flex-direction: column;
42
- gap: 4px;
43
- padding: 6px;
44
- padding-bottom: 16px;
76
+ box-sizing: border-box;
77
+ margin-bottom: 8px;
78
+ padding: 8px 10px 6px;
79
+ border: 1px solid var(--grey-2);
80
+ border-radius: 12px;
81
+ background: var(--white);
82
+ box-shadow: 0 1px 4px var(--steel-1);
83
+ }
84
+
85
+ .d4-ai-generation-panel .d4-ai-panel-input-area:focus-within {
86
+ border-color: var(--blue-1);
87
+ }
88
+
89
+ .d4-ai-generation-panel .d4-ai-panel-input-area > * + * {
90
+ margin-top: 4px;
45
91
  }
46
92
 
47
93
  .d4-ai-generation-panel .d4-ai-panel-input-area select {
@@ -52,26 +98,36 @@
52
98
 
53
99
  .d4-ai-generation-panel .d4-ai-panel-input-controls {
54
100
  align-items: center;
55
- gap: 4px;
56
101
  }
57
102
 
58
- .d4-ai-generation-panel .d4-ai-panel-run-controls i {
59
- margin-left: 8px;
103
+ /* Bottom controls row: uniform icon size, comfortable spacing, subtle hover background. */
104
+ .d4-ai-generation-panel .d4-ai-panel-controls-container i {
105
+ width: 18px;
106
+ height: 18px;
107
+ font-size: 14px;
108
+ margin: 0 6px;
109
+ border-radius: 4px;
60
110
  cursor: pointer;
111
+ display: inline-flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ transition: background-color 0.15s, color 0.15s;
115
+ }
116
+
117
+ .d4-ai-generation-panel .d4-ai-panel-controls-container i:hover {
118
+ background-color: var(--warm-grey-1);
61
119
  }
62
120
 
63
121
  .d4-ai-generation-panel textarea.d4-ai-input-textarea {
64
122
  resize: none;
65
123
  flex-grow: 1;
66
- min-height: 80px;
124
+ min-height: 60px;
67
125
  max-height: 200px;
68
- font-size: 14px;
69
- border: 1px solid var(--grey-1);
126
+ font: inherit;
127
+ border: none;
70
128
  outline: none;
71
- border-radius: 8px;
72
- box-shadow: 0px 0px 2px var(--steel-1);
73
- background: var(--grey-1);
74
- padding: 4px;
129
+ background: transparent;
130
+ padding: 0;
75
131
  }
76
132
 
77
133
  .d4-ai-generation-panel .d4-ai-panel-output-area {
@@ -80,9 +136,47 @@
80
136
  overflow: scroll;
81
137
  width: 100%;
82
138
  flex-direction: column;
139
+ flex: 1 1 0;
140
+ min-height: 0;
141
+ }
142
+
143
+ .d4-ai-generation-panel .d4-ai-panel-output-area > *:first-child {
83
144
  margin-top: auto;
84
145
  }
85
146
 
147
+ .d4-ai-generation-panel:not(.d4-ai-inline-mode) .d4-ai-panel-output-area {
148
+ mask-image: linear-gradient(to bottom, #000 calc(100% - 12px), transparent);
149
+ }
150
+
151
+ .d4-ai-generation-panel:not(.d4-ai-inline-mode) .d4-ai-panel-output-area::after {
152
+ content: '';
153
+ flex: none;
154
+ height: 8px;
155
+ }
156
+
157
+ .d4-ai-generation-panel.d4-ai-inline-mode {
158
+ height: auto;
159
+ }
160
+
161
+ .d4-ai-generation-panel.d4-ai-inline-mode .d4-ai-panel-output-area {
162
+ flex: none;
163
+ min-height: 120px;
164
+ overflow: visible;
165
+ }
166
+
167
+ .d4-ai-generation-panel.d4-ai-inline-mode .d4-ai-panel-output-area > * {
168
+ max-width: none;
169
+ }
170
+
171
+ .d4-ai-generation-panel.d4-ai-inline-mode .d4-ai-panel-output-area > *:first-child {
172
+ margin-top: 0;
173
+ }
174
+
175
+ .grokky-ai-search-tab-host {
176
+ max-height: calc(100vh - 200px);
177
+ overflow-y: auto;
178
+ }
179
+
86
180
  .d4-ai-messages-accordion-pane pre {
87
181
  margin-left: 0px !important;
88
182
  }
@@ -90,16 +184,24 @@
90
184
  .d4-ai-generation-panel .d4-ai-user-prompt-container {
91
185
  width: 100%;
92
186
  display: flex;
187
+ align-items: center;
93
188
  justify-content: flex-end;
94
- padding-left: 35px;
189
+ }
190
+
191
+ .d4-ai-handled-natively-icon {
192
+ flex: 0 0 auto;
193
+ margin-right: 6px;
194
+ color: var(--green-2);
95
195
  }
96
196
 
97
197
  .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;
198
+ max-width: 80%;
199
+ border-radius: 16px;
200
+ background-color: var(--grokky-tint);
201
+ padding: 6px 14px;
202
+ margin: 4px 0;
203
+ overflow-wrap: anywhere;
204
+ -webkit-user-select: text !important;
103
205
  user-select: text !important;
104
206
  }
105
207
 
@@ -107,20 +209,56 @@
107
209
  width: 100%;
108
210
  display: flex;
109
211
  justify-content: flex-start;
110
- padding-right: 20px;
111
- background: aliceblue;
112
- border-radius: 8px;
113
- padding: 6px;
212
+ padding-top: 6px;
114
213
  margin-bottom: 4px;
115
- padding-bottom: 0px;
214
+ -webkit-user-select: text;
215
+ user-select: text;
116
216
  }
117
217
 
118
218
  .d4-ai-generation-panel .d4-ai-assistant-response-container pre {
119
- background: aliceblue;
120
- filter: drop-shadow(0px 0px 4px var(--steel-2));
219
+ background: var(--grey-1);
121
220
  padding: 6px;
122
221
  border-radius: 8px;
123
- overflow: scroll;
222
+ overflow: auto;
223
+ }
224
+
225
+ .grokky-code-card {
226
+ margin: 4px 0 10px;
227
+ border: 1px solid var(--grey-2);
228
+ border-radius: 6px;
229
+ overflow: hidden;
230
+ }
231
+
232
+ .grokky-code-head {
233
+ justify-content: space-between;
234
+ align-items: center;
235
+ padding: 4px 10px;
236
+ border-bottom: 1px solid var(--grey-2);
237
+ background: var(--grey-1);
238
+ font-size: 11px;
239
+ color: var(--grey-5);
240
+ }
241
+
242
+ .grokky-code-copy {
243
+ align-items: center;
244
+ cursor: pointer;
245
+ }
246
+
247
+ .grokky-code-copy > i {
248
+ margin-right: 5px;
249
+ }
250
+
251
+ .grokky-code-copy:hover {
252
+ color: var(--blue-1);
253
+ }
254
+
255
+ .grokky-code-card pre,
256
+ .d4-ai-generation-panel .d4-ai-assistant-response-container .grokky-code-card pre {
257
+ margin: 0 !important;
258
+ padding: 10px 12px;
259
+ border: none;
260
+ border-radius: 0;
261
+ background: var(--white);
124
262
  }
125
263
 
126
264
  .d4-ai-generation-panel .d4-ai-assistant-response-container pre::-webkit-scrollbar {
@@ -145,10 +283,13 @@
145
283
 
146
284
  .d4-ai-generation-panel .d4-ai-panel-header-right-buttons {
147
285
  display: flex;
148
- gap: 8px;
149
286
  align-items: center;
150
287
  }
151
288
 
289
+ .d4-ai-generation-panel .d4-ai-panel-header-right-buttons > * + * {
290
+ margin-left: 8px;
291
+ }
292
+
152
293
  .d4-ai-generation-panel .d4-ai-assistant-response-container pre::-webkit-scrollbar-thumb {
153
294
  background-color: var(--steel-2);
154
295
  border-radius: 3px;
@@ -160,6 +301,10 @@
160
301
  align-items: center;
161
302
  }
162
303
 
304
+ .d4-ai-generation-panel .d4-ai-panel-run-controls {
305
+ align-items: center;
306
+ }
307
+
163
308
  .d4-ai-messages-accordion-pane {
164
309
  width: 100%;
165
310
  }
@@ -169,32 +314,475 @@
169
314
  overflow: auto;
170
315
  }
171
316
 
172
- .d4-ai-copy-code-button {
173
- position: absolute;
174
- top: 1px;
175
- right: 1px;
317
+ /* Per-turn response block: a hover-only "minimize" icon on the left collapses it to one line. */
318
+ .d4-ai-generation-panel .d4-ai-response-block {
319
+ width: 100%;
320
+ display: flex;
321
+ flex-direction: row;
322
+ align-items: flex-start;
323
+ }
324
+
325
+ .d4-ai-response-block > .d4-ai-messages-accordion-pane {
326
+ flex: 1 1 0;
327
+ min-width: 0;
328
+ }
329
+
330
+ .d4-ai-response-minimize-icon {
331
+ flex: 0 0 auto;
332
+ width: 14px;
333
+ margin-top: 8px;
334
+ margin-right: 4px;
335
+ cursor: pointer;
336
+ color: var(--steel-3);
337
+ opacity: 0;
338
+ transition: opacity 0.2s;
339
+ }
340
+
341
+ .d4-ai-response-block:hover .d4-ai-response-minimize-icon,
342
+ .d4-ai-response-block-collapsed .d4-ai-response-minimize-icon {
343
+ opacity: 0.65;
344
+ }
345
+
346
+ .d4-ai-response-minimize-icon:hover {
347
+ opacity: 1;
348
+ }
349
+
350
+ .d4-ai-response-block-collapsed > .d4-ai-messages-accordion-pane {
351
+ max-height: 2.2em;
352
+ overflow: hidden;
353
+ mask-image: linear-gradient(to bottom, #000 55%, transparent);
354
+ }
355
+
356
+ .d4-ai-response-block-collapsed .d4-ai-panel-feedback-div {
357
+ display: none !important;
358
+ }
359
+
360
+ /* Copy / thumbs-up / thumbs-down under each AI message — revealed only while the message is hovered. */
361
+ .d4-ai-generation-panel .d4-ai-panel-feedback-div {
362
+ opacity: 0;
363
+ pointer-events: none;
364
+ transition: opacity 0.15s;
365
+ }
366
+
367
+ .d4-ai-generation-panel .d4-ai-assistant-response-container:hover .d4-ai-panel-feedback-div {
368
+ opacity: 1;
369
+ pointer-events: auto;
370
+ }
371
+
372
+ .d4-ai-generation-panel .d4-ai-panel-feedback-div i:hover {
176
373
  color: var(--blue-1);
177
- opacity: 0.6;
374
+ }
375
+
376
+ .d4-ai-generation-panel .d4-ai-panel-feedback-div > * + * {
377
+ margin-left: 8px;
378
+ }
379
+
380
+ .grokky-entity-cards {
381
+ display: flex;
382
+ flex-direction: column;
383
+ margin: 8px 0;
384
+ }
385
+
386
+ .grokky-entity-cards > * + * {
387
+ margin-top: 4px;
388
+ }
389
+
390
+ /* Raw / terminal mode */
391
+ .d4-ai-generation-panel.d4-ai-raw-mode {
392
+ background: #111;
393
+ color: #e0e0e0;
394
+ font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
395
+ }
396
+
397
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-panel-output-area {
398
+ background: #111;
399
+ }
400
+
401
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-panel-input-area {
402
+ background: #0a0a0a;
403
+ border-color: #333;
404
+ box-shadow: none;
405
+ }
406
+
407
+ .d4-ai-generation-panel.d4-ai-raw-mode textarea.d4-ai-input-textarea {
408
+ background: #0a0a0a;
409
+ color: #e0e0e0;
410
+ border-color: #333;
411
+ box-shadow: none;
412
+ font-family: inherit;
413
+ }
414
+
415
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-panel-header {
416
+ background: #111;
417
+ box-shadow: none;
418
+ border-bottom: 1px solid #333;
419
+ }
420
+
421
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-panel-controls-container i {
422
+ color: #666;
423
+ }
424
+
425
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-panel-controls-container i:hover {
426
+ background-color: #2a2a2a;
427
+ }
428
+
429
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-assistant-response-container {
430
+ background: transparent;
431
+ border-radius: 0;
432
+ padding: 2px 6px;
433
+ margin-bottom: 0;
434
+ }
435
+
436
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-assistant-response-container pre {
437
+ background: transparent;
438
+ color: #e0e0e0;
439
+ filter: none;
440
+ border: none;
441
+ padding: 2px 0;
442
+ overflow: visible;
443
+ }
444
+
445
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-user-prompt-container {
446
+ justify-content: flex-start;
447
+ padding-left: 0;
448
+ }
449
+
450
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-user-prompt-container .d4-ai-user-prompt-divtext {
451
+ max-width: none;
452
+ background: transparent;
453
+ color: #7cb8ff;
454
+ text-align: left;
455
+ border-radius: 0;
456
+ padding: 2px 6px;
457
+ font-family: inherit;
458
+ }
459
+
460
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-user-prompt-container .d4-ai-user-prompt-divtext::before {
461
+ content: '> ';
462
+ color: #50fa7b;
463
+ }
464
+
465
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-messages-accordion-pane {
466
+ background: transparent;
467
+ }
468
+
469
+ .d4-ai-generation-panel.d4-ai-raw-mode::-webkit-scrollbar,
470
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-panel-output-area::-webkit-scrollbar {
471
+ width: 6px;
472
+ background: #1a1a1a;
473
+ }
474
+
475
+ .d4-ai-generation-panel.d4-ai-raw-mode::-webkit-scrollbar-thumb,
476
+ .d4-ai-generation-panel.d4-ai-raw-mode .d4-ai-panel-output-area::-webkit-scrollbar-thumb {
477
+ background: #333;
478
+ border-radius: 3px;
479
+ }
480
+
481
+ .d4-ai-generation-panel > .grokky-status-bar,
482
+ .grokky-status-bar + .d4-ai-panel-input-area {
483
+ margin-top: 4px;
484
+ }
485
+
486
+ .grokky-status-bar {
487
+ height: 22px;
488
+ flex: none;
489
+ padding: 0 8px;
490
+ overflow: hidden;
491
+ font-size: 12px;
492
+ color: var(--text-color-light);
493
+ }
494
+
495
+ .d4-ai-loader {
496
+ align-items: center;
497
+ height: 100%;
498
+ min-width: 0;
499
+ }
500
+
501
+ .grokky-status-bar .grok-loader {
502
+ width: 36px;
503
+ height: 10px;
504
+ top: 0;
505
+ flex-shrink: 0;
506
+ }
507
+
508
+ .grokky-status-label {
509
+ margin-left: 8px;
510
+ white-space: nowrap;
511
+ overflow: hidden;
512
+ text-overflow: ellipsis;
513
+ }
514
+
515
+ .grokky-status-error {
516
+ line-height: 22px;
517
+ color: var(--failure);
518
+ white-space: nowrap;
519
+ overflow: hidden;
520
+ text-overflow: ellipsis;
521
+ }
522
+
523
+ .grokky-status-in {
524
+ animation: grokky-status-in .25s ease-out;
525
+ }
526
+
527
+ @keyframes grokky-status-in {
528
+ from { transform: translateY(100%); opacity: 0; }
529
+ }
530
+
531
+ .d4-ai-voice-cancel-hint {
532
+ margin-left: 8px;
533
+ font-size: 11px;
534
+ color: var(--text-color-light);
535
+ }
536
+
537
+ .grokky-stream-activity {
538
+ border-left: 2px solid var(--grey-2);
539
+ padding-left: 12px;
540
+ }
541
+
542
+ .grokky-stream-activity-line {
543
+ color: var(--text-color-light);
544
+ font-size: 12px;
545
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
546
+ padding: 3px 0;
547
+ }
548
+
549
+ .grokky-search-wand {
178
550
  cursor: pointer;
179
- width: 20px;
180
- height: 20px;
551
+ color: var(--blue-1) !important;
552
+ margin-left: 4px;
553
+ margin-right: 4px;
554
+ }
555
+
556
+ .grokky-empty-state .grokky-scope-icon {
557
+ margin-right: 6px;
558
+ }
559
+
560
+ .grokky-empty-state h2 {
561
+ margin-bottom: 14px;
562
+ }
563
+
564
+ .grokky-empty-state .d4-accordion-pane + .d4-accordion-pane {
565
+ margin-top: 4px;
566
+ }
567
+
568
+ .grokky-empty-state .grokky-suggestion-item {
569
+ padding: 4px 8px;
181
570
  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;
571
+ cursor: pointer;
572
+ font-size: 13px;
573
+ line-height: 1.6;
574
+ color: var(--text-color);
575
+ }
576
+
577
+ .grokky-empty-state .grokky-suggestion-item:hover {
578
+ background: var(--grey-1);
186
579
  }
187
580
 
188
- .d4-ai-copy-code-button:hover {
189
- opacity: 1.0;
581
+ /* Inline choice block rendered by suggestion actions (e.g. demo-dataset picker). */
582
+ .grokky-choice-block > * + * {
583
+ margin-top: 10px;
190
584
  }
191
585
 
192
- .d4-markup:hover .d4-ai-copy-code-button {
586
+ .grokky-choice-row {
193
587
  display: flex;
588
+ flex-wrap: wrap;
589
+ align-items: stretch;
590
+ }
591
+
592
+ .grokky-choice-card {
593
+ margin: 0 8px 8px 0;
594
+ padding: 7px 14px;
595
+ cursor: pointer;
596
+ font-size: 13px;
597
+ color: var(--text-color);
598
+ border: 1px solid var(--grey-3);
599
+ border-radius: 14px;
600
+ background: var(--grey-1);
601
+ transition: background 0.12s, border-color 0.12s;
602
+ }
603
+
604
+ .grokky-choice-card:hover {
605
+ border-color: var(--blue-1);
606
+ background: var(--grey-2);
607
+ }
608
+
609
+ .grokky-history-icon {
610
+ margin: 0 6px;
611
+ }
612
+
613
+ .grokky-history-delete {
614
+ visibility: hidden;
615
+ color: var(--red-3);
616
+ }
617
+
618
+ .d4-menu-item:hover > .grokky-history-delete {
619
+ visibility: visible;
620
+ }
621
+
622
+ .grokky-history-deleted > .grokky-history-delete,
623
+ .d4-menu-item:not(.grokky-history-deleted) > .grokky-history-undo {
624
+ display: none;
194
625
  }
195
626
 
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
- }
627
+ .grokky-history-deleted > .d4-menu-item-label {
628
+ color: var(--grey-4);
629
+ text-decoration: line-through;
630
+ }
631
+
632
+ .grokky-history-deleted::after {
633
+ content: '';
634
+ position: absolute;
635
+ left: 0;
636
+ bottom: 0;
637
+ width: 100%;
638
+ height: 2px;
639
+ background: var(--blue-1);
640
+ transform-origin: left;
641
+ animation: grokky-history-countdown 5s linear forwards;
642
+ }
643
+
644
+ @keyframes grokky-history-countdown {
645
+ to { transform: scaleX(0); }
646
+ }
647
+
648
+ .grokky-system-message {
649
+ text-align: right;
650
+ font-size: 12px;
651
+ color: var(--grey-4);
652
+ font-style: italic;
653
+ margin: 8px 0;
654
+ }
655
+
656
+ .grokky-confirm-card {
657
+ border: 1px solid var(--grey-2);
658
+ border-radius: 4px;
659
+ overflow: hidden;
660
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
661
+ }
662
+
663
+ .grokky-confirm-body {
664
+ padding: 12px;
665
+ }
666
+
667
+ .grokky-confirm-body > * + * {
668
+ margin-top: 8px;
669
+ }
670
+
671
+ .grokky-strip {
672
+ justify-content: space-between;
673
+ flex-wrap: wrap;
674
+ gap: 8px;
675
+ padding: 8px 12px;
676
+ border-left: 3px solid;
677
+ border-bottom: 1px solid var(--grey-2);
678
+ }
679
+
680
+ .grokky-strip-danger {
681
+ border-left-color: var(--red-3);
682
+ background: var(--red-1);
683
+ color: var(--red-4);
684
+ }
685
+
686
+ .grokky-strip-success {
687
+ border-left-color: var(--green-2);
688
+ background: var(--green-1);
689
+ color: var(--green-3);
690
+ }
691
+
692
+ .grokky-strip-muted {
693
+ border-left-color: var(--grey-3);
694
+ background: var(--grey-1);
695
+ color: var(--grey-5);
696
+ }
697
+
698
+ .grokky-strip-question {
699
+ border-left-color: var(--blue-1);
700
+ background: var(--steel-1);
701
+ font-weight: 500;
702
+ }
703
+
704
+ .grokky-question-card {
705
+ width: 100%;
706
+ max-width: 520px;
707
+ }
708
+
709
+ .grokky-question-card > .grokky-strip:last-child {
710
+ border-bottom: none;
711
+ }
712
+
713
+ .grokky-question-card .grokky-choice-row {
714
+ margin-bottom: -8px;
715
+ }
716
+
717
+ .grokky-question-card .grokky-choice-card {
718
+ background: var(--white);
719
+ }
720
+
721
+ .grokky-question-card .grokky-choice-card.grokky-choice-selected {
722
+ border-color: var(--blue-1);
723
+ background: var(--grokky-tint);
724
+ color: var(--blue-1);
725
+ }
726
+
727
+ .grokky-question-footer {
728
+ justify-content: flex-end;
729
+ padding: 6px 12px;
730
+ border-top: 1px solid var(--grey-1);
731
+ }
732
+
733
+ .grokky-strip-answer {
734
+ align-items: center;
735
+ gap: 6px;
736
+ font-weight: 500;
737
+ }
738
+
739
+ .grokky-strip-answer > i {
740
+ color: inherit;
741
+ pointer-events: none;
742
+ }
743
+
744
+ .grokky-unverified-warning {
745
+ color: var(--red-3);
746
+ font-size: 12px;
747
+ border-left: 2px solid var(--red-3);
748
+ padding: 3px 0 3px 12px;
749
+ margin-top: 8px;
750
+ }
751
+
752
+ .grokky-markdown-fallback {
753
+ white-space: pre-wrap;
754
+ }
755
+
756
+ .grokky-exec-sep {
757
+ width: 1px;
758
+ height: 13px;
759
+ background: var(--steel-2);
760
+ }
761
+
762
+ .grokky-exec-icon.grokky-exec-ran { color: var(--green-2); }
763
+ .grokky-exec-icon.grokky-exec-error { color: var(--red-3); }
764
+
765
+ .grokky-exec-code {
766
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
767
+ font-size: 11px;
768
+ white-space: pre-wrap;
769
+ }
770
+
771
+ .grokky-hidden,
772
+ .grokky-code-card.grokky-hidden {
773
+ display: none;
774
+ }
775
+
776
+ .d4-ai-generation-panel .d4-ai-panel-controls-container i.grokky-send,
777
+ .d4-ai-generation-panel .d4-ai-panel-controls-container i.grokky-send:hover {
778
+ width: 22px;
779
+ height: 22px;
780
+ border-radius: 50%;
781
+ background-color: var(--blue-1);
782
+ color: var(--white);
783
+ font-size: 10px;
784
+ }
785
+
786
+ .d4-ai-generation-panel .d4-ai-panel-controls-container i.grokky-send.fa-stop {
787
+ background-color: var(--red-3);
788
+ }