sliftutils 1.0.2 → 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/index.d.ts +1 -1
- package/misc/openrouter.d.ts +1 -1
- package/misc/openrouter.ts +1 -1
- package/package.json +1 -1
- package/render-utils/Anchor.tsx +2 -1
- package/web/Page.tsx +1 -1
- package/web/browser.tsx +1 -1
- package/web/index.html +3 -0
package/index.d.ts
CHANGED
|
@@ -101,7 +101,7 @@ declare module "sliftutils/misc/openrouter" {
|
|
|
101
101
|
validate?: (response: T) => void;
|
|
102
102
|
}): Promise<T>;
|
|
103
103
|
export declare function simpleAICall(model: string, message: string): Promise<string>;
|
|
104
|
-
/** The message must request the result to be returned in YAML. */
|
|
104
|
+
/** The message must request the result to be returned in YAML (we automatically parse this and return an object). */
|
|
105
105
|
export declare function simpleAICallTyped<T>(model: string, message: string): Promise<T>;
|
|
106
106
|
export declare function openRouterCall(config: {
|
|
107
107
|
model: string;
|
package/misc/openrouter.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare function yamlOpenRouterCall<T>(config: {
|
|
|
29
29
|
validate?: (response: T) => void;
|
|
30
30
|
}): Promise<T>;
|
|
31
31
|
export declare function simpleAICall(model: string, message: string): Promise<string>;
|
|
32
|
-
/** The message must request the result to be returned in YAML. */
|
|
32
|
+
/** The message must request the result to be returned in YAML (we automatically parse this and return an object). */
|
|
33
33
|
export declare function simpleAICallTyped<T>(model: string, message: string): Promise<T>;
|
|
34
34
|
export declare function openRouterCall(config: {
|
|
35
35
|
model: string;
|
package/misc/openrouter.ts
CHANGED
|
@@ -58,7 +58,7 @@ export async function simpleAICall(model: string, message: string): Promise<stri
|
|
|
58
58
|
messages: [{ role: "user", content: message }],
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
/** The message must request the result to be returned in YAML. */
|
|
61
|
+
/** The message must request the result to be returned in YAML (we automatically parse this and return an object). */
|
|
62
62
|
export async function simpleAICallTyped<T>(model: string, message: string): Promise<T> {
|
|
63
63
|
return await yamlOpenRouterCall({
|
|
64
64
|
model,
|
package/package.json
CHANGED
package/render-utils/Anchor.tsx
CHANGED
|
@@ -25,7 +25,8 @@ export class Anchor extends preact.Component<{
|
|
|
25
25
|
<a
|
|
26
26
|
{...remaining}
|
|
27
27
|
className={
|
|
28
|
-
|
|
28
|
+
"Anchor "
|
|
29
|
+
+ css.textDecoration("none")
|
|
29
30
|
.opacity(0.8, "hover")
|
|
30
31
|
+ (selected && css.color("hsl(110, 75%, 65%)", "soft"))
|
|
31
32
|
+ (!selected && css.color("hsl(210, 75%, 65%)", "soft"))
|
package/web/Page.tsx
CHANGED
|
@@ -48,7 +48,7 @@ export class Page extends preact.Component {
|
|
|
48
48
|
|
|
49
49
|
return (
|
|
50
50
|
<div className={css.size("100vw", "100vh").vbox(0)}>
|
|
51
|
-
<div className={css.hbox(12).pad2(20,
|
|
51
|
+
<div className={css.hbox(12).pad2(20, 10).paddingBottom(5, "important")}>
|
|
52
52
|
{pages.map(p => (
|
|
53
53
|
<Anchor key={p.key} params={[[pageURL, p.key]]}>
|
|
54
54
|
{p.key}
|
package/web/browser.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import { list } from "socket-function/src/misc";
|
|
|
6
6
|
import { enableHotReloading } from "../builders/hotReload";
|
|
7
7
|
import { URLParam } from "../render-utils/URLParam";
|
|
8
8
|
import { Page } from "./Page";
|
|
9
|
-
import { configureMobxNextFrameScheduler } from "
|
|
9
|
+
import { configureMobxNextFrameScheduler } from "../render-utils/mobxTyped";
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
async function main() {
|