fix: server recommendation issues and __DIRECT__ tag visibility

- Fix USD price display: all prices now show in KRW (₩)
- Add Korea region auto-detection: extracts region preference from user messages
- Fix low-spec recommendation for high-performance requirements:
  - Add extractTechStack() to detect PostgreSQL, Redis, MongoDB keywords
  - Enhance inferExpectedUsers() to consider tech stack complexity
  - SaaS/B2B services now recommend 4GB+ RAM servers
- Fix __DIRECT__ tag appearing in output:
  - Reorder message concatenation in server-agent.ts
  - Add stripping logic in conversation-service.ts and api.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
kappa
2026-01-28 20:24:54 +09:00
parent 53547f097e
commit d3b743c3c1
5 changed files with 1363 additions and 229 deletions

View File

@@ -36,7 +36,7 @@ export function formatTB(value: number): string {
* - CDN 없음 + 초과: "예상 트래픽: 1.50TB → 초과 0.50TB (₩10,000)"
* - CDN 없음 + 포함: "예상 트래픽: 0.80TB (포함 범위 내)"
*/
export function formatTrafficInfo(bandwidth_info: BandwidthInfo, currency: string): string {
export function formatTrafficInfo(bandwidth_info: BandwidthInfo): string {
// CDN 정보가 있는 경우
if (bandwidth_info.gross_monthly_tb !== undefined && bandwidth_info.cdn_cache_hit_rate !== undefined) {
// CDN 캐시 히트율 범위 검증 (0-100%)
@@ -47,9 +47,7 @@ export function formatTrafficInfo(bandwidth_info: BandwidthInfo, currency: strin
// 초과 여부 판단 (통일된 조건)
if (bandwidth_info.estimated_overage_tb > 0 && bandwidth_info.estimated_overage_cost > 0) {
const overageTB = formatTB(bandwidth_info.estimated_overage_tb);
const overageCost = currency === 'KRW'
? `${Math.round(bandwidth_info.estimated_overage_cost).toLocaleString()}`
: `$${bandwidth_info.estimated_overage_cost.toFixed(2)}`;
const overageCost = `${Math.round(bandwidth_info.estimated_overage_cost).toLocaleString()}`;
return `예상 트래픽: ${grossTB} (CDN ${hitRate}% → 원본 ${estimatedTB}) → 초과 ${overageTB} (${overageCost})`;
} else {
return `예상 트래픽: ${grossTB} (CDN ${hitRate}% → 원본 ${estimatedTB})`;
@@ -61,9 +59,7 @@ export function formatTrafficInfo(bandwidth_info: BandwidthInfo, currency: strin
// 초과 여부 판단 (통일된 조건)
if (bandwidth_info.estimated_overage_tb > 0 && bandwidth_info.estimated_overage_cost > 0) {
const overageTB = formatTB(bandwidth_info.estimated_overage_tb);
const overageCost = currency === 'KRW'
? `${Math.round(bandwidth_info.estimated_overage_cost).toLocaleString()}`
: `$${bandwidth_info.estimated_overage_cost.toFixed(2)}`;
const overageCost = `${Math.round(bandwidth_info.estimated_overage_cost).toLocaleString()}`;
return `예상 트래픽: ${estimatedTB} → 초과 ${overageTB} (${overageCost})`;
} else {
return `예상 트래픽: ${estimatedTB} (포함 범위 내)`;