Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ada637d
fixed mac element tree
FunctionFreak Jun 20, 2026
2a726d6
Update app.py
FunctionFreak Jun 20, 2026
727bd53
changed the color
FunctionFreak Jun 20, 2026
92ea23c
new ui
FunctionFreak Jun 20, 2026
7d3d06a
added more changes
FunctionFreak Jun 20, 2026
22af650
todo globe integration done. nicley
FunctionFreak Jun 21, 2026
53fda9a
new update
FunctionFreak Jun 21, 2026
145b06f
all tool reponses are piped to frontend
FunctionFreak Jun 22, 2026
6ad1a17
added shimring
FunctionFreak Jun 22, 2026
b765b76
globe and shell move to left contianer
FunctionFreak Jun 22, 2026
53b3483
added more componeent
FunctionFreak Jun 22, 2026
484ec0f
main container change almost done
FunctionFreak Jun 22, 2026
a07113f
globe position fix
FunctionFreak Jun 22, 2026
8936586
perfectly moved moved input box
FunctionFreak Jun 22, 2026
98c1987
added model selection button
FunctionFreak Jun 22, 2026
d1664b4
Update chat_input.css
FunctionFreak Jun 22, 2026
725ecab
input box done
FunctionFreak Jun 22, 2026
d6922ff
fixed api key setting issue
FunctionFreak Jun 22, 2026
586c49d
added helper in the coder and minion
FunctionFreak Jun 23, 2026
104247d
implementing coder ui
FunctionFreak Jun 23, 2026
76cace0
coder ui done
FunctionFreak Jun 23, 2026
00bda95
one coder ui done
FunctionFreak Jun 23, 2026
0b810fc
done ui
FunctionFreak Jun 23, 2026
46fdfe0
coder ui done
FunctionFreak Jun 24, 2026
35cd13d
added conversation memory
FunctionFreak Jun 24, 2026
ef841bf
fixed web tool storage
FunctionFreak Jun 25, 2026
8dd4c37
memory tracking integration done
FunctionFreak Jun 25, 2026
3015c98
increased cap
FunctionFreak Jun 25, 2026
fee5209
cleanup script
FunctionFreak Jun 26, 2026
0eab3e4
all ui done
FunctionFreak Jun 26, 2026
4be225c
minor bugs fix
FunctionFreak Jun 26, 2026
b2a4b2a
small dot added
FunctionFreak Jun 26, 2026
0a2185d
added setting in autouse inside it
FunctionFreak Jun 27, 2026
ad7074e
memory tracking
FunctionFreak Jun 27, 2026
d2b8561
cleanup file
FunctionFreak Jun 27, 2026
9f6e823
done permission
FunctionFreak Jun 29, 2026
2cc3249
Merge pull request #74 from auto-use/new_ui
auto-use Jun 29, 2026
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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ _embedded_resources.py
_build_stamp.py
/raw_reasoning
*.mp4
!frontend/background.mp4
!demo.mp4
/Auto_Use/api_key
/Auto_Use/agent_conversation/settings.json
/Auto_Use/windows_use/mcp_tracking
*.exe
*.ico
Expand All @@ -117,3 +117,8 @@ screen_record.py
/Auto_Use/macOS_use/scratchpad
/cli_minion_result
/Auto_Use/windows_use/scratchpad/cli_minion

# Resumable chat memory (UI) — runtime session data lives inside the package;
# the code (service.py / __init__.py) is tracked, the saved chats are not.
/Auto_Use/agent_conversation/index.json
/Auto_Use/agent_conversation/chat_*/
31 changes: 31 additions & 0 deletions Auto_Use/agent_conversation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2026 Autouse AI — https://github.com/auto-use/Auto-Use
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# If you build on this project, please keep this header and credit
# Autouse AI (https://github.com/auto-use/Auto-Use) in forks and derivative works.
# A small attribution goes a long way toward a healthy open-source
# community — thank you for contributing.

"""Permanent (resumable) chat memory for the UI path.

All conversation-memory management lives in this package — saving, loading and
optimizing a session's conversation, and the on-disk session folders + index.
The agent stays a thin one-shot loop; app.py talks ONLY to ConversationService
(load a session -> trigger the main agent -> save the run). main.py / cli.py
never import this package, so they remain direct one-shot entry points.
"""

from .service import ConversationService, conversation

__all__ = ["ConversationService", "conversation"]
474 changes: 474 additions & 0 deletions Auto_Use/agent_conversation/service.py

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions Auto_Use/macOS_use/agent/coder/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ def _run_agent_loop(self, task: str) -> str:

return "Max iterations reached"

safe_print(f"cli agent running step {step_number}")
# Step heartbeat → debug log only (NOT the UI). The card shows ONLY the agent's
# own validated output; this "running step N" marker is ours, not the model's.
debug_log(f"cli agent running step {step_number}")

# Get agent sitting info
agent_sitting = self._get_agent_sitting()
Expand Down Expand Up @@ -353,12 +355,6 @@ def _run_agent_loop(self, task: str) -> str:
# Call LLM
raw_response = self.llm.send_request(messages)

# Stream the raw LLM response to stdout. The parent main agent's
# subprocess pipe reader picks it up and renders it line-by-line
# in the CLI streaming pill UI (no decoration, just raw text).
if raw_response:
safe_print(raw_response)

# Check stop after LLM
if self.stop_event and self.stop_event.is_set():
break
Expand All @@ -369,10 +365,11 @@ def _run_agent_loop(self, task: str) -> str:
# Validate and normalize response
success, normalized, failed_raw = CLIAgentResponseFormatter.normalize_response(raw_response)

# If JSON parse failed, discard response and retry with fresh context
# If JSON parse failed, discard response and retry with fresh context.
# Emit NOTHING to the UI on failure — raw/partial/malformed JSON would glitch
# the streaming card; the raw response is already saved above for debugging.
if not success:
json_fail_count += 1
safe_print(f"⚠️ JSON parse failed ({json_fail_count}/3). Discarding and retrying...")

if json_fail_count >= 3:
break
Expand All @@ -383,6 +380,11 @@ def _run_agent_loop(self, task: str) -> str:
# Reset consecutive JSON fail counter on success
json_fail_count = 0

# Stream the validated, complete response (action included) to the card's
# `>` line. The frontend parses the `action` array out of THIS JSON to drive
# the action-icon chain + scratchpad — no extra backend events needed.
safe_print(CLIAgentResponseFormatter.format_stream_json(normalized))

# Save TRUE agent memory snapshot
self._save_conversation_snapshot(messages, normalized, step_number)

Expand Down
15 changes: 14 additions & 1 deletion Auto_Use/macOS_use/agent/coder/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,17 @@ def get_action_block(normalized_response: str) -> list:
return json_data.get("action", [])
except:
pass
return []
return []

@staticmethod
def format_stream_json(normalized_response: str) -> str:
"""Per-step payload for the streaming UI terminal — ONLY the action block (a real
terminal shows what's being executed, not thinking/goal/memory). The frontend reads
`action` from this for both the `>` stream and the tool-icon chain. On parse error,
fall back to the input unchanged.
"""
try:
json_data = json.loads(normalized_response)
return json.dumps({"action": json_data.get("action", [])}, indent=2, ensure_ascii=False)
except Exception:
return normalized_response
Loading
Loading