Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
bit-pm
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
燕伟桐
bit-pm
Commits
d651a6aa
提交
d651a6aa
authored
4月 23, 2025
作者:
Will Chen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
max height for proposal details
上级
3b2fb12d
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
26 行增加
和
3 行删除
+26
-3
ChatInput.tsx
src/components/chat/ChatInput.tsx
+26
-3
没有找到文件。
src/components/chat/ChatInput.tsx
浏览文件 @
d651a6aa
...
@@ -345,6 +345,19 @@ function ChatInputActions({
...
@@ -345,6 +345,19 @@ function ChatInputActions({
const
otherFilesChanged
=
const
otherFilesChanged
=
proposal
.
filesChanged
?.
filter
((
f
:
FileChange
)
=>
!
f
.
isServerFunction
)
??
[];
proposal
.
filesChanged
?.
filter
((
f
:
FileChange
)
=>
!
f
.
isServerFunction
)
??
[];
function
formatTitle
({
title
,
isDetailsVisible
,
}:
{
title
:
string
;
isDetailsVisible
:
boolean
;
})
{
if
(
isDetailsVisible
)
{
return
title
;
}
return
title
.
slice
(
0
,
60
)
+
"..."
;
}
return
(
return
(
<
div
className=
"border-b border-border"
>
<
div
className=
"border-b border-border"
>
<
div
className=
"p-2"
>
<
div
className=
"p-2"
>
...
@@ -360,7 +373,9 @@ function ChatInputActions({
...
@@ -360,7 +373,9 @@ function ChatInputActions({
)
:
(
)
:
(
<
ChevronDown
size=
{
16
}
className=
"mr-1 flex-shrink-0"
/>
<
ChevronDown
size=
{
16
}
className=
"mr-1 flex-shrink-0"
/>
)
}
)
}
<
span
className=
"font-medium"
>
{
proposal
.
title
}
</
span
>
<
span
className=
"font-medium"
>
{
formatTitle
({
title
:
proposal
.
title
,
isDetailsVisible
})
}
</
span
>
</
div
>
</
div
>
<
div
className=
"text-xs text-muted-foreground ml-6"
>
<
div
className=
"text-xs text-muted-foreground ml-6"
>
<
ProposalSummary
<
ProposalSummary
...
@@ -414,6 +429,7 @@ function ChatInputActions({
...
@@ -414,6 +429,7 @@ function ChatInputActions({
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
"overflow-y-auto max-h-[calc(100vh-300px)]"
>
{
isDetailsVisible
&&
(
{
isDetailsVisible
&&
(
<
div
className=
"p-3 border-t border-border bg-muted/50 text-sm"
>
<
div
className=
"p-3 border-t border-border bg-muted/50 text-sm"
>
{
!!
proposal
.
securityRisks
.
length
&&
(
{
!!
proposal
.
securityRisks
.
length
&&
(
...
@@ -488,7 +504,10 @@ function ChatInputActions({
...
@@ -488,7 +504,10 @@ function ChatInputActions({
{
serverFunctions
.
map
((
file
:
FileChange
,
index
:
number
)
=>
(
{
serverFunctions
.
map
((
file
:
FileChange
,
index
:
number
)
=>
(
<
li
key=
{
index
}
className=
"flex items-center space-x-2"
>
<
li
key=
{
index
}
className=
"flex items-center space-x-2"
>
{
getIconForFileChange
(
file
)
}
{
getIconForFileChange
(
file
)
}
<
span
title=
{
file
.
path
}
className=
"truncate cursor-default"
>
<
span
title=
{
file
.
path
}
className=
"truncate cursor-default"
>
{
file
.
name
}
{
file
.
name
}
</
span
>
</
span
>
<
span
className=
"text-muted-foreground text-xs truncate"
>
<
span
className=
"text-muted-foreground text-xs truncate"
>
...
@@ -507,7 +526,10 @@ function ChatInputActions({
...
@@ -507,7 +526,10 @@ function ChatInputActions({
{
otherFilesChanged
.
map
((
file
:
FileChange
,
index
:
number
)
=>
(
{
otherFilesChanged
.
map
((
file
:
FileChange
,
index
:
number
)
=>
(
<
li
key=
{
index
}
className=
"flex items-center space-x-2"
>
<
li
key=
{
index
}
className=
"flex items-center space-x-2"
>
{
getIconForFileChange
(
file
)
}
{
getIconForFileChange
(
file
)
}
<
span
title=
{
file
.
path
}
className=
"truncate cursor-default"
>
<
span
title=
{
file
.
path
}
className=
"truncate cursor-default"
>
{
file
.
name
}
{
file
.
name
}
</
span
>
</
span
>
<
span
className=
"text-muted-foreground text-xs truncate"
>
<
span
className=
"text-muted-foreground text-xs truncate"
>
...
@@ -521,6 +543,7 @@ function ChatInputActions({
...
@@ -521,6 +543,7 @@ function ChatInputActions({
</
div
>
</
div
>
)
}
)
}
</
div
>
</
div
>
</
div
>
);
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论