chores: add hl for truncated messages (#2672)
This commit is contained in:
@@ -39,7 +39,10 @@ local function text_to_truncated_lines(text, decoration, truncate)
|
|||||||
lines,
|
lines,
|
||||||
Line:new({
|
Line:new({
|
||||||
{ decoration },
|
{ decoration },
|
||||||
{ string.format("... (Result truncated, remaining %d lines not shown)", #text_lines - #lines + 1) },
|
{
|
||||||
|
string.format("... (Result truncated, remaining %d lines not shown)", #text_lines - #lines + 1),
|
||||||
|
Highlights.AVANTE_COMMENT_FG,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
@@ -61,7 +64,10 @@ local function lines_to_truncated_lines(lines, decoration, truncate)
|
|||||||
truncated_lines,
|
truncated_lines,
|
||||||
Line:new({
|
Line:new({
|
||||||
{ decoration },
|
{ decoration },
|
||||||
{ string.format("... (Result truncated, remaining %d lines not shown)", #lines - idx + 1) },
|
{
|
||||||
|
string.format("... (Result truncated, remaining %d lines not shown)", #lines - idx + 1),
|
||||||
|
Highlights.AVANTE_COMMENT_FG,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
@@ -134,7 +140,10 @@ function M.get_diff_lines(old_str, new_str, decoration, truncate)
|
|||||||
lines,
|
lines,
|
||||||
Line:new({
|
Line:new({
|
||||||
{ decoration },
|
{ decoration },
|
||||||
{ string.format("... (Result truncated, remaining %d hunks not shown)", #patch - idx + 1) },
|
{
|
||||||
|
string.format("... (Result truncated, remaining %d hunks not shown)", #patch - idx + 1),
|
||||||
|
Highlights.AVANTE_COMMENT_FG,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
@@ -234,7 +243,10 @@ function M.get_content_lines(content, decoration, truncate)
|
|||||||
lines,
|
lines,
|
||||||
Line:new({
|
Line:new({
|
||||||
{ decoration },
|
{ decoration },
|
||||||
{ string.format("... (Result truncated, remaining %d lines not shown)", #lines_ - idx + 1) },
|
{
|
||||||
|
string.format("... (Result truncated, remaining %d lines not shown)", #lines_ - idx + 1),
|
||||||
|
Highlights.AVANTE_COMMENT_FG,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
@@ -258,7 +270,10 @@ function M.get_content_lines(content, decoration, truncate)
|
|||||||
lines,
|
lines,
|
||||||
Line:new({
|
Line:new({
|
||||||
{ decoration },
|
{ decoration },
|
||||||
{ string.format("... (Result truncated, remaining %d lines not shown)", #lines_ - idx + 1) },
|
{
|
||||||
|
string.format("... (Result truncated, remaining %d lines not shown)", #lines_ - idx + 1),
|
||||||
|
Highlights.AVANTE_COMMENT_FG,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
@@ -382,7 +397,10 @@ local function tool_to_lines(item, message, messages)
|
|||||||
lines,
|
lines,
|
||||||
Line:new({
|
Line:new({
|
||||||
{ decoration },
|
{ decoration },
|
||||||
{ string.format("... (Input truncated, remaining %d lines not shown)", #lines_ - idx + 1) },
|
{
|
||||||
|
string.format("... (Input truncated, remaining %d lines not shown)", #lines_ - idx + 1),
|
||||||
|
Highlights.AVANTE_COMMENT_FG,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user