* feat: wa working full stack * feat: writing assistance made anew * docs: migrate copilot docs to .github/instructions/ format - Create choreographer.instructions.md (applyTo: lib/pangea/choreographer/**) - Create events-and-tokens.instructions.md (applyTo: lib/pangea/events/**,lib/pangea/extensions/**) - Create modules.instructions.md (applyTo: lib/pangea/**) — full module map - Track copilot-instructions.md (remove .gitignore rule) - Add documentation reference table to copilot-instructions.md Content sourced from docs/copilot/ on writing-assistance branch. * docs: remove old docs/copilot/ (migrated to .github/instructions/) * docs: update choreographer + modules docs for writing-assistance audit - Mark IT (Interactive Translation) as deprecated throughout - Document new ReplacementTypeEnum taxonomy (grammar, surface, word-choice categories) - Add AssistanceStateEnum, AutocorrectPopup, feedback rerun flow - Mark SpanDataRepo/span_details as dead code - Mark SpanChoiceTypeEnum.bestCorrection/bestAnswer as deprecated - Add new files to modules listing (autocorrect_popup, start_igc_button, etc.) - Update API endpoints table with active/deprecated/dead status * formatting, replace deprecated withOpacity calls * fix linter issues from deprecated types * use better error color * move cloing of overlays into choreographer * reduce duplicate code on igc_controller, update UI on feedback * couple of adjustments * display prompt in span card by type * fix error in tests * translations * simplify span card feedback --------- Co-authored-by: ggurdin <ggurdin@gmail.com>
25 lines
749 B
Dart
25 lines
749 B
Dart
import 'package:fluffychat/pangea/common/constants/model_keys.dart';
|
|
|
|
/// Generic feedback schema matching the backend's LLMFeedbackSchema.
|
|
/// Used for providing user corrections to LLM-generated content.
|
|
class LLMFeedbackModel<T> {
|
|
/// User's feedback text describing the issue
|
|
final String feedback;
|
|
|
|
/// Original response that user is providing feedback on
|
|
final T content;
|
|
|
|
/// Function to serialize the content to JSON
|
|
final Map<String, dynamic> Function(T) contentToJson;
|
|
|
|
const LLMFeedbackModel({
|
|
required this.feedback,
|
|
required this.content,
|
|
required this.contentToJson,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
ModelKey.feedback: feedback,
|
|
ModelKey.content: contentToJson(content),
|
|
};
|
|
}
|