assistant: Don't unwrap built-in step resolution prompt (#15704)
This PR removes some `unwrap`s while loading the built-in step resolution prompt. While these `unwrap`s are safe today, they are relying on some implicit contracts that might change in the future. We're using this in a context where it's easy to propagate an error upwards, so we may as well avoid the `unwrap`s entirely and use a `Result`. Release Notes: - N/A
This commit is contained in:
parent
24afe7c3f9
commit
c6580da889
2 changed files with 8 additions and 8 deletions
|
@ -1407,7 +1407,7 @@ impl Context {
|
|||
async move {
|
||||
let prompt_store = cx.update(|cx| PromptStore::global(cx))?.await?;
|
||||
|
||||
let mut prompt = prompt_store.step_resolution_prompt();
|
||||
let mut prompt = prompt_store.step_resolution_prompt()?;
|
||||
prompt.push_str(&step_text);
|
||||
|
||||
request.messages.push(LanguageModelRequestMessage {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue