File size: 680 Bytes
408c946
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#
# SPDX-FileCopyrightText: Hadad <hadad@linuxmail.org>
# SPDX-License-Identifier: Apache-2.0
#

def styles(reasoning: str, expanded: bool = False) -> str:
    open_attr = "open" if expanded else ""
    emoji = "&#129504;"
    return f"""
<details {open_attr} style="
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
">
  <summary style="
    font-weight: 700;
    font-size: 14px !important;
    cursor: pointer;
    user-select: none;
  ">  
    {emoji} Reasoning
  </summary>
  <div style="
    margin-top: 6px;
    padding-top: 6px;
    font-size: 10px !important;
    line-height: 1.7;
    letter-spacing: 0.02em;
  ">
    {reasoning}
  </div>
</details>
"""