thatgfsj-code 1.0.3 → 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/dist/cmd/index.js CHANGED
@@ -24,7 +24,7 @@ process.on('unhandledRejection', (reason) => {
24
24
  program
25
25
  .name('gfcode')
26
26
  .description('Thatgfsj Code - AI Coding Assistant')
27
- .version('1.0.3')
27
+ .version('1.0.4')
28
28
  .argument('[prompt]', 'Task to execute (omit to start interactive mode)')
29
29
  .option('-m, --model <model>', 'Specify model')
30
30
  .option('-i, --interactive', 'Force interactive mode')
@@ -1 +1 @@
1
- {"version":3,"file":"ChatList.d.ts","sourceRoot":"","sources":["../../../src/tui/components/ChatList.tsx"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,UAAU,KAAK;IACb,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,YAAY,EAAE,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,mCAkBnB,CAAC"}
1
+ {"version":3,"file":"ChatList.d.ts","sourceRoot":"","sources":["../../../src/tui/components/ChatList.tsx"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,UAAU,KAAK;IACb,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,YAAY,EAAE,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,mCA2BnB,CAAC"}
@@ -1,13 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /** @jsxImportSource react */
3
3
  import { memo } from 'react';
4
- import { Box } from 'ink';
4
+ import { Box, Static } from 'ink';
5
5
  import { ChatMessage } from './ChatMessage.js';
6
6
  export const ChatList = memo(function ChatList({ messages, streaming, streamingToolCalls, width }) {
7
- return (_jsxs(Box, { flexDirection: "column", children: [messages.map((msg, i) => (_jsx(ChatMessage, { message: msg, width: width }, i))), (streaming || streamingToolCalls) && (_jsx(ChatMessage, { message: {
7
+ const hasStreaming = !!(streaming || (streamingToolCalls && streamingToolCalls.length > 0));
8
+ return (_jsxs(Box, { flexDirection: "column", children: [messages.length > 0 && (_jsx(Static, { items: messages, children: (msg, index) => (_jsx(ChatMessage, { message: msg, width: width }, `msg-${index}`)) })), hasStreaming && (_jsx(ChatMessage, { message: {
8
9
  role: 'assistant',
9
10
  content: streaming || '',
10
- toolCalls: streamingToolCalls,
11
+ toolCalls: streamingToolCalls && streamingToolCalls.length > 0 ? streamingToolCalls : undefined,
11
12
  }, width: width }))] }));
12
13
  });
13
14
  //# sourceMappingURL=ChatList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatList.js","sourceRoot":"","sources":["../../../src/tui/components/ChatList.tsx"],"names":[],"mappings":";AAAA,6BAA6B;AAC7B,OAAc,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAoB,MAAM,kBAAkB,CAAC;AAUjE,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,kBAAkB,EAAE,KAAK,EAAS;IACtG,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EA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CACjE,GACM,CACV,EAGA,YAAY,IAAI,CACf,KAAC,WAAW,IACV,OAAO,EAAE;oBACP,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,SAAS,IAAI,EAAE;oBACxB,SAAS,EAAE,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS;iBAChG,EACD,KAAK,EAAE,KAAK,GACZ,CACH,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -3,6 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from 'react';
4
4
  import { Box, Text } from 'ink';
5
5
  export const Header = React.memo(function Header({ provider, model }) {
6
- return (_jsxs(Box, { flexDirection: "column", marginBottom: 0, children: [_jsxs(Box, { justifyContent: "space-between", width: "100%", children: [_jsxs(Box, { children: [_jsx(Text, { color: "#06B6D4", bold: true, children: " \u26A1 " }), _jsx(Text, { color: "#22D3EE", bold: true, children: "THATGFSJ CODE" }), _jsx(Text, { dimColor: true, children: " v1.0.3" })] }), _jsxs(Box, { children: [_jsxs(Text, { color: "#06B6D4", bold: true, children: [" ", provider, " "] }), _jsx(Text, { dimColor: true, children: "/" }), _jsxs(Text, { color: "#22D3EE", children: [" ", model, " "] })] })] }), _jsx(Text, { color: "#374151", children: '─'.repeat(80) })] }));
6
+ return (_jsxs(Box, { flexDirection: "column", marginBottom: 0, children: [_jsxs(Box, { justifyContent: "space-between", width: "100%", children: [_jsxs(Box, { children: [_jsx(Text, { color: "#06B6D4", bold: true, children: " \u26A1 " }), _jsx(Text, { color: "#22D3EE", bold: true, children: "THATGFSJ CODE" }), _jsx(Text, { dimColor: true, children: " v1.0.4" })] }), _jsxs(Box, { children: [_jsxs(Text, { color: "#06B6D4", bold: true, children: [" ", provider, " "] }), _jsx(Text, { dimColor: true, children: "/" }), _jsxs(Text, { color: "#22D3EE", children: [" ", model, " "] })] })] }), _jsx(Text, { color: "#374151", children: '─'.repeat(80) })] }));
7
7
  });
8
8
  //# sourceMappingURL=Header.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thatgfsj-code",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Thatgfsj Code - AI Coding Assistant",
5
5
  "main": "dist/cmd/index.js",
6
6
  "type": "module",
package/src/cmd/index.tsx CHANGED
@@ -28,7 +28,7 @@ process.on('unhandledRejection', (reason) => {
28
28
  program
29
29
  .name('gfcode')
30
30
  .description('Thatgfsj Code - AI Coding Assistant')
31
- .version('1.0.3')
31
+ .version('1.0.4')
32
32
  .argument('[prompt]', 'Task to execute (omit to start interactive mode)')
33
33
  .option('-m, --model <model>', 'Specify model')
34
34
  .option('-i, --interactive', 'Force interactive mode')
@@ -1,6 +1,6 @@
1
1
  /** @jsxImportSource react */
2
2
  import React, { memo } from 'react';
3
- import { Box } from 'ink';
3
+ import { Box, Static } from 'ink';
4
4
  import { ChatMessage, type MessageData } from './ChatMessage.js';
5
5
  import type { ToolCallData } from './ToolCall.js';
6
6
 
@@ -12,17 +12,26 @@ interface Props {
12
12
  }
13
13
 
14
14
  export const ChatList = memo(function ChatList({ messages, streaming, streamingToolCalls, width }: Props) {
15
+ const hasStreaming = !!(streaming || (streamingToolCalls && streamingToolCalls.length > 0));
16
+
15
17
  return (
16
18
  <Box flexDirection="column">
17
- {messages.map((msg, i) => (
18
- <ChatMessage key={i} message={msg} width={width} />
19
- ))}
20
- {(streaming || streamingToolCalls) && (
19
+ {/* Completed messages - Static prevents re-rendering */}
20
+ {messages.length > 0 && (
21
+ <Static items={messages}>
22
+ {(msg: MessageData, index: number) => (
23
+ <ChatMessage key={`msg-${index}`} message={msg} width={width} />
24
+ )}
25
+ </Static>
26
+ )}
27
+
28
+ {/* Streaming content - only this part re-renders */}
29
+ {hasStreaming && (
21
30
  <ChatMessage
22
31
  message={{
23
32
  role: 'assistant',
24
33
  content: streaming || '',
25
- toolCalls: streamingToolCalls,
34
+ toolCalls: streamingToolCalls && streamingToolCalls.length > 0 ? streamingToolCalls : undefined,
26
35
  }}
27
36
  width={width}
28
37
  />
@@ -14,7 +14,7 @@ export const Header = React.memo(function Header({ provider, model }: Props) {
14
14
  <Box>
15
15
  <Text color="#06B6D4" bold> ⚡ </Text>
16
16
  <Text color="#22D3EE" bold>THATGFSJ CODE</Text>
17
- <Text dimColor> v1.0.3</Text>
17
+ <Text dimColor> v1.0.4</Text>
18
18
  </Box>
19
19
  <Box>
20
20
  <Text color="#06B6D4" bold> {provider} </Text>