1.全部完成后,修改对话内容
This commit is contained in:
@@ -46,6 +46,11 @@ class PlanDetailStore extends ChangeNotifier {
|
||||
///计划详情
|
||||
PlanDetailDto planDetail = PlanDetailDto(summary: "Plan Details");
|
||||
|
||||
///是否全部完成
|
||||
bool isAllDone() =>
|
||||
planDetail.stepsList.isNotEmpty &&
|
||||
planDetail.stepsList.every((item) => item.stepStatus == 2);
|
||||
|
||||
///是否正在编辑
|
||||
bool isEdit = false;
|
||||
|
||||
@@ -56,7 +61,7 @@ class PlanDetailStore extends ChangeNotifier {
|
||||
}
|
||||
|
||||
///流请求工具
|
||||
StreamUtils streamUtils = StreamUtils();
|
||||
final StreamUtils _streamUtils = StreamUtils();
|
||||
|
||||
///创建计划
|
||||
void createPlan() async {
|
||||
@@ -65,7 +70,7 @@ class PlanDetailStore extends ChangeNotifier {
|
||||
|
||||
///生成摘要---------------------------
|
||||
String summary = "";
|
||||
streamUtils.sendStream(
|
||||
_streamUtils.sendStream(
|
||||
"/plan/make_summary",
|
||||
data: {"plan_id": planId},
|
||||
onCall: (chunk) {
|
||||
@@ -79,7 +84,7 @@ class PlanDetailStore extends ChangeNotifier {
|
||||
|
||||
/// 生成对白-------------------------------
|
||||
String dialog = "";
|
||||
await streamUtils.sendStream(
|
||||
await _streamUtils.sendStream(
|
||||
"/plan/make_dialog",
|
||||
data: {"plan_id": planId},
|
||||
onCall: (chunk) {
|
||||
@@ -92,7 +97,7 @@ class PlanDetailStore extends ChangeNotifier {
|
||||
);
|
||||
|
||||
/// 生成步骤-------------------------------
|
||||
await streamUtils.sendStream(
|
||||
await _streamUtils.sendStream(
|
||||
"/plan/make_step",
|
||||
data: {"plan_id": planId},
|
||||
onCall: (chunk) {
|
||||
@@ -115,7 +120,7 @@ class PlanDetailStore extends ChangeNotifier {
|
||||
);
|
||||
|
||||
/// 生成步骤解释 -------------------------------
|
||||
await streamUtils.sendStream(
|
||||
await _streamUtils.sendStream(
|
||||
"/plan/make_step_explain",
|
||||
data: {
|
||||
"plan_id": planId,
|
||||
@@ -137,7 +142,7 @@ class PlanDetailStore extends ChangeNotifier {
|
||||
);
|
||||
|
||||
/// 生成建议 ------------------
|
||||
await streamUtils.sendStream(
|
||||
await _streamUtils.sendStream(
|
||||
"/plan/make_suggestion",
|
||||
data: {
|
||||
"plan_id": planId,
|
||||
|
||||
Reference in New Issue
Block a user