?? ?? ?? ???? PPTX ??? ? ?? ??

?? ?? ??? PPTX/DOCX/XLSX/HTML ???? ? ?????, PPTX? ???? ??? ? ???? ?? ???? ? ??? ?? ?? ???? ????.

?? ????:
- ExcelSkill? conditional_formats? ??? ?? ???? ??? ? ?????? OpenXML? ?? ???? workbook quality review? ??
- DocxSkill? style_map? ??? ???? ??/??/?? ???? ?? ?? ParagraphStyleId? ??
- HtmlSkill? print_header/print_footer ?? ?? ???? ???? ArtifactQualityReviewService? ?? ?? ?? ???? ??
- PptxTemplatePackRegistry? PptxSkill template_pack ????? ??? strategy/board/pmo/finance/sales/operating_model ??? ??? ?? ?? ?? ??? ??
- ?????, ????, ?? ???, ??? ?? ?? ?? ???? ???? ?? ?? ?? ???? ???? ???? ??

?? ??:
- dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_next_doc_ppt\\ -p:IntermediateOutputPath=obj\\verify_next_doc_ppt\\ => ?? 0 / ?? 0
- dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "ArtifactQualityReviewServiceTests|ExcelSkillDataValidationTests|ExcelSkillConditionalFormattingTests|ExcelSkillExecutiveSummaryLinkTests|ExcelSkillSummarySheetTests|DocxSkillTemplateFeaturesTests|DocxSkillStyleMapTests|HtmlSkillConsultingSectionsTests|HtmlSkillPrintFrameTests|DocumentAssemblerDocxFeaturesTests|PptxSkillConsultingDeckTests|PptxSkillAutoRepairTests|PptxSkillTemplatePackTests" -p:OutputPath=bin\\verify_next_doc_ppt_tests\\ -p:IntermediateOutputPath=obj\\verify_next_doc_ppt_tests\\ => ?? 15
This commit is contained in:
2026-04-14 22:54:24 +09:00
parent 5607f6391e
commit 3232db1b12
14 changed files with 790 additions and 97 deletions

View File

@@ -120,6 +120,12 @@ public class PptxSkill : IAgentTool
"Available: basic100, core100, frame_blue, mr_ppt_01, mr_ppt_02, mr_ppt_03, mr_ppt_04, mr_ppt_05. " +
"Overrides 'theme' and 'theme_file'. Falls back to color extraction if master clone fails.",
},
["template_pack"] = new()
{
Type = "string",
Description = "Optional purpose-based template pack. Available: strategy, board, pmo, finance, sales, operating_model. " +
"Used as an extensibility layer for deck-specific defaults when no explicit template or theme file is set.",
},
["theme_file"] = new()
{
Type = "string",
@@ -536,6 +542,11 @@ public class PptxSkill : IAgentTool
!string.IsNullOrWhiteSpace(themeFileEl.SafeGetString());
var hasExplicitTemplate = args.SafeTryGetProperty("template", out var templateArgEl) &&
!string.IsNullOrWhiteSpace(templateArgEl.SafeGetString());
var audience = args.SafeTryGetProperty("audience", out var audienceEl) ? audienceEl.SafeGetString() : null;
var objective = args.SafeTryGetProperty("objective", out var objectiveEl) ? objectiveEl.SafeGetString() : null;
var requestedTemplatePack = args.SafeTryGetProperty("template_pack", out var templatePackEl)
? templatePackEl.SafeGetString()
: null;
// 전체 복제용 텍스트 교체 맵
Dictionary<string, string>? globalReplacements = null;
@@ -567,6 +578,14 @@ public class PptxSkill : IAgentTool
}
}
var templatePack = !string.IsNullOrWhiteSpace(requestedTemplatePack)
? PptxTemplatePackRegistry.Resolve(requestedTemplatePack)
: (!hasExplicitTheme && !hasExplicitTemplate && !hasThemeFile
? PptxTemplatePackRegistry.Suggest(preparedDeck?.Objective ?? objective, preparedDeck?.Audience ?? audience)
: null);
var templatePackName = templatePack?.Name;
var packTemplateName = templatePack?.PreferredTemplate;
var fullPath = FileReadTool.ResolvePath(path, context.WorkFolder);
if (context.ActiveTab == "Cowork") fullPath = AgentContext.EnsureTimestampedPath(fullPath);
if (!fullPath.EndsWith(".pptx", StringComparison.OrdinalIgnoreCase))
@@ -620,6 +639,28 @@ public class PptxSkill : IAgentTool
? new FullTheme(extracted, baseLayout)
: FullThemes["professional"];
}
else if (templatePack != null)
{
if (!string.IsNullOrWhiteSpace(packTemplateName))
templatePptxPath = ResolveTemplatePath(packTemplateName!);
if (!FullThemes.TryGetValue(templatePack.FallbackTheme, out var packTheme))
packTheme = FullThemes["professional"];
if (templatePptxPath != null)
{
var extracted = ExtractThemeFromPptx(templatePptxPath);
fullTheme = extracted != null
? new FullTheme(extracted, packTheme.Layout)
: packTheme;
}
else
{
fullTheme = packTheme;
}
theme = templatePack.FallbackTheme;
}
else if (string.Equals(theme, "custom", StringComparison.OrdinalIgnoreCase)
&& args.SafeTryGetProperty("custom_colors", out var ccEl)
&& ccEl.ValueKind == JsonValueKind.Object)
@@ -957,13 +998,20 @@ public class PptxSkill : IAgentTool
// Default를 application/xml로 수정하고 presentation.xml에 Override 추가.
RepairContentTypes(fullPath);
var templateSourceName = templateName ?? packTemplateName;
var themeLabel = cloneInfo_cloned
? $"template:{templateName ?? cloneInfo_srcLabel} (master cloned{(cloneAll ? " + slides cloned" : "")})"
: !string.IsNullOrWhiteSpace(templateName)
? $"template:{templateName} (color fallback)"
? templateSourceName != null
? $"template:{templateSourceName} (master cloned{(cloneAll ? " + slides cloned" : "")})"
: templatePptxPath != null
? $"theme_file:{cloneInfo_srcLabel} (master cloned{(cloneAll ? " + slides cloned" : "")})"
: theme;
: theme
: !string.IsNullOrWhiteSpace(templateName)
? $"template:{templateName} (color fallback)"
: templatePptxPath != null && !string.IsNullOrWhiteSpace(packTemplateName)
? $"template:{packTemplateName} (color fallback)"
: templatePptxPath != null
? $"theme_file:{cloneInfo_srcLabel} (master cloned{(cloneAll ? " + slides cloned" : "")})"
: theme;
var deckReview = hasSlidesArray
? DeckQualityReviewService.ReviewDeck(
presTitle,
@@ -978,6 +1026,8 @@ public class PptxSkill : IAgentTool
};
if (preparedDeck != null)
outputParts.Add(preparedDeck.ToToolSummary());
if (!string.IsNullOrWhiteSpace(templatePackName))
outputParts.Add($"Template pack: {templatePackName}");
if (deckReview != null)
outputParts.Add(deckReview.ToToolSummary());
return ToolResult.Ok(string.Join("\n", outputParts), fullPath);