Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Mark Stale Issues
uses: actions/stale@v10
uses: actions/stale@v11
with:
stale-issue-label: 'state: inactive'
stale-pr-label: 'state: inactive'
Expand Down
7 changes: 4 additions & 3 deletions crates/forge_app/src/dto/openai/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ pub struct Message {
pub reasoning_text: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reasoning_opaque: Option<String>,
// kimi_k2 uses reasoning_content as flat string (similar to reasoning_text but aliased)
// kimi_k2 uses reasoning_content as flat string (similar to reasoning_text
// but aliased)
#[serde(skip_serializing_if = "Option::is_none", rename = "reasoning_content")]
pub reasoning_content: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down Expand Up @@ -395,8 +396,8 @@ impl From<Context> for Request {
min_p: Default::default(),
top_a: Default::default(),
prediction: Default::default(),
// Since compaction is support on the client we don't need middle-out transforms any
// more
// Since compaction is support on the client we don't need
// middle-out transforms any more
transforms: Default::default(),
models: Default::default(),
route: Default::default(),
Expand Down
3 changes: 2 additions & 1 deletion crates/forge_app/src/orch_spec/orch_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ pub struct Runner {
// Tool call requests and the mock responses
test_tool_calls: Mutex<VecDeque<(ToolCallFull, ToolResult)>>,

// Mock completions from the LLM (Each value is produced as an event in the stream)
// Mock completions from the LLM (Each value is produced as an event in the
// stream)
test_completions: Mutex<VecDeque<ChatCompletionMessage>>,

// Mock shell command outputs
Expand Down
11 changes: 6 additions & 5 deletions crates/forge_app/src/orch_spec/orch_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ async fn test_multiple_consecutive_tool_calls() {
ChatCompletionMessage::assistant("Reading 3").add_tool_call(tool_call.clone()),
ChatCompletionMessage::assistant("Reading 4").add_tool_call(tool_call.clone()),
ChatCompletionMessage::assistant("Completing Task").finish_reason(FinishReason::Stop),
// Extra responses for doom loop reminder iterations (detector triggers on each request
// after 4th tool call)
// Extra responses for doom loop reminder iterations (detector
// triggers on each request after 4th tool call)
ChatCompletionMessage::assistant("Acknowledged").finish_reason(FinishReason::Stop),
ChatCompletionMessage::assistant("Task complete").finish_reason(FinishReason::Stop),
]);
Expand Down Expand Up @@ -423,8 +423,8 @@ async fn test_doom_loop_detection_adds_user_reminder_after_repeated_calls_on_nex
ChatCompletionMessage::assistant("Call 3").add_tool_call(tool_call.clone()),
ChatCompletionMessage::assistant("Call 4").add_tool_call(tool_call.clone()),
ChatCompletionMessage::assistant("Done").finish_reason(FinishReason::Stop),
// Extra responses for doom loop reminder iterations (detector triggers on each request
// after 4th tool call)
// Extra responses for doom loop reminder iterations (detector
// triggers on each request after 4th tool call)
ChatCompletionMessage::assistant("Noted").finish_reason(FinishReason::Stop),
ChatCompletionMessage::assistant("Actually done now").finish_reason(FinishReason::Stop),
]);
Expand Down Expand Up @@ -614,7 +614,8 @@ async fn test_todo_enforcement_injects_reminder() {

let mut ctx = TestContext::default()
.mock_assistant_responses(vec![
// LLM tries to finish but has pending todos - reminder will be injected
// LLM tries to finish but has pending todos - reminder will be
// injected
ChatCompletionMessage::assistant(Content::full("Task is done"))
.finish_reason(FinishReason::Stop),
// Second response after the first reminder is injected
Expand Down
3 changes: 2 additions & 1 deletion crates/forge_domain/src/auth/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ impl AuthCredential {
AuthDetails::ApiKey(_) => false,
// AWS Profile credentials are managed by the AWS SDK internally
AuthDetails::AwsProfile(_) => false,
// Google ADC tokens are short-lived (1 hour) and should always be checked/refreshed
// Google ADC tokens are short-lived (1 hour) and should always be
// checked/refreshed
AuthDetails::GoogleAdc(_) => true,
AuthDetails::OAuth { tokens, .. } | AuthDetails::OAuthWithApiKey { tokens, .. } => {
tokens.needs_refresh(buffer)
Expand Down
6 changes: 4 additions & 2 deletions crates/forge_domain/src/result_stream_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,8 @@ mod tests {
let messages = vec![
Ok(ChatCompletionMessage::default().content(Content::part(&xml_content[0..30]))),
Ok(ChatCompletionMessage::default().content(Content::part(&xml_content[30..]))),
// These messages come after tool interruption but contain usage updates
// These messages come after tool interruption but contain usage
// updates
Ok(ChatCompletionMessage::default().content(Content::part(" ignored content"))),
// Final message with the actual usage - this is always sent last
Ok(ChatCompletionMessage::default().usage(Usage {
Expand Down Expand Up @@ -1161,7 +1162,8 @@ mod tests {

let messages = vec![
Ok(ChatCompletionMessage::default().content(Content::part(xml_content))),
// After interruption - content should be ignored but usage should be captured
// After interruption - content should be ignored but usage should
// be captured
Ok(ChatCompletionMessage::default()
.content(Content::part("This content should be ignored"))),
Ok(ChatCompletionMessage::default()
Expand Down
4 changes: 2 additions & 2 deletions crates/forge_infra/src/forge_infra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ use crate::walker::ForgeWalkerService;

#[derive(Clone)]
pub struct ForgeInfra {
// TODO: Drop the "Service" suffix. Use names like ForgeFileReader, ForgeFileWriter,
// ForgeHttpClient etc.
// TODO: Drop the "Service" suffix. Use names like ForgeFileReader,
// ForgeFileWriter, ForgeHttpClient etc.
file_read_service: Arc<ForgeFileReadService>,
file_write_service: Arc<ForgeFileWriteService>,
file_remove_service: Arc<ForgeFileRemoveService>,
Expand Down
3 changes: 2 additions & 1 deletion crates/forge_repo/src/conversation/conversation_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,8 @@ impl From<MetricsRecord> for forge_domain::Metrics {
.into_iter()
.filter_map(|(path, file_record)| {
let operation = match file_record {
// If it's an array, take the last operation (most recent)
// If it's an array, take the last operation (most
// recent)
FileOperationOrArray::Array(mut arr) if !arr.is_empty() => {
arr.pop().unwrap().into()
}
Expand Down
7 changes: 4 additions & 3 deletions crates/forge_select/src/preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,11 @@ fn run_select_ui_values(options: SelectUiOptions) -> anyhow::Result<Option<Vec<S
if event::poll(Duration::from_millis(250))? {
match event::read()? {
// On Windows, crossterm reports key Release events in addition
// to Press/Repeat (Unix reports only Press). Ignore Release so a
// stray Release — notably the Release of the Enter key that
// to Press/Repeat (Unix reports only Press). Ignore Release so
// a stray Release — notably the Release of the Enter key that
// opened this picker — isn't read as a fresh keystroke that
// instantly accepts the default selection and closes the picker.
// instantly accepts the default selection and closes the
// picker.
Event::Key(key) if key.kind == KeyEventKind::Release => {}
Event::Key(key) => {
match handle_key_event(
Expand Down
3 changes: 2 additions & 1 deletion crates/forge_services/src/app_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ mod tests {
use std::sync::Mutex;

use forge_config::{ForgeConfig, ModelConfig};
// Alias to avoid collision with forge_config::ModelConfig used in test fixtures
// Alias to avoid collision with forge_config::ModelConfig used in test
// fixtures
use forge_domain::ModelConfig as DomainModelConfig;
use forge_domain::{
AnyProvider, ChatRepository, ConfigOperation, Environment, InputModality, MigrationResult,
Expand Down
3 changes: 2 additions & 1 deletion crates/forge_services/src/mcp/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ where
// Read and merge all configurations (original behavior)
let env = self.infra.get_environment();
let paths = vec![
// Configs at lower levels take precedence, so we read them in reverse order.
// Configs at lower levels take precedence, so we read them
// in reverse order.
env.mcp_user_config().as_path().to_path_buf(),
env.mcp_local_config().as_path().to_path_buf(),
];
Expand Down
Loading