Skip to content

Commit 17cc595

Browse files
committed
chore: format
1 parent cb05704 commit 17cc595

File tree

11 files changed

+47
-71
lines changed

11 files changed

+47
-71
lines changed

src/componentsV2/features/Assistant/PromptTabContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function PromptTabContent({ assistant, updateAssistant }: PromptTabConten
8080
</TextField.Label>
8181
<View className="flex-row items-center gap-1">
8282
<Pressable
83-
className="active:opacity-50 p-1"
83+
className="p-1 active:opacity-50"
8484
onPress={handleSaveButtonPress}
8585
hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}>
8686
<Save size={18} className="text-foreground/50" />

src/componentsV2/features/ChatScreen/MessageInput/README.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ A compound component for chat message input with support for text, voice, file a
99
```tsx
1010
import { MessageInput } from '@/componentsV2/features/ChatScreen/MessageInput'
1111

12-
<MessageInput
13-
topic={topic}
14-
assistant={assistant}
15-
updateAssistant={updateAssistant}
16-
/>
12+
;<MessageInput topic={topic} assistant={assistant} updateAssistant={updateAssistant} />
1713
```
1814

1915
### Custom Layout
@@ -58,17 +54,17 @@ MessageInput/
5854

5955
## Components
6056

61-
| Component | Description |
62-
|-----------|-------------|
63-
| `MessageInput` | Root component, provides Context |
64-
| `MessageInput.Main` | Main row with ToolButton + InputArea |
65-
| `MessageInput.ToolButton` | Opens tool sheet for attachments |
66-
| `MessageInput.InputArea` | Glass container with previews + input |
67-
| `MessageInput.Previews` | Shows editing/tool/file previews |
68-
| `MessageInput.InputRow` | Horizontal layout for TextField + Actions |
69-
| `MessageInput.TextField` | Multiline text input with expand support |
70-
| `MessageInput.Actions` | Animated Send/Voice/Pause buttons |
71-
| `MessageInput.AccessoryBar` | Think, Mention, MCP buttons |
57+
| Component | Description |
58+
| --------------------------- | ----------------------------------------- |
59+
| `MessageInput` | Root component, provides Context |
60+
| `MessageInput.Main` | Main row with ToolButton + InputArea |
61+
| `MessageInput.ToolButton` | Opens tool sheet for attachments |
62+
| `MessageInput.InputArea` | Glass container with previews + input |
63+
| `MessageInput.Previews` | Shows editing/tool/file previews |
64+
| `MessageInput.InputRow` | Horizontal layout for TextField + Actions |
65+
| `MessageInput.TextField` | Multiline text input with expand support |
66+
| `MessageInput.Actions` | Animated Send/Voice/Pause buttons |
67+
| `MessageInput.AccessoryBar` | Think, Mention, MCP buttons |
7268

7369
## Context API
7470

@@ -137,7 +133,7 @@ import { NewFeature } from './components/NewFeature'
137133

138134
export const MessageInput = Object.assign(Root, {
139135
// ... existing components
140-
NewFeature,
136+
NewFeature
141137
})
142138
```
143139

@@ -171,7 +167,7 @@ const [newField, setNewField] = useState('')
171167
const contextValue: MessageInputContextValue = {
172168
// ... existing values
173169
newField,
174-
setNewField,
170+
setNewField
175171
}
176172
```
177173

src/componentsV2/features/Menu/AssistantList.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ function AssistantListItem({ assistant, onPress }: AssistantListItemProps) {
3030
const topicCount = useTopicCount(assistant.id)
3131

3232
return (
33-
<PressableRow
34-
className="flex-row items-center justify-between rounded-xl p-0"
35-
onPress={() => onPress(assistant)}>
33+
<PressableRow className="flex-row items-center justify-between rounded-xl p-0" onPress={() => onPress(assistant)}>
3634
<XStack className="flex-1 items-center gap-3 pr-3">
3735
<EmojiAvatar
3836
emoji={assistant.emoji}

src/hooks/useMessageActions.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ import { presentDialog } from '@/componentsV2'
1111
import { dismissTextEditSheet, presentTextEditSheet } from '@/componentsV2/features/Sheet/TextEditSheet'
1212
import { presentTextSelectionSheet } from '@/componentsV2/features/Sheet/TextSelectionSheet'
1313
import { loggerService } from '@/services/LoggerService'
14-
import { deleteMessageById, editAssistantMessage, fetchTranslateThunk, regenerateAssistantMessage } from '@/services/MessagesService'
14+
import {
15+
deleteMessageById,
16+
editAssistantMessage,
17+
fetchTranslateThunk,
18+
regenerateAssistantMessage
19+
} from '@/services/MessagesService'
1520
import { setEditingMessage } from '@/store/runtime'
1621
import type { Assistant } from '@/types/assistant'
1722
import type { Message } from '@/types/message'

src/screens/settings/data/DataSettingsScreen.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export default function DataSettingsScreen() {
4646
icon: <Wifi size={24} />,
4747
screen: 'LanTransferScreen'
4848
}
49-
5049
]
5150
}
5251
// {

src/services/MessagesService.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,9 @@ export async function fetchTranslateThunk(assistantMessageId: string, message: M
773773
}
774774

775775
const translateAssistantModel = translateAssistant.defaultModel || getDefaultModel()
776-
const assistantForProvider = translateAssistant.model ? translateAssistant : { ...translateAssistant, model: translateAssistantModel }
776+
const assistantForProvider = translateAssistant.model
777+
? translateAssistant
778+
: { ...translateAssistant, model: translateAssistantModel }
777779
const assistantForRequest = translateAssistant.defaultModel
778780
? assistantForProvider
779781
: { ...assistantForProvider, defaultModel: translateAssistantModel }

src/services/lanTransfer/__tests__/binaryParser.test.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
import { Buffer } from 'buffer'
22

3-
import {
4-
isBinaryFrame,
5-
isJsonMessage,
6-
parseBinaryFrame,
7-
parseJsonMessage,
8-
parseNextMessage
9-
} from '../binaryParser'
3+
import { isBinaryFrame, isJsonMessage, parseBinaryFrame, parseJsonMessage, parseNextMessage } from '../binaryParser'
104

115
describe('binaryParser', () => {
126
// ==================== Helper Functions ====================

src/services/lanTransfer/__tests__/validators.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,9 @@ describe('validators', () => {
350350
})
351351

352352
test('validators handle prototype pollution attempts', () => {
353-
const maliciousMsg = JSON.parse('{"type":"handshake","version":"3.0","platform":"darwin","__proto__":{"admin":true}}')
353+
const maliciousMsg = JSON.parse(
354+
'{"type":"handshake","version":"3.0","platform":"darwin","__proto__":{"admin":true}}'
355+
)
354356
// Should still validate normally
355357
expect(isValidHandshakeMessage(maliciousMsg)).toBe(true)
356358
})

src/services/lanTransfer/handlers/fileTransfer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,4 +426,3 @@ export const handleFileEnd = (message: LanTransferFileEndMessage, context: FileT
426426
context.completeTransfer(false, 'Failed to move file', undefined, finalFile.uri, 'DISK_ERROR')
427427
}
428428
}
429-

src/services/lanTransfer/handlers/handshake.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { LAN_TRANSFER_PROTOCOL_VERSION } from '@/constants/lanTransfer'
2-
import type {
3-
LanTransferClientInfo,
4-
LanTransferIncomingMessage,
5-
LanTransferOutgoingMessage
6-
} from '@/types/lanTransfer'
2+
import type { LanTransferClientInfo, LanTransferIncomingMessage, LanTransferOutgoingMessage } from '@/types/lanTransfer'
73
import { LanTransferServerStatus } from '@/types/lanTransfer'
84

95
interface HandshakeContext {

0 commit comments

Comments
 (0)