@townco/ui 0.1.33 → 0.1.35

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 (48) hide show
  1. package/dist/core/hooks/use-chat-session.d.ts +1 -1
  2. package/dist/core/schemas/chat.d.ts +1 -1
  3. package/dist/gui/components/Button.js +1 -1
  4. package/dist/gui/components/ChatEmptyState.js +1 -1
  5. package/dist/gui/components/ChatHeader.js +2 -2
  6. package/dist/gui/components/ChatInput.js +1 -1
  7. package/dist/gui/components/ChatInputCommandMenu.js +1 -1
  8. package/dist/gui/components/ChatLayout.js +1 -1
  9. package/dist/gui/components/ChatPanelTabContent.d.ts +3 -0
  10. package/dist/gui/components/ChatPanelTabContent.js +24 -5
  11. package/dist/gui/components/ChatSecondaryPanel.js +3 -3
  12. package/dist/gui/components/ChatView.js +28 -9
  13. package/dist/gui/components/Dialog.js +2 -2
  14. package/dist/gui/components/DropdownMenu.js +7 -7
  15. package/dist/gui/components/FileSystemItem.d.ts +17 -0
  16. package/dist/gui/components/FileSystemItem.js +81 -0
  17. package/dist/gui/components/FileSystemView.d.ts +14 -0
  18. package/dist/gui/components/FileSystemView.js +46 -0
  19. package/dist/gui/components/Input.js +1 -1
  20. package/dist/gui/components/Label.js +1 -1
  21. package/dist/gui/components/MarkdownRenderer.js +5 -5
  22. package/dist/gui/components/Message.d.ts +1 -1
  23. package/dist/gui/components/MessageContent.js +8 -8
  24. package/dist/gui/components/PanelTabsHeader.js +1 -1
  25. package/dist/gui/components/Reasoning.js +2 -2
  26. package/dist/gui/components/Response.js +13 -11
  27. package/dist/gui/components/Select.js +3 -3
  28. package/dist/gui/components/SourceListItem.js +1 -1
  29. package/dist/gui/components/Tabs.js +1 -1
  30. package/dist/gui/components/Task.js +2 -2
  31. package/dist/gui/components/Textarea.js +1 -1
  32. package/dist/gui/components/ThinkingBlock.js +2 -2
  33. package/dist/gui/components/TodoList.js +1 -1
  34. package/dist/gui/components/ToolCall.js +67 -70
  35. package/dist/gui/components/ToolCallList.js +1 -1
  36. package/dist/gui/components/index.d.ts +4 -0
  37. package/dist/gui/components/index.js +4 -0
  38. package/dist/gui/data/mockFileSystemData.d.ts +21 -0
  39. package/dist/gui/data/mockFileSystemData.js +127 -0
  40. package/dist/gui/types/filesystem.d.ts +27 -0
  41. package/dist/gui/types/filesystem.js +5 -0
  42. package/dist/sdk/schemas/session.d.ts +12 -12
  43. package/package.json +3 -3
  44. package/src/styles/global.css +108 -0
  45. package/dist/core/lib/logger.d.ts +0 -59
  46. package/dist/core/lib/logger.js +0 -191
  47. package/dist/tui/components/LogsPanel.d.ts +0 -5
  48. package/dist/tui/components/LogsPanel.js +0 -29
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Text } from "ink";
3
- import { useEffect, useState } from "react";
4
- import { subscribeToLogs } from "../../core/lib/logger.js";
5
- // Color mapping for log levels
6
- const LOG_LEVEL_COLORS = {
7
- trace: "gray",
8
- debug: "blue",
9
- info: "green",
10
- warn: "yellow",
11
- error: "red",
12
- fatal: "red",
13
- };
14
- export function LogsPanel({ logs: initialLogs }) {
15
- const [logs, setLogs] = useState(initialLogs);
16
- // Subscribe to new logs
17
- useEffect(() => {
18
- const unsubscribe = subscribeToLogs((entry) => {
19
- setLogs((prev) => [...prev, entry]);
20
- });
21
- return unsubscribe;
22
- }, []);
23
- if (logs.length === 0) {
24
- return (_jsx(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, children: _jsx(Text, { dimColor: true, children: "No logs yet..." }) }));
25
- }
26
- // Show last 100 logs
27
- const displayLogs = logs.slice(-100);
28
- return (_jsx(Box, { flexDirection: "column", paddingX: 1, children: displayLogs.map((log) => (_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsx(Text, { dimColor: true, children: new Date(log.timestamp).toLocaleTimeString() }), _jsxs(Text, { color: LOG_LEVEL_COLORS[log.level], bold: true, children: ["[", log.level.toUpperCase(), "]"] }), _jsxs(Text, { dimColor: true, children: ["[", log.service, "]"] }), _jsx(Text, { children: log.message }), log.metadata && (_jsx(Text, { dimColor: true, children: JSON.stringify(log.metadata) }))] }, log.id))) }));
29
- }