feat(chat): add Claude Code chat backend
This commit is contained in:
@@ -10,7 +10,7 @@ typedef ChatModelSelection = ({
|
||||
/// Harnesses with a verified catalog and model-selection path, matching the
|
||||
/// web's `supportsChatModels`.
|
||||
bool supportsChatModels(String backend) =>
|
||||
const ['', 'opencode', 'codex'].contains(backend.trim());
|
||||
const ['', 'opencode', 'codex', 'claude'].contains(backend.trim());
|
||||
|
||||
/// The recorded current model, or the web's "Model" when none was recorded.
|
||||
String chatModelLabel(String model, String selection) {
|
||||
@@ -20,10 +20,17 @@ String chatModelLabel(String model, String selection) {
|
||||
}
|
||||
|
||||
/// The helper shown above the catalog, verbatim from the web.
|
||||
String chatModelSelectionNote(String backend) => backend.trim() == 'codex'
|
||||
? 'Saved by Pipelines for the next turn you send. Does not resume this '
|
||||
'thread or edit global Codex configuration.'
|
||||
: 'Applies to the next turn in this chat.';
|
||||
String chatModelSelectionNote(String backend) {
|
||||
if (backend.trim() == 'codex') {
|
||||
return 'Saved by Pipelines for the next turn you send. Does not resume this '
|
||||
'thread or edit global Codex configuration.';
|
||||
}
|
||||
if (backend.trim() == 'claude') {
|
||||
return 'Saved by Pipelines for the next turn you send. Does not edit your '
|
||||
'global Claude Code configuration.';
|
||||
}
|
||||
return 'Applies to the next turn in this chat.';
|
||||
}
|
||||
|
||||
/// A model's display name, or its id when the server gave no name.
|
||||
String chatModelName(JsonMap model) {
|
||||
|
||||
Reference in New Issue
Block a user