feat: 恢复模型直答功能及直答历史
Some checks failed
Flask 提示词大师 - CI/CD 流水线 / 代码质量检查 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 单元测试 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 集成测试 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 构建Docker镜像 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署到测试环境 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署到生产环境 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署监控系统 (push) Has been cancelled
Some checks failed
Flask 提示词大师 - CI/CD 流水线 / 代码质量检查 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 单元测试 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 集成测试 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 构建Docker镜像 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署到测试环境 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署到生产环境 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署监控系统 (push) Has been cancelled
This commit is contained in:
@@ -67,6 +67,15 @@
|
||||
android:clipToPadding="false"
|
||||
tools:listitem="@layout/item_generation_history" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_direct_answer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
android:padding="12dp"
|
||||
android:clipToPadding="false"
|
||||
tools:listitem="@layout/item_direct_answer_history" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/empty_optimize"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -84,5 +93,14 @@
|
||||
android:text="@string/history_empty_generation"
|
||||
android:textColor="@color/colorTextSecondary"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/empty_direct_answer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/history_empty_direct_answer"
|
||||
android:textColor="@color/colorTextSecondary"
|
||||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
android:textColor="@color/colorTextSecondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 操作按钮区:优化 + 生成 -->
|
||||
<!-- 操作按钮区:优化 + 生成 + 直答 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -220,16 +220,25 @@
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/btn_optimize"
|
||||
android:layout_marginEnd="8dp" />
|
||||
android:layout_marginEnd="4dp" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_generate"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/btn_generate"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_direct_answer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/btn_direct_answer"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
android:textColor="@color/colorWhite"
|
||||
android:layout_marginStart="8dp" />
|
||||
android:layout_marginStart="4dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 加载指示 -->
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/colorCard"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_question"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/colorTextDark"
|
||||
android:textSize="14sp"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
tools:text="问:什么是机器学习?" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_answer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/colorText"
|
||||
android:textSize="13sp"
|
||||
android:maxLines="4"
|
||||
android:ellipsize="end"
|
||||
tools:text="答:机器学习是..." />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/colorTextSecondary"
|
||||
android:textSize="11sp"
|
||||
tools:text="2025-03-02 14:30" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="8dp">
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_use"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/history_use" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_copy"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/btn_copy" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -16,6 +16,7 @@
|
||||
<string name="temp_balanced">平衡</string>
|
||||
<string name="temp_creative">创意</string>
|
||||
<string name="btn_generate">生成</string>
|
||||
<string name="btn_direct_answer">直答</string>
|
||||
<string name="btn_optimize">优化提示词</string>
|
||||
<string name="result_placeholder">生成结果将显示在这里…</string>
|
||||
<string name="btn_copy">复制</string>
|
||||
@@ -24,9 +25,11 @@
|
||||
<string name="btn_history">历史</string>
|
||||
<string name="history_title">生成历史</string>
|
||||
<string name="history_back">返回</string>
|
||||
<string name="history_tab_optimize">优化历史</string>
|
||||
<string name="history_tab_generation">生成历史</string>
|
||||
<string name="history_tab_optimize">优化</string>
|
||||
<string name="history_tab_generation">生成</string>
|
||||
<string name="history_tab_direct_answer">直答</string>
|
||||
<string name="history_empty_optimize">暂无优化记录</string>
|
||||
<string name="history_empty_generation">暂无生成记录</string>
|
||||
<string name="history_empty_direct_answer">暂无直答记录</string>
|
||||
<string name="history_use">使用</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user