create-lykomi-app 0.9.21 → 0.10.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 (46) hide show
  1. package/README.md +21 -18
  2. package/dist/index.mjs +4 -4
  3. package/package.json +4 -4
  4. package/presets/foundry-iq/files/AGENTS.md +4 -4
  5. package/presets/foundry-iq/files/README.md +3 -3
  6. package/presets/foundry-iq/files/agent/app/agent.py +1 -1
  7. package/presets/foundry-iq/files/agent/app/foundry_iq.py +1 -1
  8. package/presets/foundry-iq/files/agent/app/main.py +1 -1
  9. package/presets/foundry-iq/files/src/main.tsx +4 -4
  10. package/presets/foundry-iq/files/src/pages/chat-page.tsx +1 -1
  11. package/presets/foundry-iq/files/src/tools/foundry-iq-module.tsx +1 -1
  12. package/presets/foundry-iq/files/src/tools/search-results-tool-ui.tsx +2 -2
  13. package/presets/neo4j/files/AGENTS.md +6 -6
  14. package/presets/neo4j/files/README.md +2 -2
  15. package/presets/neo4j/files/agent/app/graph_payload.py +2 -2
  16. package/presets/neo4j/files/agent/app/graph_tools.py +1 -1
  17. package/presets/neo4j/files/agent/app/main.py +1 -1
  18. package/presets/neo4j/files/agent/tests/test_graph_payload.py +1 -1
  19. package/presets/neo4j/files/src/index.css +7 -7
  20. package/presets/neo4j/files/src/main.tsx +3 -3
  21. package/presets/neo4j/files/src/pages/chat-page.tsx +1 -1
  22. package/presets/neo4j/files/src/tools/graph-module.tsx +2 -2
  23. package/presets/neo4j/files/vite.config.ts +10 -10
  24. package/presets/neo4j/manifest.json +1 -1
  25. package/template/AGENTS.md +17 -12
  26. package/template/README.md +32 -41
  27. package/template/agent/_env.example +1 -1
  28. package/template/agent/app/agent.py +1 -1
  29. package/template/agent/app/main.py +11 -1
  30. package/template/agent/app/tools.py +1 -1
  31. package/template/index.html +1 -1
  32. package/template/package.json +7 -6
  33. package/template/public/favicon-dark.svg +1 -0
  34. package/template/public/favicon.svg +1 -4
  35. package/template/public/fonts/Manrope-Variable.ttf +0 -0
  36. package/template/public/fonts/OFL.txt +93 -0
  37. package/template/src/index.css +15 -6
  38. package/template/src/main.tsx +11 -15
  39. package/template/src/pages/chat-page.tsx +2 -8
  40. package/template/src/pages/guide-page.tsx +134 -0
  41. package/template/src/pages/guide-windows.ts +32 -0
  42. package/template/src/pages/index.tsx +5 -4
  43. package/template/src/pages/starter-prompts.tsx +30 -0
  44. package/template/src/starter-module.ts +51 -0
  45. package/template/src/theme.ts +82 -0
  46. package/template/vite.config.ts +9 -9
@@ -0,0 +1,30 @@
1
+ import { ThreadPrimitive } from "@assistant-ui/react";
2
+ import { Button } from "@lykomi/web-primitives";
3
+ import { useChatBubbleStore } from "@lykomi/web-ui";
4
+
5
+ const prompts = [
6
+ "Say hello world using the hello_world tool",
7
+ "Check the weather in Seattle",
8
+ "What tools can you use?",
9
+ ];
10
+
11
+ /** One click demonstrates a real AG-UI turn with the bundled tools. */
12
+ export function StarterPrompts() {
13
+ return (
14
+ <div className="flex flex-wrap justify-center gap-2" aria-label="Try a prompt">
15
+ {prompts.map((prompt) => (
16
+ <ThreadPrimitive.Suggestion
17
+ key={prompt}
18
+ prompt={prompt}
19
+ send
20
+ asChild
21
+ onClick={() => useChatBubbleStore.getState().open()}
22
+ >
23
+ <Button variant="outline" size="sm" className="h-auto min-h-9 text-wrap py-2 text-sm">
24
+ {prompt}
25
+ </Button>
26
+ </ThreadPrimitive.Suggestion>
27
+ ))}
28
+ </div>
29
+ );
30
+ }
@@ -0,0 +1,51 @@
1
+ import { guideWindows } from "./pages/guide-windows.ts";
2
+ import { useEffect } from "react";
3
+ import { BookOpen } from "lucide-react";
4
+ import { useNavigate } from "react-router";
5
+ import { defineChatModule } from "@lykomi/web-shell";
6
+ import { useNavStore } from "@lykomi/web-ui";
7
+
8
+ function useStarterNavigation() {
9
+ const navigate = useNavigate();
10
+ useEffect(() => {
11
+ const protect = (event: BeforeUnloadEvent) => {
12
+ if (guideWindows.get().tabs.some((tab) => tab.dirty)) {
13
+ event.preventDefault();
14
+ event.returnValue = "";
15
+ }
16
+ };
17
+ window.addEventListener("beforeunload", protect);
18
+ useNavStore.getState().addGroup({
19
+ label: "Starter",
20
+ hideLabel: true,
21
+ items: [
22
+ {
23
+ to: "/guide",
24
+ label: "Guide",
25
+ icon: BookOpen,
26
+ description: "Starter guide for the agent, tools, and UI modules",
27
+ contextInstructions:
28
+ "The user is reading the starter guide. Explain how to replace the sample tools, " +
29
+ "add a page, or connect a service when asked. Do not claim a service is configured " +
30
+ "unless the user has supplied its settings.",
31
+ },
32
+ ],
33
+ });
34
+ useNavStore.getState().setUserMenuAction({
35
+ id: "starter-guide",
36
+ label: "About this starter",
37
+ onSelect: () => navigate("/guide"),
38
+ });
39
+ return () => {
40
+ window.removeEventListener("beforeunload", protect);
41
+ useNavStore.getState().removeGroup("Starter");
42
+ useNavStore.getState().removeUserMenuAction("starter-guide");
43
+ };
44
+ }, [navigate]);
45
+ }
46
+
47
+ /** A small module demonstrates how an app owns its routes and navigation. */
48
+ export const starterModule = defineChatModule({
49
+ name: "starter-guide",
50
+ useInit: useStarterNavigation,
51
+ });
@@ -0,0 +1,82 @@
1
+ import type { ThemeLayer } from "@lykomi/web-ui";
2
+
3
+ /** The LYKOMI starter palette. Replace or extend this layer for your app. */
4
+ export const starterTheme: ThemeLayer = {
5
+ id: "lykomi-starter",
6
+ name: "LYKOMI UI",
7
+ definition: {
8
+ light: {
9
+ background: "#FAFAF9",
10
+ foreground: "#0B0C0E",
11
+ card: "#FFFFFF",
12
+ cardForeground: "#0B0C0E",
13
+ primary: "#3F666B",
14
+ primaryForeground: "#FFFFFF",
15
+ secondary: "#E8E8E5",
16
+ secondaryForeground: "#0B0C0E",
17
+ muted: "#EDEDEB",
18
+ mutedForeground: "#626369",
19
+ accent: "#E5EEEF",
20
+ accentForeground: "#3F666B",
21
+ border: "#DCDDD9",
22
+ input: "#DCDDD9",
23
+ ring: "#3F666B",
24
+ },
25
+ dark: {
26
+ background: "#0D0D10",
27
+ foreground: "#EBEBF4",
28
+ card: "#151519",
29
+ cardForeground: "#EBEBF4",
30
+ primary: "#F4F4F4",
31
+ primaryForeground: "#101010",
32
+ secondary: "#1E1E22",
33
+ secondaryForeground: "#EBEBF4",
34
+ muted: "#1E1E22",
35
+ mutedForeground: "#B8B8C2",
36
+ accent: "#1E1D2C",
37
+ accentForeground: "#EBEBF4",
38
+ border: "#2A2A2E",
39
+ input: "#2A2A2E",
40
+ ring: "#8C8C8C",
41
+ },
42
+ sidebar: {
43
+ light: {
44
+ sidebar: "#F2F2F0",
45
+ sidebarForeground: "#0B0C0E",
46
+ sidebarPrimary: "#3F666B",
47
+ sidebarPrimaryForeground: "#FFFFFF",
48
+ sidebarAccent: "#E4E4E1",
49
+ sidebarAccentForeground: "#0B0C0E",
50
+ sidebarSelected: "#DCE9E7",
51
+ sidebarSelectedForeground: "#3F666B",
52
+ sidebarIcon: "#626369",
53
+ sidebarBorder: "#DCDDD9",
54
+ sidebarRing: "#3F666B",
55
+ },
56
+ dark: {
57
+ sidebar: "#111115",
58
+ sidebarForeground: "#E5E5E7",
59
+ sidebarPrimary: "#F4F4F4",
60
+ sidebarPrimaryForeground: "#101010",
61
+ sidebarAccent: "#1E1E22",
62
+ sidebarAccentForeground: "#F4F4F4",
63
+ sidebarSelected: "#1E1D2C",
64
+ sidebarSelectedForeground: "#F4F4F4",
65
+ sidebarIcon: "#C0C0C3",
66
+ sidebarBorder: "#2A2A2E",
67
+ sidebarRing: "#B4B4B4",
68
+ },
69
+ },
70
+ typography: {
71
+ bodyFont: '"Manrope", ui-sans-serif, system-ui, sans-serif',
72
+ headingFont: '"Manrope", ui-sans-serif, system-ui, sans-serif',
73
+ },
74
+ radius: { radius: "0.375rem" },
75
+ branding: {
76
+ appName: "LYKOMI UI",
77
+ appTitle: "LYKOMI UI",
78
+ faviconUrl: "/favicon.svg",
79
+ darkFaviconUrl: "/favicon-dark.svg",
80
+ },
81
+ },
82
+ };
@@ -33,8 +33,8 @@ export default defineConfig({
33
33
  manualChunks(id) {
34
34
  if (!id.includes("node_modules")) return;
35
35
  // Match on the PACKAGE, not the path: pnpm's store directories
36
- // embed peer names ("…foundry-web-ui@…_@ag-ui+client@…_@assistant-u…"),
37
- // so a substring match on the full path filed foundry-web-ui under
36
+ // embed peer names ("…web-ui@…_@ag-ui+client@…_@assistant-u…"),
37
+ // so a substring match on the full path filed web-ui under
38
38
  // whichever peer name the rules met first, and "react" matched
39
39
  // half the store. The last node_modules segment is the package.
40
40
  const pkg = id.slice(id.lastIndexOf("node_modules/") + "node_modules/".length);
@@ -56,16 +56,16 @@ export default defineConfig({
56
56
  if (pkg.startsWith("@ag-ui/")) return "vendor-ag-ui";
57
57
  if (pkg.startsWith("@azure/msal")) return "vendor-auth";
58
58
  if (
59
- pkg.startsWith("@iloveagents/foundry-web-ui/dist/workbench.js") ||
60
- pkg.startsWith("@iloveagents/foundry-web-ui/dist/workbench/")
59
+ pkg.startsWith("@lykomi/web-ui/dist/workbench.js") ||
60
+ pkg.startsWith("@lykomi/web-ui/dist/workbench/")
61
61
  )
62
- return "foundry-workbench";
63
- if (pkg.startsWith("@iloveagents/foundry-web-ui/")) return "vendor-foundry-ui";
64
- if (pkg.startsWith("@iloveagents/foundry-web-shell/")) return "vendor-foundry-shell";
65
- if (pkg.startsWith("@iloveagents/foundry-agent/")) return "vendor-foundry-agent";
62
+ return "lykomi-workbench";
63
+ if (pkg.startsWith("@lykomi/web-ui/")) return "vendor-lykomi-ui";
64
+ if (pkg.startsWith("@lykomi/web-shell/")) return "vendor-lykomi-shell";
65
+ if (pkg.startsWith("@lykomi/agent/")) return "vendor-lykomi-agent";
66
66
  // Voice is optional at runtime and heavy at build; its own chunk
67
67
  // keeps the main path light and the size gate honest.
68
- if (pkg.startsWith("@iloveagents/foundry-web-voice/")) return "vendor-foundry-voice";
68
+ if (pkg.startsWith("@lykomi/web-voice/")) return "vendor-lykomi-voice";
69
69
  // Before the react rule: recharts drags react-smooth + the d3
70
70
  // sub-packages along, and "react-smooth" would land in
71
71
  // vendor-react and push it past the chunk-size gate.