()
| 101 | |
| 102 | // 覆盖层提示内容 |
| 103 | const renderOverlay = (): React.ReactNode => { |
| 104 | if (!hasLLMConfig) { |
| 105 | return ( |
| 106 | <span className="ai-generate-popover__no-config-text"> |
| 107 | 未配置模型,请先 |
| 108 | <a |
| 109 | onClick={() => { |
| 110 | onOpenChange(false) |
| 111 | openSettings('llm') |
| 112 | }} |
| 113 | > |
| 114 | 配置 LLM |
| 115 | </a> |
| 116 | </span> |
| 117 | ) |
| 118 | } |
| 119 | if (!hasDefaultLLM) { |
| 120 | return <span className="ai-generate-popover__no-config-text">请先在下方选择一个模型</span> |
| 121 | } |
| 122 | return null |
| 123 | } |
| 124 | |
| 125 | const content = ( |
| 126 | <div className="ai-generate-popover__content" onClick={(e) => e.stopPropagation()}> |
no test coverage detected