feat: 全部类型问题解决

This commit is contained in:
claude-code-best
2026-04-11 10:24:00 +08:00
parent 7088fe3c8b
commit 6a70056910
135 changed files with 671 additions and 503 deletions

View File

@@ -241,17 +241,17 @@ export async function processUserInput({
// TODO: Clean this up
if (hookResult.message) {
switch (hookResult.message.attachment.type) {
switch (hookResult.message.attachment!.type) {
case 'hook_success':
if (!hookResult.message.attachment.content) {
if (!hookResult.message.attachment!.content) {
// Skip if there is no content
break
}
result.messages.push({
...hookResult.message,
attachment: {
...hookResult.message.attachment,
content: applyTruncation(hookResult.message.attachment.content as string),
...hookResult.message.attachment!,
content: applyTruncation(hookResult.message.attachment!.content as string),
},
} as AttachmentMessage)
break