@playpilot/tpi 8.29.7 → 8.29.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playpilot/tpi",
3
- "version": "8.29.7",
3
+ "version": "8.29.8",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { fetchLinkInjections } from '$lib/api/externalPages'
2
3
  import { Language } from '$lib/enums/Language'
3
4
  import { SplitTest } from '$lib/enums/SplitTest'
4
5
  import { destroyExplore, insertExplore, useExploreRouter } from '$lib/explore'
@@ -171,6 +172,12 @@
171
172
  <hr />
172
173
 
173
174
  <button onclick={onrerender}>Re-inject</button>
175
+ <button onclick={(event) => {
176
+ if (confirm('You sure? Rerunning the AI will take some time, refresh whenever')) {
177
+ fetchLinkInjections({ params: { run_ai: true }, method: 'POST' });
178
+ (event.target as HTMLButtonElement).disabled = true
179
+ }
180
+ }}>Re-run AI</button>
174
181
 
175
182
  {#if isUsingBetaScript}
176
183
  <small>You are using the beta version of TPI</small>
@@ -254,6 +261,11 @@
254
261
  color: black;
255
262
  background: theme(primary);
256
263
  }
264
+
265
+ &:global([disabled]) {
266
+ opacity: 0.25;
267
+ cursor: not-allowed;
268
+ }
257
269
  }
258
270
 
259
271
  input[type="text"],