fix: preserve fully truncated skill warnings
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "goodbuddy",
|
||||
"version": "0.8.8",
|
||||
"version": "0.8.9",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "goodbuddy",
|
||||
"version": "0.8.8",
|
||||
"version": "0.8.9",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.30.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "goodbuddy",
|
||||
"version": "0.8.8",
|
||||
"version": "0.8.9",
|
||||
"private": true,
|
||||
"description": "Secure desktop AI workspace with controlled Agent Runtimes",
|
||||
"desktopName": "GoodBuddy",
|
||||
|
||||
@@ -335,6 +335,11 @@ describe('CapabilityService', () => {
|
||||
|
||||
const truncated = await service.getSkillInstructions('model', 200)
|
||||
expect(truncated).toContain('因超出注入上限未加载')
|
||||
|
||||
const fullyTruncated = await service.getSkillInstructions('model', 1)
|
||||
expect(fullyTruncated).toContain('因超出注入上限未加载')
|
||||
expect(fullyTruncated).toContain('文档写作')
|
||||
expect(fullyTruncated).toContain('超长技能')
|
||||
})
|
||||
|
||||
it('imports a managed Skill from a ZIP package', async () => {
|
||||
|
||||
@@ -1361,7 +1361,7 @@ export class CapabilityService {
|
||||
sections.push(section)
|
||||
length += section.length
|
||||
}
|
||||
if (sections.length === 0) {
|
||||
if (sections.length === 0 && skipped.length === 0) {
|
||||
return ''
|
||||
}
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user