<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp
  xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
  xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
  xsi:type="TaskPaneApp">

  <Id>3f70c549-357e-485c-b22f-8fa620c3de04</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Horsir</ProviderName>
  <DefaultLocale>zh-CN</DefaultLocale>
  <DisplayName DefaultValue="Horsir" />
  <Description DefaultValue="Horsir：在 Word / Excel / PowerPoint 中改写、生成内容并分析数据，支持任意 OpenAI 兼容接口。" />
  <IconUrl DefaultValue="https://office.tufeiping.cn/assets/icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://office.tufeiping.cn/assets/icon-64.png" />
  <SupportUrl DefaultValue="https://office.tufeiping.cn/help.html" />
  <AppDomains>
    <AppDomain>https://office.tufeiping.cn</AppDomain>
  </AppDomains>

  <!-- Hosts this add-in supports -->
  <Hosts>
    <Host Name="Document" />
    <Host Name="Workbook" />
    <Host Name="Presentation" />
  </Hosts>

  <DefaultSettings>
    <SourceLocation DefaultValue="https://office.tufeiping.cn/taskpane.html" />
  </DefaultSettings>

  <Permissions>ReadWriteDocument</Permissions>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <!-- ===== Word ===== -->
      <Host xsi:type="Document">
        <DesktopFormFactor>
          <GetStarted>
            <Title resid="GetStarted.Title" />
            <Description resid="GetStarted.Description" />
            <LearnMoreUrl resid="GetStarted.LearnMoreUrl" />
          </GetStarted>
          <FunctionFile resid="Commands.Url" />
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="AiGroupWord">
                <Label resid="GroupLabel" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16" />
                  <bt:Image size="32" resid="Icon.32" />
                  <bt:Image size="64" resid="Icon.64" />
                  <bt:Image size="80" resid="Icon.80" />
                </Icon>
                <Control xsi:type="Button" id="OpenPaneWord">
                  <Label resid="OpenPane.Label" />
                  <Supertip>
                    <Title resid="OpenPane.Label" />
                    <Description resid="OpenPane.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16" />
                    <bt:Image size="32" resid="Icon.32" />
                    <bt:Image size="64" resid="Icon.64" />
                    <bt:Image size="80" resid="Icon.80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>AiTaskpane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>

      <!-- ===== Excel ===== -->
      <Host xsi:type="Workbook">
        <DesktopFormFactor>
          <FunctionFile resid="Commands.Url" />
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="AiGroupExcel">
                <Label resid="GroupLabel" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16" />
                  <bt:Image size="32" resid="Icon.32" />
                  <bt:Image size="64" resid="Icon.64" />
                  <bt:Image size="80" resid="Icon.80" />
                </Icon>
                <Control xsi:type="Button" id="OpenPaneExcel">
                  <Label resid="OpenPane.Label" />
                  <Supertip>
                    <Title resid="OpenPane.Label" />
                    <Description resid="OpenPane.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16" />
                    <bt:Image size="32" resid="Icon.32" />
                    <bt:Image size="64" resid="Icon.64" />
                    <bt:Image size="80" resid="Icon.80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>AiTaskpane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>

      <!-- ===== PowerPoint ===== -->
      <Host xsi:type="Presentation">
        <DesktopFormFactor>
          <FunctionFile resid="Commands.Url" />
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="AiGroupPpt">
                <Label resid="GroupLabel" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16" />
                  <bt:Image size="32" resid="Icon.32" />
                  <bt:Image size="64" resid="Icon.64" />
                  <bt:Image size="80" resid="Icon.80" />
                </Icon>
                <Control xsi:type="Button" id="OpenPanePpt">
                  <Label resid="OpenPane.Label" />
                  <Supertip>
                    <Title resid="OpenPane.Label" />
                    <Description resid="OpenPane.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16" />
                    <bt:Image size="32" resid="Icon.32" />
                    <bt:Image size="64" resid="Icon.64" />
                    <bt:Image size="80" resid="Icon.80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>AiTaskpane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16" DefaultValue="https://office.tufeiping.cn/assets/icon-16.png" />
        <bt:Image id="Icon.32" DefaultValue="https://office.tufeiping.cn/assets/icon-32.png" />
        <bt:Image id="Icon.64" DefaultValue="https://office.tufeiping.cn/assets/icon-64.png" />
        <bt:Image id="Icon.80" DefaultValue="https://office.tufeiping.cn/assets/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Commands.Url" DefaultValue="https://office.tufeiping.cn/commands.html" />
        <bt:Url id="Taskpane.Url" DefaultValue="https://office.tufeiping.cn/taskpane.html" />
        <bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://office.tufeiping.cn/help.html" />
        <bt:Url id="Help.Url" DefaultValue="https://office.tufeiping.cn/help.html" />
        <bt:Url id="Policy.Url" DefaultValue="https://office.tufeiping.cn/policy.html" />
      </bt:Urls>
      <bt:ShortStrings>
      <bt:String id="GroupLabel" DefaultValue="Horsir" />
        <bt:String id="OpenPane.Label" DefaultValue="打开 Horsir" />
        <bt:String id="GetStarted.Title" DefaultValue="Horsir 已就绪" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="OpenPane.Tooltip" DefaultValue="打开 Horsir：改写、生成内容、分析数据。" />
        <bt:String id="GetStarted.Description" DefaultValue="点击“打开 Horsir”开始使用。首次使用请在设置中填写 API 地址与密钥。" />
       </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
