@novaqore/atom 0.1.2 → 0.1.3

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": "@novaqore/atom",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A full-system code agent with root-level access, built for isolated servers.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,7 +2,10 @@ import React from "react";
2
2
  import { Box, Text } from "ink";
3
3
  import { renderMarkdown } from "../../utils/markdown.js";
4
4
 
5
- export function AssistantMessage({ content, streaming = false }) {
5
+ export const AssistantMessage = React.memo(function AssistantMessage({
6
+ content,
7
+ streaming = false,
8
+ }) {
6
9
  const rendered = renderMarkdown(content, { streaming });
7
10
  const nlIdx = rendered.indexOf("\n");
8
11
  const firstLine = nlIdx === -1 ? rendered : rendered.slice(0, nlIdx);
@@ -20,4 +23,4 @@ export function AssistantMessage({ content, streaming = false }) {
20
23
  ),
21
24
  rest ? React.createElement(Text, null, rest) : null
22
25
  );
23
- }
26
+ });
@@ -16,7 +16,7 @@ function formatArgs(rawArgs) {
16
16
  }
17
17
  }
18
18
 
19
- export function ToolCall({ tc }) {
19
+ export const ToolCall = React.memo(function ToolCall({ tc }) {
20
20
  return React.createElement(
21
21
  Text,
22
22
  null,
@@ -29,4 +29,4 @@ export function ToolCall({ tc }) {
29
29
  formatArgs(tc.function.arguments),
30
30
  React.createElement(Text, { dimColor: true }, ")")
31
31
  );
32
- }
32
+ });
@@ -7,7 +7,7 @@ function formatMs(ms) {
7
7
  return ms < 1000 ? `${ms}ms` : `${(ms / 1000).toFixed(1)}s`;
8
8
  }
9
9
 
10
- export function ToolResult({ msg, duration }) {
10
+ export const ToolResult = React.memo(function ToolResult({ msg, duration }) {
11
11
  const content = (msg.content || "").trimEnd();
12
12
  const dur = duration ? ` · ${formatMs(duration)}` : "";
13
13
 
@@ -47,4 +47,4 @@ export function ToolResult({ msg, duration }) {
47
47
  { flexDirection: "column", paddingLeft: 2, marginBottom: 1 },
48
48
  children
49
49
  );
50
- }
50
+ });
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Box, Text } from "ink";
3
3
 
4
- export function UserMessage({ content }) {
4
+ export const UserMessage = React.memo(function UserMessage({ content }) {
5
5
  return React.createElement(
6
6
  Box,
7
7
  { marginBottom: 1 },
@@ -13,4 +13,4 @@ export function UserMessage({ content }) {
13
13
  React.createElement(Text, { dimColor: true }, content)
14
14
  )
15
15
  );
16
- }
16
+ });