@things-factory/ai-assistant 10.1.32 → 10.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1768,6 +1768,7 @@ export class OxAssistantChat extends LitElement {
1768
1768
  }
1769
1769
  .proposal {
1770
1770
  display: flex;
1771
+ flex-wrap: wrap;
1771
1772
  align-items: center;
1772
1773
  gap: 8px;
1773
1774
  padding: 6px 8px 6px 7px;
@@ -1787,7 +1788,8 @@ export class OxAssistantChat extends LitElement {
1787
1788
  flex-direction: column;
1788
1789
  gap: 1px;
1789
1790
  min-width: 0;
1790
- flex: 1;
1791
+ /* 상태 문구가 길어져도 제목 영역을 0px까지 밀어 한 글자씩 세로로 만들지 않는다. */
1792
+ flex: 1 1 132px;
1791
1793
  }
1792
1794
  .proposal .plabel {
1793
1795
  font-size: 11.5px;
@@ -1802,6 +1804,12 @@ export class OxAssistantChat extends LitElement {
1802
1804
  }
1803
1805
  /* 실행 버튼 — 이 대화의 유일한 "되돌릴 수 없는" 행동이므로 채운 버튼 하나로 분명하게. */
1804
1806
  .proposal .run {
1807
+ /* 보내는 중 n초처럼 긴 상태도 좁은 도크에서 카드 폭을 독점하지 않는다. */
1808
+ min-width: 0;
1809
+ max-width: 100%;
1810
+ overflow-wrap: anywhere;
1811
+ white-space: normal;
1812
+ line-height: 1.3;
1805
1813
  flex-shrink: 0;
1806
1814
  padding: 4px 12px;
1807
1815
  border: 0;
@@ -4488,6 +4496,15 @@ export class OxAssistantChat extends LitElement {
4488
4496
  }
4489
4497
  })
4490
4498
 
4499
+ /*
4500
+ * Apollo가 errorPolicy: all 로 응답하면 data는 비고 GraphQL 오류는 result.errors 에 남는다.
4501
+ * 이를 확인하지 않으면 실제 서버 사유(예: Figure 후보의 마지막 검증 사유)를 버리고
4502
+ * "응답이 비어있습니다"라는 거짓 오류를 보여 준다.
4503
+ */
4504
+ if (result.errors?.length) {
4505
+ throw new Error(result.errors.map(error => error.message).join('\n'))
4506
+ }
4507
+
4491
4508
  const out = neutral ? result.data?.assistantChat : result.data?.boardAIChat
4492
4509
  if (!out) throw new Error(i18next.t('ai-assistant.text.empty-response'))
4493
4510
 
@@ -4580,4 +4597,3 @@ declare global {
4580
4597
  'ox-assistant-chat': OxAssistantChat
4581
4598
  }
4582
4599
  }
4583
-
@@ -1442,6 +1442,7 @@ let OxAssistantChat = class OxAssistantChat extends LitElement {
1442
1442
  }
1443
1443
  .proposal {
1444
1444
  display: flex;
1445
+ flex-wrap: wrap;
1445
1446
  align-items: center;
1446
1447
  gap: 8px;
1447
1448
  padding: 6px 8px 6px 7px;
@@ -1461,7 +1462,8 @@ let OxAssistantChat = class OxAssistantChat extends LitElement {
1461
1462
  flex-direction: column;
1462
1463
  gap: 1px;
1463
1464
  min-width: 0;
1464
- flex: 1;
1465
+ /* 상태 문구가 길어져도 제목 영역을 0px까지 밀어 한 글자씩 세로로 만들지 않는다. */
1466
+ flex: 1 1 132px;
1465
1467
  }
1466
1468
  .proposal .plabel {
1467
1469
  font-size: 11.5px;
@@ -1476,6 +1478,12 @@ let OxAssistantChat = class OxAssistantChat extends LitElement {
1476
1478
  }
1477
1479
  /* 실행 버튼 — 이 대화의 유일한 "되돌릴 수 없는" 행동이므로 채운 버튼 하나로 분명하게. */
1478
1480
  .proposal .run {
1481
+ /* 보내는 중 n초처럼 긴 상태도 좁은 도크에서 카드 폭을 독점하지 않는다. */
1482
+ min-width: 0;
1483
+ max-width: 100%;
1484
+ overflow-wrap: anywhere;
1485
+ white-space: normal;
1486
+ line-height: 1.3;
1479
1487
  flex-shrink: 0;
1480
1488
  padding: 4px 12px;
1481
1489
  border: 0;
@@ -4011,6 +4019,14 @@ let OxAssistantChat = class OxAssistantChat extends LitElement {
4011
4019
  })
4012
4020
  }
4013
4021
  });
4022
+ /*
4023
+ * Apollo가 errorPolicy: all 로 응답하면 data는 비고 GraphQL 오류는 result.errors 에 남는다.
4024
+ * 이를 확인하지 않으면 실제 서버 사유(예: Figure 후보의 마지막 검증 사유)를 버리고
4025
+ * "응답이 비어있습니다"라는 거짓 오류를 보여 준다.
4026
+ */
4027
+ if (result.errors?.length) {
4028
+ throw new Error(result.errors.map(error => error.message).join('\n'));
4029
+ }
4014
4030
  const out = neutral ? result.data?.assistantChat : result.data?.boardAIChat;
4015
4031
  if (!out)
4016
4032
  throw new Error(i18next.t('ai-assistant.text.empty-response'));