Skip to content

Commit

Permalink
feat: Provide English prompt
Browse files Browse the repository at this point in the history
Provide English prompt.

Log:
  • Loading branch information
Clauszy authored and deepin-bot[bot] committed Jan 20, 2025
1 parent 4308ca3 commit 1a3dbab
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ void AiToolBarInner::onSummary() {
qDBusRegisterMetaType<QMap<QString, QString>>();
QMap<QString, QString> params;
params.insert("file", m_filePath);
params.insert("defaultPrompt", "帮我总结这篇文档,直接给我清晰的结果,不用多余内容");
params.insert("defaultPrompt", tr("Summarize this document for me and provide me with a clear result directly, without any unnecessary content."));
QDBusInterface notification("com.deepin.copilot", "/org/deepin/copilot/chat", "org.deepin.copilot.chat", QDBusConnection::sessionBus());
QString error = notification.call(QDBus::Block, "inputPrompt", "", QVariant::fromValue(params)).errorMessage();
if (!error.isEmpty()) {
Expand All @@ -291,7 +291,7 @@ void AiToolBarInner::onTranslation() {
qDBusRegisterMetaType<QMap<QString, QString>>();
QMap<QString, QString> params;
params.insert("file", m_filePath);
params.insert("defaultPrompt", "帮我翻译这篇文档,直接给我清晰的结果,不用多余内容");
params.insert("defaultPrompt", tr("Translate this document for me and provide me with a clear result directly, without any unnecessary content."));
QDBusInterface notification("com.deepin.copilot", "/org/deepin/copilot/chat", "org.deepin.copilot.chat", QDBusConnection::sessionBus());
QString error = notification.call(QDBus::Block, "inputPrompt", "", QVariant::fromValue(params)).errorMessage();
if (!error.isEmpty()) {
Expand All @@ -306,7 +306,7 @@ void AiToolBarInner::onExtension() {
qDBusRegisterMetaType<QMap<QString, QString>>();
QMap<QString, QString> params;
params.insert("file", m_filePath);
params.insert("defaultPrompt", "帮我扩写这篇文档,直接给我清晰的结果,不用多余内容");
params.insert("defaultPrompt", tr("Expand this document for me and provide me with a clear and expanded result directly, without any unnecessary content."));
QDBusInterface notification("com.deepin.copilot", "/org/deepin/copilot/chat", "org.deepin.copilot.chat", QDBusConnection::sessionBus());
QString error = notification.call(QDBus::Block, "inputPrompt", "", QVariant::fromValue(params)).errorMessage();
if (!error.isEmpty()) {
Expand Down
15 changes: 15 additions & 0 deletions translations/dde-grand-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@
<source>Add document to UOS AI knowledge base</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp" line="279"/>
<source>Summarize this document for me and provide me with a clear result directly, without any unnecessary content.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp" line="294"/>
<source>Translate this document for me and provide me with a clear result directly, without any unnecessary content.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp" line="309"/>
<source>Expand this document for me and provide me with a clear and expanded result directly, without any unnecessary content.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp" line="414"/>
<source>DDE Grand Search</source>
Expand Down
15 changes: 15 additions & 0 deletions translations/dde-grand-search_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@
<source>Add document to UOS AI knowledge base</source>
<translation>将文档添加到UOS AI知识库</translation>
</message>
<message>
<location filename="../src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp" line="279"/>
<source>Summarize this document for me and provide me with a clear result directly, without any unnecessary content.</source>
<translation>帮我总结这篇文档,直接给我清晰的结果,不用多余内容</translation>
</message>
<message>
<location filename="../src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp" line="294"/>
<source>Translate this document for me and provide me with a clear result directly, without any unnecessary content.</source>
<translation>帮我翻译这篇文档,直接给我清晰的结果,不用多余内容</translation>
</message>
<message>
<location filename="../src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp" line="309"/>
<source>Expand this document for me and provide me with a clear and expanded result directly, without any unnecessary content.</source>
<translation>帮我扩写这篇文档,直接给我清晰的结果,不用多余内容</translation>
</message>
<message>
<location filename="../src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp" line="414"/>
<source>DDE Grand Search</source>
Expand Down

0 comments on commit 1a3dbab

Please sign in to comment.